diff options
author | Richard Purdie <richard@openedhand.com> | 2006-05-09 17:44:12 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2006-05-09 17:44:12 +0000 |
commit | c4aeea061cef9be1956614b2654e1a7a0150b895 (patch) | |
tree | c946daa5fbd2ff9618d6abcdea47dfdce04bfe8a /openembedded/packages/busybox/busybox-1.01/udhcppidfile-breakage.patch | |
parent | d097b90ed729456b685e457c99ac9c64f96e214c (diff) | |
download | poky-c4aeea061cef9be1956614b2654e1a7a0150b895.tar.gz |
busybox 1.00 -> 1.01
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@384 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'openembedded/packages/busybox/busybox-1.01/udhcppidfile-breakage.patch')
-rw-r--r-- | openembedded/packages/busybox/busybox-1.01/udhcppidfile-breakage.patch | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/openembedded/packages/busybox/busybox-1.01/udhcppidfile-breakage.patch b/openembedded/packages/busybox/busybox-1.01/udhcppidfile-breakage.patch new file mode 100644 index 0000000000..031274908b --- /dev/null +++ b/openembedded/packages/busybox/busybox-1.01/udhcppidfile-breakage.patch | |||
@@ -0,0 +1,57 @@ | |||
1 | --- busybox-1.00/networking/udhcp/common.c~udhcppidfile2 | ||
2 | +++ busybox-1.00/networking/udhcp/common.c | ||
3 | @@ -74,7 +74,7 @@ | ||
4 | |||
5 | if (pid > 0) { | ||
6 | /* parent */ | ||
7 | - if (pidfile_reassign(pidfile, pid) < 0) { | ||
8 | + if (pidfile != NULL && pidfile_reassign(pidfile, pid) < 0) { | ||
9 | (void)kill(pid, SIGKILL); | ||
10 | exit(1); | ||
11 | } else | ||
12 | @@ -119,7 +119,7 @@ | ||
13 | sanitize_fds(); | ||
14 | |||
15 | /* do some other misc startup stuff while we are here to save bytes */ | ||
16 | - if (pidfile_acquire(pidfile) < 0) | ||
17 | + if (pidfile != NULL && pidfile_acquire(pidfile) < 0) | ||
18 | exit(1); | ||
19 | |||
20 | /* equivelent of doing a fflush after every \n */ | ||
21 | @@ -166,7 +166,7 @@ | ||
22 | sanitize_fds(); | ||
23 | |||
24 | /* do some other misc startup stuff while we are here to save bytes */ | ||
25 | - if (pidfile_acquire(pidfile) < 0) | ||
26 | + if (pidfile != NULL && pidfile_acquire(pidfile) < 0) | ||
27 | exit(1); | ||
28 | |||
29 | /* equivelent of doing a fflush after every \n */ | ||
30 | --- busybox-1.00/networking/udhcp/pidfile.c~udhcppidfile2 | ||
31 | +++ busybox-1.00/networking/udhcp/pidfile.c | ||
32 | @@ -141,7 +141,11 @@ | ||
33 | int pidfile_acquire(const char *pidfile) | ||
34 | { | ||
35 | int fd, result; | ||
36 | - if (!pidfile) return (-1); | ||
37 | + | ||
38 | + if (pidfile == NULL) { | ||
39 | + LOG(LOG_ERR, "pidfile_acquire: filename is NULL\n"); | ||
40 | + return (-1); | ||
41 | + } | ||
42 | |||
43 | if ((fd = pidfile_open(pidfile)) < 0) | ||
44 | return (-1); | ||
45 | @@ -170,7 +174,11 @@ | ||
46 | int pidfile_reassign(const char *pidfile, int pid) | ||
47 | { | ||
48 | int fd, result; | ||
49 | - if (!pidfile) return (-1); | ||
50 | + | ||
51 | + if (pidfile == NULL) { | ||
52 | + LOG(LOG_ERR, "pidfile_reassign: filename is NULL\n"); | ||
53 | + return (-1); | ||
54 | + } | ||
55 | |||
56 | if ((fd = pidfile_open(pidfile)) < 0) | ||
57 | return (-1); | ||