diff options
author | Erik Andersen <andersen@codepoet.org> | 2000-02-23 22:49:58 +0000 |
---|---|---|
committer | Erik Andersen <andersen@codepoet.org> | 2000-02-23 22:49:58 +0000 |
commit | 5b911ddd577373dfcbd3d2dade7089ff611ea35e (patch) | |
tree | 85c5c3dc68f1cece663c3cf1ac960225c980e38c /utility.c | |
parent | dc75a739acefa740f91cf1642f730d5d1a0658ae (diff) | |
download | busybox-w32-5b911ddd577373dfcbd3d2dade7089ff611ea35e.tar.gz busybox-w32-5b911ddd577373dfcbd3d2dade7089ff611ea35e.tar.bz2 busybox-w32-5b911ddd577373dfcbd3d2dade7089ff611ea35e.zip |
Fixed rebooting when init runs as /linuxrc
-Erik
Diffstat (limited to '')
-rw-r--r-- | utility.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1193,7 +1193,7 @@ extern pid_t findInitPid() | |||
1193 | for (init_pid = 1; init_pid < 65536; init_pid++) { | 1193 | for (init_pid = 1; init_pid < 65536; init_pid++) { |
1194 | FILE *status; | 1194 | FILE *status; |
1195 | 1195 | ||
1196 | sprintf(filename, "/proc/%d/status", init_pid); | 1196 | sprintf(filename, "/proc/%d/cmdline", init_pid); |
1197 | status = fopen(filename, "r"); | 1197 | status = fopen(filename, "r"); |
1198 | if (!status) { | 1198 | if (!status) { |
1199 | continue; | 1199 | continue; |
@@ -1201,7 +1201,7 @@ extern pid_t findInitPid() | |||
1201 | fgets(buffer, 256, status); | 1201 | fgets(buffer, 256, status); |
1202 | fclose(status); | 1202 | fclose(status); |
1203 | 1203 | ||
1204 | if ((strstr(buffer, "init\n") != NULL)) { | 1204 | if ((strstr(buffer, "init") != NULL)) { |
1205 | return init_pid; | 1205 | return init_pid; |
1206 | } | 1206 | } |
1207 | } | 1207 | } |