+ wrap things in B<> to make pod2man happy
[oweals/busybox.git] / init.c
diff --git a/init.c b/init.c
index d61d1c38eb214aa3dc00dde510447cedd820c281..e8a5f74d31782e3f6660a8613801198db02c6957 100644 (file)
--- a/init.c
+++ b/init.c
@@ -135,6 +135,8 @@ static void delete_initAction(initAction * action);
 
 /* Print a message to the specified device.
  * Device may be bitwise-or'd from LOG | CONSOLE */
+static void message(int device, char *fmt, ...)
+                  __attribute__ ((format (printf, 2, 3)));
 static void message(int device, char *fmt, ...)
 {
        va_list arguments;
@@ -469,8 +471,10 @@ static void check_memory()
                return;
 
        if (stat("/etc/fstab", &statBuf) == 0) {
+               /* swapon -a requires /proc typically */
+               waitfor("mount proc /proc -t proc", console, FALSE);
                /* Try to turn on swap */
-               system("/sbin/swapon -a");
+               waitfor("swapon -a", console, FALSE);
                if (check_free_memory() < 1000)
                        goto goodnight;
        } else