sysext: fix --root= support
when provided `--root=` was failing for `status`: ``` $ systemd-sysext --root=/mnt status Failed to open '/usr/.systemd-sysext/extensions': No such file or directory ``` path was not relative to the given `--root` - same goes for the `need_reload` as it was inspired from the `verb_status` section. Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
This commit is contained in:
+2
-2
@@ -180,7 +180,7 @@ static int need_reload(void) {
|
||||
if (!r)
|
||||
continue;
|
||||
|
||||
f = path_join(*p, image_class_info[arg_image_class].dot_directory_name, image_class_info[arg_image_class].short_identifier_plural);
|
||||
f = path_join(resolved, image_class_info[arg_image_class].dot_directory_name, image_class_info[arg_image_class].short_identifier_plural);
|
||||
if (!f)
|
||||
return log_oom();
|
||||
|
||||
@@ -348,7 +348,7 @@ static int verb_status(int argc, char **argv, void *userdata) {
|
||||
continue;
|
||||
}
|
||||
|
||||
f = path_join(*p, image_class_info[arg_image_class].dot_directory_name, image_class_info[arg_image_class].short_identifier_plural);
|
||||
f = path_join(resolved, image_class_info[arg_image_class].dot_directory_name, image_class_info[arg_image_class].short_identifier_plural);
|
||||
if (!f)
|
||||
return log_oom();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user