X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fremount-fs%2Fremount-fs.c;h=f432718d6b9148d615fda958a88f90f4790318c3;hb=0a20e3c10761378869af7bbef2733e3ae879d0f1;hp=35b71548a30d88a046424c779e495b58f504920f;hpb=2b93b027d3a68b5d7ae26d0c2cd487eb5019d2a9;p=elogind.git diff --git a/src/remount-fs/remount-fs.c b/src/remount-fs/remount-fs.c index 35b71548a..f432718d6 100644 --- a/src/remount-fs/remount-fs.c +++ b/src/remount-fs/remount-fs.c @@ -29,6 +29,7 @@ #include "log.h" #include "util.h" +#include "path-util.h" #include "set.h" #include "mount-setup.h" #include "exit-status.h" @@ -78,9 +79,10 @@ int main(int argc, char *argv[]) { int k; char *s; - /* Remount the root fs and all API VFS */ + /* Remount the root fs, /usr and all API VFS */ if (!mount_point_is_api(me->mnt_dir) && - !path_equal(me->mnt_dir, "/")) + !path_equal(me->mnt_dir, "/") && + !path_equal(me->mnt_dir, "/usr")) continue; log_debug("Remounting %s", me->mnt_dir); @@ -112,7 +114,7 @@ int main(int argc, char *argv[]) { s = strdup(me->mnt_dir); if (!s) { - log_error("Out of memory."); + log_oom(); ret = EXIT_FAILURE; continue; } @@ -127,10 +129,9 @@ int main(int argc, char *argv[]) { } while (!hashmap_isempty(pids)) { - siginfo_t si; + siginfo_t si = {}; char *s; - zero(si); if (waitid(P_ALL, 0, &si, WEXITED) < 0) { if (errno == EINTR) @@ -143,7 +144,7 @@ int main(int argc, char *argv[]) { s = hashmap_remove(pids, UINT_TO_PTR(si.si_pid)); if (s) { - if (!is_clean_exit(si.si_code, si.si_status)) { + if (!is_clean_exit(si.si_code, si.si_status, NULL)) { if (si.si_code == CLD_EXITED) log_error("/bin/mount for %s exited with exit status %i.", s, si.si_status); else