summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--coreutils/ln.c5
-rw-r--r--ln.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/coreutils/ln.c b/coreutils/ln.c
index 38e9b67..e81dbaf 100644
--- a/coreutils/ln.c
+++ b/coreutils/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);
}
/*
diff --git a/ln.c b/ln.c
index 38e9b67..e81dbaf 100644
--- 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);
}
/*