aboutsummaryrefslogtreecommitdiff
path: root/util-linux/mdev.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2006-08-03 15:41:12 +0000
committerRob Landley <rob@landley.net>2006-08-03 15:41:12 +0000
commitd921b2ecc0d294ad4bf8c7458fc52a60c28727d2 (patch)
treee4a2769349867c441cf2983d83097bb66701a733 /util-linux/mdev.c
parent6dce0b6fa79f2d4bb7e9d90e1fbc0f6beb25f855 (diff)
downloadbusybox-w32-d921b2ecc0d294ad4bf8c7458fc52a60c28727d2.tar.gz
busybox-w32-d921b2ecc0d294ad4bf8c7458fc52a60c28727d2.tar.bz2
busybox-w32-d921b2ecc0d294ad4bf8c7458fc52a60c28727d2.zip
Remove bb_ prefixes from xfuncs.c (and a few other places), consolidate
things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only had one user), clean up lots of #includes... General cleanup pass. What I've been doing for the last couple days. And it conflicts! I've removed httpd.c from this checkin due to somebody else touching that file. It builds for me. I have to catch a bus. (Now you know why I'm looking forward to Mercurial.)
Diffstat (limited to 'util-linux/mdev.c')
-rw-r--r--util-linux/mdev.c10
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