X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fremount-fs%2Fremount-fs.c;h=57b47021e4431526ec32c4b34c806d330f0d722a;hb=5f86c1f4c43ee9caa120d130e9b89d3fd25124c0;hp=e30c3443100517ba49d775114e2d253bb3956835;hpb=0a1beeb64207eaa88ab9236787b1cbc2f704ae14;p=elogind.git diff --git a/src/remount-fs/remount-fs.c b/src/remount-fs/remount-fs.c index e30c34431..57b47021e 100644 --- a/src/remount-fs/remount-fs.c +++ b/src/remount-fs/remount-fs.c @@ -60,7 +60,7 @@ int main(int argc, char *argv[]) { 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; } @@ -87,7 +87,7 @@ int main(int argc, char *argv[]) { pid = fork(); if (pid < 0) { - log_error("Failed to fork: %m"); + log_error_errno(errno, "Failed to fork: %m"); ret = EXIT_FAILURE; continue; } @@ -104,7 +104,7 @@ int main(int argc, char *argv[]) { 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); } @@ -120,7 +120,7 @@ int main(int argc, char *argv[]) { k = hashmap_put(pids, UINT_TO_PTR(pid), s); if (k < 0) { - log_error_errno(-k, "Failed to add PID to set: %m"); + log_error_errno(k, "Failed to add PID to set: %m"); ret = EXIT_FAILURE; continue; } @@ -135,7 +135,7 @@ int main(int argc, char *argv[]) { if (errno == EINTR) continue; - log_error("waitid() failed: %m"); + log_error_errno(errno, "waitid() failed: %m"); ret = EXIT_FAILURE; break; }