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
This commit is contained in:
Eric Andersen 2000-09-25 20:35:54 +00:00
parent e081eae7a4
commit c5949f62e5
2 changed files with 14 additions and 28 deletions

View File

@ -409,33 +409,26 @@ static char *busybox_fullpath()
} }
/* create (sym)links for each applet */ /* create (sym)links for each applet */
static int install_links(const char *busybox, int use_symbolic_links) static void install_links(const char *busybox, int use_symbolic_links)
{ {
__link_f Link = link; __link_f Link = link;
char command[256]; char command[256];
int i; int i;
int rc = 0; int rc;
if (use_symbolic_links) Link = symlink; if (use_symbolic_links) Link = symlink;
for (i = 0; applets[i].name != NULL; i++) { for (i = 0; applets[i].name != NULL; i++) {
sprintf ( sprintf ( command, "%s/%s",
command, install_dir[applets[i].location],
"%s/%s", applets[i].name);
install_dir[applets[i].location], rc = Link(busybox, command);
applets[i].name
);
#if 1
rc |= Link(busybox, command);
#else
puts(command);
#endif
if (rc) { if (rc) {
errorMsg("%s: %s\n", command, strerror(errno)); errorMsg("%s: %s\n", command, strerror(errno));
} }
} }
return rc;
} }
#endif /* BB_FEATURE_INSTALLER */ #endif /* BB_FEATURE_INSTALLER */

View File

@ -409,33 +409,26 @@ static char *busybox_fullpath()
} }
/* create (sym)links for each applet */ /* create (sym)links for each applet */
static int install_links(const char *busybox, int use_symbolic_links) static void install_links(const char *busybox, int use_symbolic_links)
{ {
__link_f Link = link; __link_f Link = link;
char command[256]; char command[256];
int i; int i;
int rc = 0; int rc;
if (use_symbolic_links) Link = symlink; if (use_symbolic_links) Link = symlink;
for (i = 0; applets[i].name != NULL; i++) { for (i = 0; applets[i].name != NULL; i++) {
sprintf ( sprintf ( command, "%s/%s",
command, install_dir[applets[i].location],
"%s/%s", applets[i].name);
install_dir[applets[i].location], rc = Link(busybox, command);
applets[i].name
);
#if 1
rc |= Link(busybox, command);
#else
puts(command);
#endif
if (rc) { if (rc) {
errorMsg("%s: %s\n", command, strerror(errno)); errorMsg("%s: %s\n", command, strerror(errno));
} }
} }
return rc;
} }
#endif /* BB_FEATURE_INSTALLER */ #endif /* BB_FEATURE_INSTALLER */