summaryrefslogtreecommitdiff
path: root/utility.c
diff options
context:
space:
mode:
authorEric Andersen1999-12-09 22:39:55 +0000
committerEric Andersen1999-12-09 22:39:55 +0000
commit6805d5d69e9c2be264e62cf53c86ca3e5a929d31 (patch)
tree2ab43322a4fc33782d322ef029d33a46f3e8c5dd /utility.c
parentf95ca97d1bb94307ee0b8ed95d329dc9d6ccec85 (diff)
downloadbusybox-6805d5d69e9c2be264e62cf53c86ca3e5a929d31.zip
busybox-6805d5d69e9c2be264e62cf53c86ca3e5a929d31.tar.gz
Adjustments for Johns init stuff,
-Erik
Diffstat (limited to 'utility.c')
-rw-r--r--utility.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/utility.c b/utility.c
index 42ee00c..74df632 100644
--- a/utility.c
+++ b/utility.c
@@ -1068,7 +1068,12 @@ extern long getNum (const char *cp)
}
#endif
-#if 1
+
+#if defined BB_INIT || defined BB_HALT || defined BB_REBOOT
+
+#if ! defined BB_FEATURE_USE_PROCFS
+#error Sorry, I depend on the /proc filesystem right now.
+#endif
/* findInitPid()
*
* This finds the pid of init (which is not always 1).
@@ -1095,7 +1100,7 @@ findInitPid()
fgets(buffer, 256, status);
fclose(status);
- if ( (strcmp(&buffer[6], "init\n") == 0)) {
+ if ( (strstr(buffer, "init\n") != NULL )) {
return init_pid;
}
}