aboutsummaryrefslogtreecommitdiff
path: root/e2fsprogs/fsck.c
diff options
context:
space:
mode:
author"Vladimir N. Oleynik" <dzo@simtreas.ru>2005-09-29 16:18:57 +0000
committer"Vladimir N. Oleynik" <dzo@simtreas.ru>2005-09-29 16:18:57 +0000
commit39a841cecf616098c9c8cf63bbfea5ea2922097c (patch)
tree5b3a1d569d1e952d8c43899050dca4d6c47bf176 /e2fsprogs/fsck.c
parent6a60c821a81b01a136037f8389bd42d86b37e395 (diff)
downloadbusybox-w32-39a841cecf616098c9c8cf63bbfea5ea2922097c.tar.gz
busybox-w32-39a841cecf616098c9c8cf63bbfea5ea2922097c.tar.bz2
busybox-w32-39a841cecf616098c9c8cf63bbfea5ea2922097c.zip
change interface to bb_xasprintf() - more perfect for me.
ln.c: error_msg(str)->error_msg(%s, str) - remove standart "feature" for hackers reduce 100 bytes don't care in sum
Diffstat (limited to 'e2fsprogs/fsck.c')
-rw-r--r--e2fsprogs/fsck.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/e2fsprogs/fsck.c b/e2fsprogs/fsck.c
index bb334e3dd..93514a391 100644
--- a/e2fsprogs/fsck.c
+++ b/e2fsprogs/fsck.c
@@ -363,7 +363,6 @@ static char *find_fsck(char *type)
363{ 363{
364 char *s; 364 char *s;
365 const char *tpl; 365 const char *tpl;
366 char *prog;
367 char *p = string_copy(fsck_path); 366 char *p = string_copy(fsck_path);
368 struct stat st; 367 struct stat st;
369 368
@@ -371,12 +370,12 @@ static char *find_fsck(char *type)
371 tpl = (strncmp(type, "fsck.", 5) ? "%s/fsck.%s" : "%s/%s"); 370 tpl = (strncmp(type, "fsck.", 5) ? "%s/fsck.%s" : "%s/%s");
372 371
373 for(s = strtok(p, ":"); s; s = strtok(NULL, ":")) { 372 for(s = strtok(p, ":"); s; s = strtok(NULL, ":")) {
374 bb_xasprintf(&prog, tpl, s, type); 373 s = bb_xasprintf(tpl, s, type);
375 if (stat(prog, &st) == 0) break; 374 if (stat(s, &st) == 0) break;
376 free(prog); 375 free(s);
377 } 376 }
378 free(p); 377 free(p);
379 return(s ? prog : NULL); 378 return(s);
380} 379}
381 380
382static int progress_active(void) 381static int progress_active(void)
@@ -410,7 +409,7 @@ static int execute(const char *type, const char *device, const char *mntpt,
410 return ENOMEM; 409 return ENOMEM;
411 memset(inst, 0, sizeof(struct fsck_instance)); 410 memset(inst, 0, sizeof(struct fsck_instance));
412 411
413 bb_xasprintf(&prog, "fsck.%s", type); 412 prog = bb_xasprintf("fsck.%s", type);
414 argv[0] = prog; 413 argv[0] = prog;
415 argc = 1; 414 argc = 1;
416 415
@@ -1189,7 +1188,7 @@ int fsck_main(int argc, char *argv[])
1189 1188
1190 /* Update our search path to include uncommon directories. */ 1189 /* Update our search path to include uncommon directories. */
1191 if (oldpath) { 1190 if (oldpath) {
1192 bb_xasprintf(&fsck_path, "%s:%s", fsck_prefix_path, oldpath); 1191 fsck_path = bb_xasprintf("%s:%s", fsck_prefix_path, oldpath);
1193 } else { 1192 } else {
1194 fsck_path = string_copy(fsck_prefix_path); 1193 fsck_path = string_copy(fsck_prefix_path);
1195 } 1194 }