diff options
Diffstat (limited to 'util-linux/mdev.c')
-rw-r--r-- | util-linux/mdev.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/util-linux/mdev.c b/util-linux/mdev.c index c77c122b5..7c1223dcb 100644 --- a/util-linux/mdev.c +++ b/util-linux/mdev.c | |||
@@ -10,10 +10,6 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include "busybox.h" | 12 | #include "busybox.h" |
13 | #include <ctype.h> | ||
14 | #include <errno.h> | ||
15 | #include <sys/mman.h> | ||
16 | #include <sys/sysmacros.h> | ||
17 | #include "xregex.h" | 13 | #include "xregex.h" |
18 | 14 | ||
19 | #define DEV_PATH "/dev" | 15 | #define DEV_PATH "/dev" |
@@ -146,7 +142,7 @@ static void make_device(char *path, int delete) | |||
146 | break; | 142 | break; |
147 | } | 143 | } |
148 | if ((s2-s+1) & (1<<delete)) | 144 | if ((s2-s+1) & (1<<delete)) |
149 | command = bb_xstrndup(pos, end-pos); | 145 | command = xstrndup(pos, end-pos); |
150 | } | 146 | } |
151 | 147 | ||
152 | pos = end2; | 148 | pos = end2; |
@@ -180,7 +176,7 @@ static void make_device(char *path, int delete) | |||
180 | int rc; | 176 | int rc; |
181 | char *s; | 177 | char *s; |
182 | 178 | ||
183 | s=bb_xasprintf("MDEV=%s",device_name); | 179 | s=xasprintf("MDEV=%s",device_name); |
184 | putenv(s); | 180 | putenv(s); |
185 | rc = system(command); | 181 | rc = system(command); |
186 | s[4]=0; | 182 | s[4]=0; |
@@ -232,7 +228,7 @@ int mdev_main(int argc, char *argv[]) | |||
232 | char *env_path; | 228 | char *env_path; |
233 | RESERVE_CONFIG_BUFFER(temp,PATH_MAX); | 229 | RESERVE_CONFIG_BUFFER(temp,PATH_MAX); |
234 | 230 | ||
235 | bb_xchdir(DEV_PATH); | 231 | xchdir(DEV_PATH); |
236 | 232 | ||
237 | /* Scan */ | 233 | /* Scan */ |
238 | 234 | ||