diff options
| author | Marcin Juszkiewicz <hrw@openembedded.org> | 2007-08-09 08:41:19 +0000 |
|---|---|---|
| committer | Marcin Juszkiewicz <hrw@openembedded.org> | 2007-08-09 08:41:19 +0000 |
| commit | 9d829ed05c295df608b4fc108eb1c628fd06fd39 (patch) | |
| tree | c1b27cfe4498f8abef1a61325922906f3e6a32ff /packages/busybox/busybox-static-1.2.1/udhcppidfile-breakage.patch | |
| parent | 1434b204e16e87b7f59f074f3036d5dcbcf0116f (diff) | |
| parent | 6ccac10beeaaa02a86081bd6179fd57c208ad6b1 (diff) | |
merge of '76e1e69496801009ea0aa69c84f76e858978ab99'
and 'db976a98427dd6a195e2cf167e225de2d0206aea'
Diffstat (limited to 'packages/busybox/busybox-static-1.2.1/udhcppidfile-breakage.patch')
| -rw-r--r-- | packages/busybox/busybox-static-1.2.1/udhcppidfile-breakage.patch | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/packages/busybox/busybox-static-1.2.1/udhcppidfile-breakage.patch b/packages/busybox/busybox-static-1.2.1/udhcppidfile-breakage.patch new file mode 100644 index 0000000000..031274908b --- /dev/null +++ b/packages/busybox/busybox-static-1.2.1/udhcppidfile-breakage.patch @@ -0,0 +1,57 @@ +--- busybox-1.00/networking/udhcp/common.c~udhcppidfile2 ++++ busybox-1.00/networking/udhcp/common.c +@@ -74,7 +74,7 @@ + + if (pid > 0) { + /* parent */ +- if (pidfile_reassign(pidfile, pid) < 0) { ++ if (pidfile != NULL && pidfile_reassign(pidfile, pid) < 0) { + (void)kill(pid, SIGKILL); + exit(1); + } else +@@ -119,7 +119,7 @@ + sanitize_fds(); + + /* do some other misc startup stuff while we are here to save bytes */ +- if (pidfile_acquire(pidfile) < 0) ++ if (pidfile != NULL && pidfile_acquire(pidfile) < 0) + exit(1); + + /* equivelent of doing a fflush after every \n */ +@@ -166,7 +166,7 @@ + sanitize_fds(); + + /* do some other misc startup stuff while we are here to save bytes */ +- if (pidfile_acquire(pidfile) < 0) ++ if (pidfile != NULL && pidfile_acquire(pidfile) < 0) + exit(1); + + /* equivelent of doing a fflush after every \n */ +--- busybox-1.00/networking/udhcp/pidfile.c~udhcppidfile2 ++++ busybox-1.00/networking/udhcp/pidfile.c +@@ -141,7 +141,11 @@ + int pidfile_acquire(const char *pidfile) + { + int fd, result; +- if (!pidfile) return (-1); ++ ++ if (pidfile == NULL) { ++ LOG(LOG_ERR, "pidfile_acquire: filename is NULL\n"); ++ return (-1); ++ } + + if ((fd = pidfile_open(pidfile)) < 0) + return (-1); +@@ -170,7 +174,11 @@ + int pidfile_reassign(const char *pidfile, int pid) + { + int fd, result; +- if (!pidfile) return (-1); ++ ++ if (pidfile == NULL) { ++ LOG(LOG_ERR, "pidfile_reassign: filename is NULL\n"); ++ return (-1); ++ } + + if ((fd = pidfile_open(pidfile)) < 0) + return (-1); |
