Three follow-ups for recent changes (#39724)
This commit is contained in:
@@ -68,6 +68,7 @@ int efi_get_variable(
|
||||
|
||||
if (fstat(fd, &st) < 0)
|
||||
return log_debug_errno(errno, "fstat(\"%s\") failed: %m", p);
|
||||
|
||||
r = stat_verify_regular(&st);
|
||||
if (r < 0)
|
||||
return log_debug_errno(r, "EFI variable '%s' is not a regular file, refusing: %m", p);
|
||||
|
||||
@@ -866,6 +866,10 @@ static int parse_argv(int argc, char *argv[]) {
|
||||
"--wait may not be combined with --scope.");
|
||||
}
|
||||
|
||||
if (arg_scope && arg_root_directory)
|
||||
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
|
||||
"--root-directory= is not supported in --scope mode.");
|
||||
|
||||
if (same_dir && arg_root_directory && !path_equal(arg_root_directory, "/"))
|
||||
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
|
||||
"--same-dir cannot be used with a root directory other than '/'");
|
||||
|
||||
@@ -114,8 +114,6 @@ static int bus_set_address(
|
||||
const char *bus_path,
|
||||
RuntimeScope runtime_scope) {
|
||||
|
||||
int r;
|
||||
|
||||
assert(bus);
|
||||
|
||||
switch (transport) {
|
||||
@@ -143,8 +141,6 @@ static int bus_set_address(
|
||||
default:
|
||||
assert_not_reached();
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
static int run(int argc, char *argv[]) {
|
||||
|
||||
Reference in New Issue
Block a user