]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
systemctl: fix --root support in querying presets
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 30 Apr 2020 16:45:08 +0000 (18:45 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 5 May 2020 16:05:32 +0000 (18:05 +0200)
We would always look on the host, ignoring --root.

src/systemctl/systemctl.c

index 077609f4de6b56b9d2b9a4169d8d820eb15668ac..3653e5c81bdf50c4ad4742c697c7b9b89977d188 100644 (file)
@@ -1478,7 +1478,7 @@ static int output_unit_file_list(const UnitFileList *units, unsigned c) {
 
                 id = basename(u->path);
 
-                r = unit_file_query_preset(arg_scope, NULL, id);
+                r = unit_file_query_preset(arg_scope, arg_root, id);
                 if (r < 0) {
                         unit_preset_str = "n/a";
                         on_preset_color = underline ? on_underline : ansi_normal();