chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sd-rtnl: don't fail event handler when callback fails
[elogind.git]
/
src
/
remount-fs
/
remount-fs.c
diff --git
a/src/remount-fs/remount-fs.c
b/src/remount-fs/remount-fs.c
index 847637a12ca3988e9f3970e2407e4a82bc54570a..57b47021e4431526ec32c4b34c806d330f0d722a 100644
(file)
--- a/
src/remount-fs/remount-fs.c
+++ b/
src/remount-fs/remount-fs.c
@@
-60,11
+60,11
@@
int main(int argc, char *argv[]) {
if (errno == ENOENT)
return EXIT_SUCCESS;
if (errno == ENOENT)
return EXIT_SUCCESS;
- log_error
(
"Failed to open /etc/fstab: %m");
+ log_error
_errno(errno,
"Failed to open /etc/fstab: %m");
return EXIT_FAILURE;
}
return EXIT_FAILURE;
}
- pids = hashmap_new(
trivial_hash_func, trivial_compare_func
);
+ pids = hashmap_new(
NULL
);
if (!pids) {
log_error("Failed to allocate set");
goto finish;
if (!pids) {
log_error("Failed to allocate set");
goto finish;
@@
-87,7
+87,7
@@
int main(int argc, char *argv[]) {
pid = fork();
if (pid < 0) {
pid = fork();
if (pid < 0) {
- log_error
(
"Failed to fork: %m");
+ log_error
_errno(errno,
"Failed to fork: %m");
ret = EXIT_FAILURE;
continue;
}
ret = EXIT_FAILURE;
continue;
}
@@
-104,7
+104,7
@@
int main(int argc, char *argv[]) {
execv("/bin/mount", (char **) arguments);
execv("/bin/mount", (char **) arguments);
- log_error
(
"Failed to execute /bin/mount: %m");
+ log_error
_errno(errno,
"Failed to execute /bin/mount: %m");
_exit(EXIT_FAILURE);
}
_exit(EXIT_FAILURE);
}
@@
-120,7
+120,7
@@
int main(int argc, char *argv[]) {
k = hashmap_put(pids, UINT_TO_PTR(pid), s);
if (k < 0) {
k = hashmap_put(pids, UINT_TO_PTR(pid), s);
if (k < 0) {
- log_error
("Failed to add PID to set: %s", strerror(-k)
);
+ log_error
_errno(k, "Failed to add PID to set: %m"
);
ret = EXIT_FAILURE;
continue;
}
ret = EXIT_FAILURE;
continue;
}
@@
-135,7
+135,7
@@
int main(int argc, char *argv[]) {
if (errno == EINTR)
continue;
if (errno == EINTR)
continue;
- log_error
(
"waitid() failed: %m");
+ log_error
_errno(errno,
"waitid() failed: %m");
ret = EXIT_FAILURE;
break;
}
ret = EXIT_FAILURE;
break;
}