Patch from Matt Kraai: "When it encounters a problem creating a link, ln
authorEric Andersen <andersen@codepoet.org>
Wed, 4 Oct 2000 16:02:53 +0000 (16:02 -0000)
committerEric Andersen <andersen@codepoet.org>
Wed, 4 Oct 2000 16:02:53 +0000 (16:02 -0000)
shouldn't give up entirely but instead continue processing the rest of its
arguments.  The attached patch does this."

coreutils/ln.c
ln.c

index 38e9b6763a1cdc4e92457b410af544e6a66c84de..e81dbafaec49667f99cb70187ad8d7202928a466 100644 (file)
@@ -81,6 +81,7 @@ static int fs_link(const char *link_DestName, const char *link_SrcName, const in
 
 extern int ln_main(int argc, char **argv)
 {
+       int status = EXIT_SUCCESS;
        int flag = 0;
        int opt;
        
@@ -102,10 +103,10 @@ extern int ln_main(int argc, char **argv)
        }
        while(optind<(argc-1)) {
                if (fs_link(argv[optind], argv[argc-1], flag)==FALSE)
-                       return(FALSE);
+                       status = EXIT_FAILURE;
                optind++;
        }
-       return(TRUE);
+       return(status);
 }
 
 /*
diff --git a/ln.c b/ln.c
index 38e9b6763a1cdc4e92457b410af544e6a66c84de..e81dbafaec49667f99cb70187ad8d7202928a466 100644 (file)
--- a/ln.c
+++ b/ln.c
@@ -81,6 +81,7 @@ static int fs_link(const char *link_DestName, const char *link_SrcName, const in
 
 extern int ln_main(int argc, char **argv)
 {
+       int status = EXIT_SUCCESS;
        int flag = 0;
        int opt;
        
@@ -102,10 +103,10 @@ extern int ln_main(int argc, char **argv)
        }
        while(optind<(argc-1)) {
                if (fs_link(argv[optind], argv[argc-1], flag)==FALSE)
-                       return(FALSE);
+                       status = EXIT_FAILURE;
                optind++;
        }
-       return(TRUE);
+       return(status);
 }
 
 /*