chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
networkd: netdev - log when loading a .netdev file
[elogind.git]
/
src
/
shared
/
install.c
diff --git
a/src/shared/install.c
b/src/shared/install.c
index 74090463d9547a0fff77248382f13c51ef8518b4..acfba25b245e9b8e89ccb0ba89b8f0813e43beb1 100644
(file)
--- a/
src/shared/install.c
+++ b/
src/shared/install.c
@@
-1170,7
+1170,9
@@
static int create_symlink(
if (!force)
return -EEXIST;
if (!force)
return -EEXIST;
- unlink(new_path);
+ r = unlink(new_path);
+ if (r < 0 && errno != ENOENT)
+ return -errno;
if (symlink(old_path, new_path) >= 0) {
add_file_change(changes, n_changes, UNIT_FILE_UNLINK, new_path, NULL);
if (symlink(old_path, new_path) >= 0) {
add_file_change(changes, n_changes, UNIT_FILE_UNLINK, new_path, NULL);
@@
-1492,8
+1494,8
@@
int unit_file_enable(
supposed to be created, not the ones actually created. This is
useful to determine whether the passed files had any
installation data at all. */
supposed to be created, not the ones actually created. This is
useful to determine whether the passed files had any
installation data at all. */
- r = install_context_apply(&c, &paths, config_path, root_dir, force, changes, n_changes);
- return
r
;
+
+ return
install_context_apply(&c, &paths, config_path, root_dir, force, changes, n_changes)
;
}
int unit_file_disable(
}
int unit_file_disable(