projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a454d24
)
install: when determining where default.target points to, accept a file instead of...
author
Lennart Poettering
<lennart@poettering.net>
Tue, 19 Nov 2013 20:02:16 +0000
(21:02 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Wed, 20 Nov 2013 18:37:02 +0000
(19:37 +0100)
src/shared/install.c
patch
|
blob
|
history
diff --git
a/src/shared/install.c
b/src/shared/install.c
index
881f715
..
2c119e2
100644
(file)
--- a/
src/shared/install.c
+++ b/
src/shared/install.c
@@
-1638,10
+1638,14
@@
int unit_file_get_default(
r = readlink_malloc(path, &tmp);
if (r == -ENOENT)
continue;
- if (r < 0)
+ else if (r == -EINVAL)
+ /* not a symlink */
+ n = strdup(SPECIAL_DEFAULT_TARGET);
+ else if (r < 0)
return r;
+ else
+ n = strdup(path_get_file_name(tmp));
- n = strdup(path_get_file_name(tmp));
if (!n)
return -ENOMEM;