Compare commits

..

No commits in common. "ac741c10e2835452616ebc3ca3d64107d4920136" and "e8607daf7d9d4320ddee8fcc6579459ba252714d" have entirely different histories.

7 changed files with 26 additions and 40 deletions

View File

@ -78,9 +78,6 @@ sensor:modalias:acpi:INVN6500*:dmi:*svn*Acer*:*pn*AspireSW5-011*
sensor:modalias:acpi:INVN6500*:dmi:*svn*Acer*:*pn*AspireSW5-012* sensor:modalias:acpi:INVN6500*:dmi:*svn*Acer*:*pn*AspireSW5-012*
ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1 ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1
sensor:modalias:acpi:BOSC0200*:dmi:*svnAcer*:*TP-SW5-017-17BU*
ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, -1
sensor:modalias:acpi:BMA250E*:dmi:*:svnAcer:pnIconiaW1-810:* sensor:modalias:acpi:BMA250E*:dmi:*:svnAcer:pnIconiaW1-810:*
ACCEL_MOUNT_MATRIX=1, 0, 0; 0, -1, 0; 0, 0, 1 ACCEL_MOUNT_MATRIX=1, 0, 0; 0, -1, 0; 0, 0, 1

View File

@ -6,16 +6,9 @@
local -a _networkctl_cmds local -a _networkctl_cmds
_networkctl_cmds=( _networkctl_cmds=(
'list:List existing links' 'list:List existing links'
'status:Show information about the specified links' 'status:Show information about the specified links'
'lldp:Show Link Layer Discovery Protocol status' 'lldp:Show Link Layer Discovery Protocol status'
'label:Show address labels' 'label:Show address labels'
'delete:Delete virtual netdevs'
'up:Bring devices up'
'down:Bring devices down'
'renew:Renew dynamic configurations'
'forcerenew:Trigger DHCP reconfiguration of all connected clients'
'reconfigure:Reconfigure interfaces'
'reload:Reload .network and .netdev files'
) )
if (( CURRENT == 1 )); then if (( CURRENT == 1 )); then
_describe -t commands 'networkctl command' _networkctl_cmds _describe -t commands 'networkctl command' _networkctl_cmds
@ -23,19 +16,16 @@
local curcontext="$curcontext" local curcontext="$curcontext"
local -a _links local -a _links
cmd="${${_networkctl_cmds[(r)$words[1]:*]%%:*}}" cmd="${${_networkctl_cmds[(r)$words[1]:*]%%:*}}"
case $cmd in if [ $cmd = "status" ]; then
(list|status|up|down|lldp|delete|renew|forcerenew|reconfigure) _links=( "${(foa)$(networkctl list --no-legend | awk 'BEGIN{OFS=":"} {sub(/[[ \t]+/, ""); print $2,$0}' 2>/dev/null)}" )
_links=( "${(foa)$(networkctl list --no-legend | awk 'BEGIN{OFS=":"} {sub(/[[ \t]+/, ""); print $2,$0}' 2>/dev/null)}" ) if [[ -n "$_links" ]]; then
if [[ -n "$_links" ]]; then _describe -t links 'links' _links
_describe -t links 'links' _links else
else _message "no links"
_message "no links" fi
fi else
;; _message "no more options"
*) fi
_message "no more options"
;;
esac
fi fi
} }

View File

