chiark / gitweb /
util: introduce waitpid_loop()
[elogind.git] / src / kmod-setup.c
index 6ac0c9ff8dd95d0da9debd85a9d3203a8b260505..0bcad3ceb487377db0a4458e799c4381c01ae6d7 100644 (file)
@@ -48,9 +48,9 @@ int kmod_setup(void) {
                 if (access(kmod_table[i+1], F_OK) >= 0)
                         continue;
 
-                log_info("Your kernel apparently lacks built-in %s support. Please fix that. "
-                         "We'll now try to work around this by calling '/sbin/modprobe %s'...",
-                         kmod_table[i], kmod_table[i]);
+                log_debug("Your kernel apparently lacks built-in %s support. Might be a good idea to compile it in. "
+                          "We'll now try to work around this by calling '/sbin/modprobe %s'...",
+                          kmod_table[i], kmod_table[i]);
 
                 cmdline[3 + n++] = kmod_table[i];
         }
@@ -76,17 +76,8 @@ int kmod_setup(void) {
         if (r < 0)
                 return r;
 
-        for (;;) {
-                if (waitpid(pid, &status, 0) < 0) {
-
-                        if (errno == EINTR)
-                                continue;
-
-                        return -errno;
-                }
-
-                break;
-        }
+        if ((r = waitpid_loop(pid, &status)) < 0)
+                return -errno;
 
         if (WIFEXITED(status)) {
                 if (WEXITSTATUS(status) != 0) {