forked from mirrors/nixpkgs
31 lines
987 B
Diff
31 lines
987 B
Diff
From 2b0a9106d3aabb365af0cc34b595a1e697120f37 Mon Sep 17 00:00:00 2001
|
|
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
|
|
Date: Tue, 8 Jan 2013 15:45:01 +0100
|
|
Subject: [PATCH 2/6] Ignore duplicate paths in "systemctl start"
|
|
|
|
---
|
|
src/systemctl/systemctl.c | 7 +++++--
|
|
1 file changed, 5 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
|
|
index 2ebfff8..9f99df5 100644
|
|
--- a/src/systemctl/systemctl.c
|
|
+++ b/src/systemctl/systemctl.c
|
|
@@ -1591,8 +1591,11 @@ static int start_unit_one(
|
|
|
|
r = set_put(s, p);
|
|
if (r < 0) {
|
|
- log_error("Failed to add path to set.");
|
|
- return r;
|
|
+ free(p);
|
|
+ if (r != -EEXIST) {
|
|
+ log_error("Failed to add path %s to set.", p);
|
|
+ return r;
|
|
+ }
|
|
}
|
|
|
|
p = NULL;
|
|
--
|
|
1.8.0.1
|
|
|