fix cp -vi bug
Submitted by: Dan Papasian (bugg_ on irc)
This commit is contained in:
parent
30bf72233e
commit
127432d7e2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=56420
@ -50,6 +50,7 @@ static const char rcsid[] =
|
||||
#include <fcntl.h>
|
||||
#include <fts.h>
|
||||
#include <stdio.h>
|
||||
#include <sysexits.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "extern.h"
|
||||
@ -93,7 +94,7 @@ copy_file(entp, dne)
|
||||
if (checkch != 'y' && checkch != 'Y') {
|
||||
(void)close(from_fd);
|
||||
(void)fprintf(stderr, "not overwritten\n");
|
||||
return (0);
|
||||
return (1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -324,5 +325,5 @@ usage()
|
||||
(void)fprintf(stderr, "%s\n%s\n",
|
||||
"usage: cp [-R [-H | -L | -P]] [-f | -i] [-pv] src target",
|
||||
" cp [-R [-H | -L | -P]] [-f | -i] [-pv] src1 ... srcN directory");
|
||||
exit(1);
|
||||
exit(EX_USAGE);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user