@ -237,9 +237,6 @@ int ask_password_plymouth(
assert(ret); assert(ret);
if (!message)
message = "Password:";
if (flag_file) { if (flag_file) {
notify = inotify_init1(IN_CLOEXEC|IN_NONBLOCK); notify = inotify_init1(IN_CLOEXEC|IN_NONBLOCK);
if (notify < 0) if (notify < 0)

View File

@ -47,7 +47,7 @@ static enum {
ACTION_LIST, ACTION_LIST,
ACTION_QUERY, ACTION_QUERY,
ACTION_WATCH, ACTION_WATCH,
ACTION_WALL, ACTION_WALL
} arg_action = ACTION_QUERY; } arg_action = ACTION_QUERY;
static bool arg_plymouth = false; static bool arg_plymouth = false;
@ -143,7 +143,8 @@ static int agent_ask_password_tty(
const char *flag_file, const char *flag_file,
char ***ret) { char ***ret) {
int tty_fd = -1, r; int tty_fd = -1;
int r;
if (arg_console) { if (arg_console) {
const char *con = arg_device ?: "/dev/console"; const char *con = arg_device ?: "/dev/console";
@ -165,7 +166,7 @@ static int agent_ask_password_tty(
release_terminal(); release_terminal();
} }
return r; return 0;
} }
static int process_one_password_file(const char *filename) { static int process_one_password_file(const char *filename) {
@ -209,7 +210,7 @@ static int process_one_password_file(const char *filename) {
switch (arg_action) { switch (arg_action) {
case ACTION_LIST: case ACTION_LIST:
printf("'%s' (PID %u)\n", strna(message), pid); printf("'%s' (PID %u)\n", message, pid);
return 0; return 0;
case ACTION_WALL: { case ACTION_WALL: {
@ -218,7 +219,7 @@ static int process_one_password_file(const char *filename) {
if (asprintf(&wall, if (asprintf(&wall,
"Password entry required for \'%s\' (PID %u).\r\n" "Password entry required for \'%s\' (PID %u).\r\n"
"Please enter password with the systemd-tty-ask-password-agent tool.", "Please enter password with the systemd-tty-ask-password-agent tool.",
strna(message), message,
pid) < 0) pid) < 0)
return log_oom(); return log_oom();
@ -232,7 +233,7 @@ static int process_one_password_file(const char *filename) {
if (access(socket_name, W_OK) < 0) { if (access(socket_name, W_OK) < 0) {
if (arg_action == ACTION_QUERY) if (arg_action == ACTION_QUERY)
log_info("Not querying '%s' (PID %u), lacking privileges.", strna(message), pid); log_info("Not querying '%s' (PID %u), lacking privileges.", message, pid);
return 0; return 0;
} }
@ -245,6 +246,7 @@ static int process_one_password_file(const char *filename) {
r = ask_password_plymouth(message, not_after, flags, filename, &passwords); r = ask_password_plymouth(message, not_after, flags, filename, &passwords);
else else
r = agent_ask_password_tty(message, not_after, flags, filename, &passwords); r = agent_ask_password_tty(message, not_after, flags, filename, &passwords);
if (r < 0) { if (r < 0) {
/* If the query went away, that's OK */ /* If the query went away, that's OK */
if (IN_SET(r, -ETIME, -ENOENT)) if (IN_SET(r, -ETIME, -ENOENT))
@ -260,7 +262,8 @@ static int process_one_password_file(const char *filename) {
if (r < 0) if (r < 0)
return log_error_errno(r, "Failed to send: %m"); return log_error_errno(r, "Failed to send: %m");
break; break;
}} }
}
return 0; return 0;
} }
@ -710,7 +713,7 @@ static int run(int argc, char *argv[]) {
(void) release_terminal(); (void) release_terminal();
} }
return process_and_watch_password_files(!IN_SET(arg_action, ACTION_QUERY, ACTION_LIST)); return process_and_watch_password_files(arg_action != ACTION_QUERY);
} }
DEFINE_MAIN_FUNCTION(run); DEFINE_MAIN_FUNCTION(run);

View File

@ -2038,7 +2038,7 @@ static int udev_rule_apply_token_to_event(
} }
if (sd_device_get_devnum(dev, NULL) >= 0 && if (sd_device_get_devnum(dev, NULL) >= 0 &&
(sd_device_get_devname(dev, &val) < 0 || (sd_device_get_devname(dev, &val) < 0 ||
!streq_ptr(buf, path_startswith(val, "/dev/")))) { !streq_ptr(buf, startswith(val, "/dev/")))) {
log_rule_error(dev, rules, log_rule_error(dev, rules,
"Kernel device nodes cannot be renamed, ignoring NAME=\"%s\"; please fix it.", "Kernel device nodes cannot be renamed, ignoring NAME=\"%s\"; please fix it.",
token->value); token->value);

View File

@ -17,7 +17,6 @@
#include "device-private.h" #include "device-private.h"
#include "device-util.h" #include "device-util.h"
#include "libudev-util.h" #include "libudev-util.h"
#include "path-util.h"
#include "string-util.h" #include "string-util.h"
#include "strxcpyx.h" #include "strxcpyx.h"
#include "udev-builtin.h" #include "udev-builtin.h"
@ -91,7 +90,7 @@ static int parse_argv(int argc, char *argv[]) {
"syspath parameter missing."); "syspath parameter missing.");
/* add /sys if needed */ /* add /sys if needed */
if (!path_startswith(argv[optind], "/sys")) if (!startswith(argv[optind], "/sys"))
strscpyl(arg_syspath, sizeof(arg_syspath), "/sys", argv[optind], NULL); strscpyl(arg_syspath, sizeof(arg_syspath), "/sys", argv[optind], NULL);
else else
strscpy(arg_syspath, sizeof(arg_syspath), argv[optind]); strscpy(arg_syspath, sizeof(arg_syspath), argv[optind]);

0
test/testsuite-52.units/testsuite-52.service Normal file → Executable file
View File