diff options
author | jkh <jkh@FreeBSD.org> | 1994-09-28 14:53:20 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1994-09-28 14:53:20 +0000 |
commit | ecee3a20ff01b3919059cc0362277de08546ef6f (patch) | |
tree | 9a9aa16f8a6915608786dee9d7fd63baee01ec4e /usr.bin/ncftp/ftprc.c | |
parent | 0a36b6fcaa35545c0ca52c5a3c36e9880b82cdc2 (diff) | |
download | FreeBSD-src-ecee3a20ff01b3919059cc0362277de08546ef6f.zip FreeBSD-src-ecee3a20ff01b3919059cc0362277de08546ef6f.tar.gz |
Ye GODS! What I had to go through to make this thing exit with a non-zero
return status when a transfer failed! Hopefully, the next release will
do this more elegantly and make these changes short-lived.
Diffstat (limited to 'usr.bin/ncftp/ftprc.c')
-rw-r--r-- | usr.bin/ncftp/ftprc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/ncftp/ftprc.c b/usr.bin/ncftp/ftprc.c index e8380ce..c048852 100644 --- a/usr.bin/ncftp/ftprc.c +++ b/usr.bin/ncftp/ftprc.c @@ -258,11 +258,12 @@ static void SortRecentList(void) -void WriteRecentSitesFile(void) +int WriteRecentSitesFile(void) { FILE *rfp; recentsite *r; int i; + int retcode = 0; if ((recent_file[0] != 0) && (nRecents > 0) && (keep_recent)) { dbprintf("Attempting to write %s...\n", recent_file); @@ -279,8 +280,10 @@ void WriteRecentSitesFile(void) (void) chmod(recent_file, 0600); } else { perror(recent_file); + ++retcode; } } + return retcode; } /* WriteRecentSitesFile */ |