chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
headers: fix git URLs for source files
[elogind.git]
/
src
/
install.c
diff --git
a/src/install.c
b/src/install.c
index 53dd26fd7f2f75998940fd49ed7239958802b83f..1fb1f9d5800e7fc3ccad1b6c222be0058bfdbd18 100644
(file)
--- a/
src/install.c
+++ b/
src/install.c
@@
-72,9
+72,8
@@
static int get_config_path(UnitFileScope scope, bool runtime, const char *root_d
case UNIT_FILE_SYSTEM:
if (root_dir && runtime)
case UNIT_FILE_SYSTEM:
if (root_dir && runtime)
- return -EINVAL;
-
- if (runtime)
+ asprintf(&p, "%s/run/systemd/system", root_dir);
+ else if (runtime)
p = strdup("/run/systemd/system");
else if (root_dir)
asprintf(&p, "%s/%s", root_dir, SYSTEM_CONFIG_UNIT_PATH);
p = strdup("/run/systemd/system");
else if (root_dir)
asprintf(&p, "%s/%s", root_dir, SYSTEM_CONFIG_UNIT_PATH);
@@
-1904,7
+1903,7
@@
int unit_file_get_list(
} else if (r > 0) {
f->state = UNIT_FILE_DISABLED;
goto found;
} else if (r > 0) {
f->state = UNIT_FILE_DISABLED;
goto found;
- } else
if (r == 0)
{
+ } else {
f->state = UNIT_FILE_STATIC;
goto found;
}
f->state = UNIT_FILE_STATIC;
goto found;
}