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.)
This commit is contained in:
@@ -129,7 +129,7 @@ static char *base_device(const char *device)
|
||||
int len;
|
||||
#endif
|
||||
|
||||
cp = str = bb_xstrdup(device);
|
||||
cp = str = xstrdup(device);
|
||||
|
||||
/* Skip over /dev/; if it's not present, give up. */
|
||||
if (strncmp(cp, "/dev/", 5) != 0)
|
||||
@@ -544,7 +544,7 @@ static char *find_fsck(char *type)
|
||||
tpl = (strncmp(type, "fsck.", 5) ? "%s/fsck.%s" : "%s/%s");
|
||||
|
||||
for(s = strtok(p, ":"); s; s = strtok(NULL, ":")) {
|
||||
s = bb_xasprintf(tpl, s, type);
|
||||
s = xasprintf(tpl, s, type);
|
||||
if (stat(s, &st) == 0) break;
|
||||
free(s);
|
||||
}
|
||||
@@ -583,7 +583,7 @@ static int execute(const char *type, const char *device, const char *mntpt,
|
||||
return ENOMEM;
|
||||
memset(inst, 0, sizeof(struct fsck_instance));
|
||||
|
||||
prog = bb_xasprintf("fsck.%s", type);
|
||||
prog = xasprintf("fsck.%s", type);
|
||||
argv[0] = prog;
|
||||
argc = 1;
|
||||
|
||||
|
Reference in New Issue
Block a user