Fix from Matt Kraai for the to the "busybox --install prints out on STDERR
authorEric Andersen <andersen@codepoet.org>
Mon, 25 Sep 2000 20:35:54 +0000 (20:35 -0000)
committerEric Andersen <andersen@codepoet.org>
Mon, 25 Sep 2000 20:35:54 +0000 (20:35 -0000)
"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

applets/busybox.c
busybox.c

index f9237744c5f305d7dd6d221cb95a937b0c077d3a..17a4c447a849ddc0aa50f9714371f09b13250d1e 100644 (file)
@@ -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 */
index f9237744c5f305d7dd6d221cb95a937b0c077d3a..17a4c447a849ddc0aa50f9714371f09b13250d1e 100644 (file)
--- a/busybox.c
+++ b/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 */