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