diff options
| author | Wolfram Schneider <wosch@FreeBSD.org> | 1997-10-03 18:11:14 +0000 |
|---|---|---|
| committer | Wolfram Schneider <wosch@FreeBSD.org> | 1997-10-03 18:11:14 +0000 |
| commit | ab215c6703c3eea4c61c2457f7f31793de630d04 (patch) | |
| tree | a9d5b4653d0c5d50a6f0435b2a4aaa4f4b2f18a1 | |
| parent | bd00bedcd664da606e349566b8bb977629f428c3 (diff) | |
Notes
| -rw-r--r-- | bin/cp/utils.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/cp/utils.c b/bin/cp/utils.c index 363a84086f6b..ecd9790f9aa4 100644 --- a/bin/cp/utils.c +++ b/bin/cp/utils.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: utils.c,v 1.13 1997/02/22 14:01:34 peter Exp $ */ #ifndef lint @@ -81,13 +81,16 @@ copy_file(entp, dne) * modified by the umask.) */ if (!dne) { +#define YESNO "(y/n [n]) " if (iflag) { - (void)fprintf(stderr, "overwrite %s? ", to.p_path); + (void)fprintf(stderr, "overwrite %s? %s", + to.p_path, YESNO); checkch = ch = getchar(); while (ch != '\n' && ch != EOF) ch = getchar(); if (checkch != 'y' && checkch != 'Y') { (void)close(from_fd); + (void)fprintf(stderr, "not overwritten\n"); return (0); } } |
