diff options
Diffstat (limited to 'meta/packages/busybox/busybox-1.01/udhcppidfile-breakage.patch')
-rw-r--r-- | meta/packages/busybox/busybox-1.01/udhcppidfile-breakage.patch | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/meta/packages/busybox/busybox-1.01/udhcppidfile-breakage.patch b/meta/packages/busybox/busybox-1.01/udhcppidfile-breakage.patch deleted file mode 100644 index 031274908b..0000000000 --- a/meta/packages/busybox/busybox-1.01/udhcppidfile-breakage.patch +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
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); | ||