Compare commits
10 Commits
e8607daf7d
...
ac741c10e2
Author | SHA1 | Date |
---|---|---|
Michael Biebl | ac741c10e2 | |
Zbigniew Jędrzejewski-Szmek | 67165f7630 | |
Njibhu | c7300fa44f | |
Zbigniew Jędrzejewski-Szmek | baeec61b2c | |
Olivier Le Moal | 50574ed1ac | |
Lennart Poettering | 25f3b27270 | |
Lennart Poettering | a4fd6cd3f5 | |
Lennart Poettering | 66bff73b4f | |
Lennart Poettering | 4c4a018cab | |
Olivier Le Moal | 6ff45bc1a1 |
|
@ -78,6 +78,9 @@ sensor:modalias:acpi:INVN6500*:dmi:*svn*Acer*:*pn*AspireSW5-011*
|
|||
sensor:modalias:acpi:INVN6500*:dmi:*svn*Acer*:*pn*AspireSW5-012*
|
||||
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:*
|
||||
ACCEL_MOUNT_MATRIX=1, 0, 0; 0, -1, 0; 0, 0, 1
|
||||
|
||||
|
|
|
@ -9,6 +9,13 @@
|
|||
'status:Show information about the specified links'
|
||||
'lldp:Show Link Layer Discovery Protocol status'
|
||||
'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
|
||||
_describe -t commands 'networkctl command' _networkctl_cmds
|
||||
|
@ -16,16 +23,19 @@
|
|||
local curcontext="$curcontext"
|
||||
local -a _links
|
||||
cmd="${${_networkctl_cmds[(r)$words[1]:*]%%:*}}"
|
||||
if [ $cmd = "status" ]; then
|
||||
case $cmd in
|
||||
(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)}" )
|
||||
if [[ -n "$_links" ]]; then
|
||||
_describe -t links 'links' _links
|
||||
else
|
||||
_message "no links"
|
||||
fi
|
||||
else
|
||||
;;
|
||||
*)
|
||||
_message "no more options"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
@ -237,6 +237,9 @@ int ask_password_plymouth(
|
|||
|
||||
assert(ret);
|
||||
|
||||
if (!message)
|
||||
message = "Password:";
|
||||
|
||||
if (flag_file) {
|
||||
notify = inotify_init1(IN_CLOEXEC|IN_NONBLOCK);
|
||||
if (notify < 0)
|
||||
|
|
|
@ -47,7 +47,7 @@ static enum {
|
|||
ACTION_LIST,
|
||||
ACTION_QUERY,
|
||||
ACTION_WATCH,
|
||||
ACTION_WALL
|
||||
ACTION_WALL,
|
||||
} arg_action = ACTION_QUERY;
|
||||
|
||||
static bool arg_plymouth = false;
|
||||
|
@ -143,8 +143,7 @@ static int agent_ask_password_tty(
|
|||
const char *flag_file,
|
||||
char ***ret) {
|
||||
|
||||
int tty_fd = -1;
|
||||
int r;
|
||||
int tty_fd = -1, r;
|
||||
|
||||
if (arg_console) {
|
||||
const char *con = arg_device ?: "/dev/console";
|
||||
|
@ -166,7 +165,7 @@ static int agent_ask_password_tty(
|
|||
release_terminal();
|
||||
}
|
||||
|
||||
return 0;
|
||||
return r;
|
||||
}
|
||||
|
||||
static int process_one_password_file(const char *filename) {
|
||||
|
@ -210,7 +209,7 @@ static int process_one_password_file(const char *filename) {
|
|||
|
||||
switch (arg_action) {
|
||||
case ACTION_LIST:
|
||||
printf("'%s' (PID %u)\n", message, pid);
|
||||
printf("'%s' (PID %u)\n", strna(message), pid);
|
||||
return 0;
|
||||
|
||||
case ACTION_WALL: {
|
||||
|
@ -219,7 +218,7 @@ static int process_one_password_file(const char *filename) {
|
|||
if (asprintf(&wall,
|
||||
"Password entry required for \'%s\' (PID %u).\r\n"
|
||||
"Please enter password with the systemd-tty-ask-password-agent tool.",
|
||||
message,
|
||||
strna(message),
|
||||
pid) < 0)
|
||||
return log_oom();
|
||||
|
||||
|
@ -233,7 +232,7 @@ static int process_one_password_file(const char *filename) {
|
|||
|
||||
if (access(socket_name, W_OK) < 0) {
|
||||
if (arg_action == ACTION_QUERY)
|
||||
log_info("Not querying '%s' (PID %u), lacking privileges.", message, pid);
|
||||
log_info("Not querying '%s' (PID %u), lacking privileges.", strna(message), pid);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -246,7 +245,6 @@ static int process_one_password_file(const char *filename) {
|
|||
r = ask_password_plymouth(message, not_after, flags, filename, &passwords);
|
||||
else
|
||||
r = agent_ask_password_tty(message, not_after, flags, filename, &passwords);
|
||||
|
||||
if (r < 0) {
|
||||
/* If the query went away, that's OK */
|
||||
if (IN_SET(r, -ETIME, -ENOENT))
|
||||
|
@ -262,8 +260,7 @@ static int process_one_password_file(const char *filename) {
|
|||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to send: %m");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -713,7 +710,7 @@ static int run(int argc, char *argv[]) {
|
|||
(void) release_terminal();
|
||||
}
|
||||
|
||||
return process_and_watch_password_files(arg_action != ACTION_QUERY);
|
||||
return process_and_watch_password_files(!IN_SET(arg_action, ACTION_QUERY, ACTION_LIST));
|
||||
}
|
||||
|
||||
DEFINE_MAIN_FUNCTION(run);
|
||||
|
|
|
@ -2038,7 +2038,7 @@ static int udev_rule_apply_token_to_event(
|
|||
}
|
||||
if (sd_device_get_devnum(dev, NULL) >= 0 &&
|
||||
(sd_device_get_devname(dev, &val) < 0 ||
|
||||
!streq_ptr(buf, startswith(val, "/dev/")))) {
|
||||
!streq_ptr(buf, path_startswith(val, "/dev/")))) {
|
||||
log_rule_error(dev, rules,
|
||||
"Kernel device nodes cannot be renamed, ignoring NAME=\"%s\"; please fix it.",
|
||||
token->value);
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "device-private.h"
|
||||
#include "device-util.h"
|
||||
#include "libudev-util.h"
|
||||
#include "path-util.h"
|
||||
#include "string-util.h"
|
||||
#include "strxcpyx.h"
|
||||
#include "udev-builtin.h"
|
||||
|
@ -90,7 +91,7 @@ static int parse_argv(int argc, char *argv[]) {
|
|||
"syspath parameter missing.");
|
||||
|
||||
/* add /sys if needed */
|
||||
if (!startswith(argv[optind], "/sys"))
|
||||
if (!path_startswith(argv[optind], "/sys"))
|
||||
strscpyl(arg_syspath, sizeof(arg_syspath), "/sys", argv[optind], NULL);
|
||||
else
|
||||
strscpy(arg_syspath, sizeof(arg_syspath), argv[optind]);
|
||||
|
|
Loading…
Reference in New Issue