aboutsummaryrefslogtreecommitdiff
path: root/e2fsprogs
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 /e2fsprogs
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 'e2fsprogs')
-rw-r--r--e2fsprogs/e2p/feature.c2
-rw-r--r--e2fsprogs/e2p/mntopts.c2
-rw-r--r--e2fsprogs/e2p/ostype.c2
-rw-r--r--e2fsprogs/fsck.c6
-rw-r--r--e2fsprogs/mke2fs.c4
-rw-r--r--e2fsprogs/util.c4
6 files changed, 10 insertions, 10 deletions
diff --git a/e2fsprogs/e2p/feature.c b/e2fsprogs/e2p/feature.c
index 602c2ff02..b45754f97 100644
--- a/e2fsprogs/e2p/feature.c
+++ b/e2fsprogs/e2p/feature.c
@@ -155,7 +155,7 @@ int e2p_edit_feature(const char *str, __u32 *compat_array, __u32 *ok_array)
155 unsigned int mask; 155 unsigned int mask;
156 int compat_type; 156 int compat_type;
157 157
158 buf = bb_xstrdup(str); 158 buf = xstrdup(str);
159 cp = buf; 159 cp = buf;
160 while (cp && *cp) { 160 while (cp && *cp) {
161 neg = 0; 161 neg = 0;
diff --git a/e2fsprogs/e2p/mntopts.c b/e2fsprogs/e2p/mntopts.c
index 1ec3402f7..17c26c480 100644
--- a/e2fsprogs/e2p/mntopts.c
+++ b/e2fsprogs/e2p/mntopts.c
@@ -100,7 +100,7 @@ int e2p_edit_mntopts(const char *str, __u32 *mntopts, __u32 ok)
100 int neg; 100 int neg;
101 unsigned int mask; 101 unsigned int mask;
102 102
103 buf = bb_xstrdup(str); 103 buf = xstrdup(str);
104 cp = buf; 104 cp = buf;
105 while (cp && *cp) { 105 while (cp && *cp) {
106 neg = 0; 106 neg = 0;
diff --git a/e2fsprogs/e2p/ostype.c b/e2fsprogs/e2p/ostype.c
index d55f98bb2..0e111d408 100644
--- a/e2fsprogs/e2p/ostype.c
+++ b/e2fsprogs/e2p/ostype.c
@@ -33,7 +33,7 @@ char *e2p_os2string(int os_type)
33 else 33 else
34 os = "(unknown os)"; 34 os = "(unknown os)";
35 35
36 ret = bb_xstrdup(os); 36 ret = xstrdup(os);
37 return ret; 37 return ret;
38} 38}
39 39
diff --git a/e2fsprogs/fsck.c b/e2fsprogs/fsck.c
index 3290d00ef..afb6f0c7d 100644
--- a/e2fsprogs/fsck.c
+++ b/e2fsprogs/fsck.c
@@ -129,7 +129,7 @@ static char *base_device(const char *device)
129 int len; 129 int len;
130#endif 130#endif
131 131
132 cp = str = bb_xstrdup(device); 132 cp = str = xstrdup(device);
133 133
134 /* Skip over /dev/; if it's not present, give up. */ 134 /* Skip over /dev/; if it's not present, give up. */
135 if (strncmp(cp, "/dev/", 5) != 0) 135 if (strncmp(cp, "/dev/", 5) != 0)
@@ -544,7 +544,7 @@ static char *find_fsck(char *type)
544 tpl = (strncmp(type, "fsck.", 5) ? "%s/fsck.%s" : "%s/%s"); 544 tpl = (strncmp(type, "fsck.", 5) ? "%s/fsck.%s" : "%s/%s");
545 545
546 for(s = strtok(p, ":"); s; s = strtok(NULL, ":")) { 546 for(s = strtok(p, ":"); s; s = strtok(NULL, ":")) {
547 s = bb_xasprintf(tpl, s, type); 547 s = xasprintf(tpl, s, type);
548 if (stat(s, &st) == 0) break; 548 if (stat(s, &st) == 0) break;
549 free(s); 549 free(s);
550 } 550 }
@@ -583,7 +583,7 @@ static int execute(const char *type, const char *device, const char *mntpt,
583 return ENOMEM; 583 return ENOMEM;
584 memset(inst, 0, sizeof(struct fsck_instance)); 584 memset(inst, 0, sizeof(struct fsck_instance));
585 585
586 prog = bb_xasprintf("fsck.%s", type); 586 prog = xasprintf("fsck.%s", type);
587 argv[0] = prog; 587 argv[0] = prog;
588 argc = 1; 588 argc = 1;
589 589
diff --git a/e2fsprogs/mke2fs.c b/e2fsprogs/mke2fs.c
index f1e40832d..ea6afb92c 100644
--- a/e2fsprogs/mke2fs.c
+++ b/e2fsprogs/mke2fs.c
@@ -226,7 +226,7 @@ static void read_bb_file(ext2_filsys fs, badblocks_list *bb_list,
226 FILE *f; 226 FILE *f;
227 errcode_t retval; 227 errcode_t retval;
228 228
229 f = bb_xfopen(bad_blocks_file, "r"); 229 f = xfopen(bad_blocks_file, "r");
230 retval = ext2fs_read_bb_FILE(fs, f, bb_list, invalid_block); 230 retval = ext2fs_read_bb_FILE(fs, f, bb_list, invalid_block);
231 fclose (f); 231 fclose (f);
232 mke2fs_error_msg_and_die(retval, "read bad blocks from list"); 232 mke2fs_error_msg_and_die(retval, "read bad blocks from list");
@@ -692,7 +692,7 @@ static void parse_extended_opts(struct ext2_super_block *sb_param,
692 char *buf, *token, *next, *p, *arg; 692 char *buf, *token, *next, *p, *arg;
693 int r_usage = 0; 693 int r_usage = 0;
694 694
695 buf = bb_xstrdup(opts); 695 buf = xstrdup(opts);
696 for (token = buf; token && *token; token = next) { 696 for (token = buf; token && *token; token = next) {
697 p = strchr(token, ','); 697 p = strchr(token, ',');
698 next = 0; 698 next = 0;
diff --git a/e2fsprogs/util.c b/e2fsprogs/util.c
index 6b72d0e0c..113ef9c8f 100644
--- a/e2fsprogs/util.c
+++ b/e2fsprogs/util.c
@@ -111,7 +111,7 @@ void parse_journal_opts(char **journal_device, int *journal_flags,
111{ 111{
112 char *buf, *token, *next, *p, *arg; 112 char *buf, *token, *next, *p, *arg;
113 int journal_usage = 0; 113 int journal_usage = 0;
114 buf = bb_xstrdup(opts); 114 buf = xstrdup(opts);
115 for (token = buf; token && *token; token = next) { 115 for (token = buf; token && *token; token = next) {
116 p = strchr(token, ','); 116 p = strchr(token, ',');
117 next = 0; 117 next = 0;
@@ -264,7 +264,7 @@ char *e2fs_set_sbin_path(void)
264 /* Update our PATH to include /sbin */ 264 /* Update our PATH to include /sbin */
265#define PATH_SET "/sbin" 265#define PATH_SET "/sbin"
266 if (oldpath) 266 if (oldpath)
267 oldpath = bb_xasprintf("%s:%s", PATH_SET, oldpath); 267 oldpath = xasprintf("%s:%s", PATH_SET, oldpath);
268 else 268 else
269 oldpath = PATH_SET; 269 oldpath = PATH_SET;
270 putenv (oldpath); 270 putenv (oldpath);