diff options
author | Eric Andersen | 2000-09-25 20:35:54 +0000 |
---|---|---|
committer | Eric Andersen | 2000-09-25 20:35:54 +0000 |
commit | c5949f62e533a821593337f7698d53eec8674bb1 (patch) | |
tree | ca31b61a1dc53734473418c53471e5cf71d05597 /applets | |
parent | e081eae7a469e0ddeebedd51c3d83bcbaccb23e3 (diff) | |
download | busybox-c5949f62e533a821593337f7698d53eec8674bb1.zip busybox-c5949f62e533a821593337f7698d53eec8674bb1.tar.gz |
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
Diffstat (limited to 'applets')
-rw-r--r-- | applets/busybox.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/applets/busybox.c b/applets/busybox.c index f923774..17a4c44 100644 --- a/applets/busybox.c +++ b/applets/busybox.c @@ -409,33 +409,26 @@ static char *busybox_fullpath() } /* 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; char command[256]; int i; - int rc = 0; + int rc; if (use_symbolic_links) Link = symlink; for (i = 0; applets[i].name != NULL; i++) { - sprintf ( - command, - "%s/%s", - install_dir[applets[i].location], - applets[i].name - ); -#if 1 - rc |= Link(busybox, command); -#else - puts(command); -#endif + sprintf ( command, "%s/%s", + install_dir[applets[i].location], + applets[i].name); + rc = Link(busybox, command); + if (rc) { errorMsg("%s: %s\n", command, strerror(errno)); } } - return rc; } #endif /* BB_FEATURE_INSTALLER */ |