aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2000-09-25 20:35:54 +0000
committerEric Andersen <andersen@codepoet.org>2000-09-25 20:35:54 +0000
commitc5949f62e533a821593337f7698d53eec8674bb1 (patch)
treeca31b61a1dc53734473418c53471e5cf71d05597
parente081eae7a469e0ddeebedd51c3d83bcbaccb23e3 (diff)
downloadbusybox-w32-c5949f62e533a821593337f7698d53eec8674bb1.tar.gz
busybox-w32-c5949f62e533a821593337f7698d53eec8674bb1.tar.bz2
busybox-w32-c5949f62e533a821593337f7698d53eec8674bb1.zip
Fix from Matt Kraai for the to the "busybox --install prints out on STDERR
"File already exists" messages for all files (including the ones that DON'T exist)" problem reported by "Bruno L. F. Cabral" <bruno@openline.com.br>. Thanks Matt! -Erik
-rw-r--r--applets/busybox.c21
-rw-r--r--busybox.c21
2 files changed, 14 insertions, 28 deletions
diff --git a/applets/busybox.c b/applets/busybox.c
index f9237744c..17a4c447a 100644
--- a/applets/busybox.c
+++ b/applets/busybox.c
@@ -409,33 +409,26 @@ static char *busybox_fullpath()
409} 409}
410 410
411/* create (sym)links for each applet */ 411/* create (sym)links for each applet */
412static int install_links(const char *busybox, int use_symbolic_links) 412static void install_links(const char *busybox, int use_symbolic_links)
413{ 413{
414 __link_f Link = link; 414 __link_f Link = link;
415 415
416 char command[256]; 416 char command[256];
417 int i; 417 int i;
418 int rc = 0; 418 int rc;
419 419
420 if (use_symbolic_links) Link = symlink; 420 if (use_symbolic_links) Link = symlink;
421 421
422 for (i = 0; applets[i].name != NULL; i++) { 422 for (i = 0; applets[i].name != NULL; i++) {
423 sprintf ( 423 sprintf ( command, "%s/%s",
424 command, 424 install_dir[applets[i].location],
425 "%s/%s", 425 applets[i].name);
426 install_dir[applets[i].location], 426 rc = Link(busybox, command);
427 applets[i].name 427
428 );
429#if 1
430 rc |= Link(busybox, command);
431#else
432 puts(command);
433#endif
434 if (rc) { 428 if (rc) {
435 errorMsg("%s: %s\n", command, strerror(errno)); 429 errorMsg("%s: %s\n", command, strerror(errno));
436 } 430 }
437 } 431 }
438 return rc;
439} 432}
440 433
441#endif /* BB_FEATURE_INSTALLER */ 434#endif /* BB_FEATURE_INSTALLER */
diff --git a/busybox.c b/busybox.c
index f9237744c..17a4c447a 100644
--- a/busybox.c
+++ b/busybox.c
@@ -409,33 +409,26 @@ static char *busybox_fullpath()
409} 409}
410 410
411/* create (sym)links for each applet */ 411/* create (sym)links for each applet */
412static int install_links(const char *busybox, int use_symbolic_links) 412static void install_links(const char *busybox, int use_symbolic_links)
413{ 413{
414 __link_f Link = link; 414 __link_f Link = link;
415 415
416 char command[256]; 416 char command[256];
417 int i; 417 int i;
418 int rc = 0; 418 int rc;
419 419
420 if (use_symbolic_links) Link = symlink; 420 if (use_symbolic_links) Link = symlink;
421 421
422 for (i = 0; applets[i].name != NULL; i++) { 422 for (i = 0; applets[i].name != NULL; i++) {
423 sprintf ( 423 sprintf ( command, "%s/%s",
424 command, 424 install_dir[applets[i].location],
425 "%s/%s", 425 applets[i].name);
426 install_dir[applets[i].location], 426 rc = Link(busybox, command);
427 applets[i].name 427
428 );
429#if 1
430 rc |= Link(busybox, command);
431#else
432 puts(command);
433#endif
434 if (rc) { 428 if (rc) {
435 errorMsg("%s: %s\n", command, strerror(errno)); 429 errorMsg("%s: %s\n", command, strerror(errno));
436 } 430 }
437 } 431 }
438 return rc;
439} 432}
440 433
441#endif /* BB_FEATURE_INSTALLER */ 434#endif /* BB_FEATURE_INSTALLER */