|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From 41a451cc2901a5deb985aea4cc8de204a22e5612 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From: Lukas Nykryn <lnykryn@redhat.com>
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Date: Mon, 25 Aug 2014 15:29:50 +0200
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Subject: [PATCH] systemctl: fix broken list-unit-files with --root
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
This patch modifies unit_file_get_list which will now return
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
hashmap of structures where f->path is *without* root_dir prefix.
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
This change should be ok, because current code either does not use
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
root_dir at all or calls basename() on the f->path.
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
src/shared/install.c | 2 +-
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
diff --git a/src/shared/install.c b/src/shared/install.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
index 4b09a69456..a07d1dd315 100644
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
--- a/src/shared/install.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+++ b/src/shared/install.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
@@ -2099,7 +2099,7 @@ int unit_file_get_list(
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
if (!f)
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
return -ENOMEM;
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- f->path = path_make_absolute(de->d_name, units_dir);
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ f->path = path_make_absolute(de->d_name, *i);
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
if (!f->path)
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
return -ENOMEM;
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|