This commit is contained in:
mycroft 1998-07-28 04:01:03 +00:00
parent ce7d757530
commit 29bf463dcb
4 changed files with 20 additions and 18 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: chmod.c,v 1.17 1997/10/11 03:11:04 enami Exp $ */
/* $NetBSD: chmod.c,v 1.18 1998/07/28 04:01:03 mycroft Exp $ */
/*
* Copyright (c) 1989, 1993, 1994
@ -44,7 +44,7 @@ __COPYRIGHT(
#if 0
static char sccsid[] = "@(#)chmod.c 8.8 (Berkeley) 4/1/94";
#else
__RCSID("$NetBSD: chmod.c,v 1.17 1997/10/11 03:11:04 enami Exp $");
__RCSID("$NetBSD: chmod.c,v 1.18 1998/07/28 04:01:03 mycroft Exp $");
#endif
#endif /* not lint */
@ -74,28 +74,27 @@ main(argc, argv)
mode_t *set;
long val;
int oct, omode;
int Hflag, Lflag, Pflag, Rflag, ch, fflag, fts_options, hflag, rval;
int Hflag, Lflag, Rflag, ch, fflag, fts_options, hflag, rval;
char *ep, *mode;
int (*change_mode) __P((const char *, mode_t));
set = NULL; /* XXX gcc -Wuninitialized */
omode = 0; /* XXX gcc -Wuninitialized */
setlocale(LC_ALL, "");
(void)setlocale(LC_ALL, "");
Hflag = Lflag = Pflag = Rflag = fflag = hflag = 0;
Hflag = Lflag = Rflag = fflag = hflag = 0;
while ((ch = getopt(argc, argv, "HLPRXfghorstuwx")) != -1)
switch (ch) {
case 'H':
Hflag = 1;
Lflag = Pflag = 0;
Lflag = 0;
break;
case 'L':
Lflag = 1;
Hflag = Pflag = 0;
Hflag = 0;
break;
case 'P':
Pflag = 1;
Hflag = Lflag = 0;
break;
case 'R':
@ -215,6 +214,7 @@ done: argv += optind;
if (errno)
err(1, "fts_read");
exit(rval);
/* NOTREACHED */
}
void

View File

@ -1,4 +1,4 @@
/* $NetBSD: cp.c,v 1.20 1998/07/28 03:47:14 mycroft Exp $ */
/* $NetBSD: cp.c,v 1.21 1998/07/28 04:10:36 mycroft Exp $ */
/*
* Copyright (c) 1988, 1993, 1994
@ -47,7 +47,7 @@ __COPYRIGHT(
#if 0
static char sccsid[] = "@(#)cp.c 8.5 (Berkeley) 4/29/95";
#else
__RCSID("$NetBSD: cp.c,v 1.20 1998/07/28 03:47:14 mycroft Exp $");
__RCSID("$NetBSD: cp.c,v 1.21 1998/07/28 04:10:36 mycroft Exp $");
#endif
#endif /* not lint */
@ -230,9 +230,11 @@ main(argc, argv)
*/
if (r == -1) {
if (rflag || (Rflag && (Lflag || Hflag)))
stat(*argv, &tmp_stat);
r = stat(*argv, &tmp_stat);
else
lstat(*argv, &tmp_stat);
r = lstat(*argv, &tmp_stat);
if (r == -1)
err(1, "%s", *argv);
if (S_ISDIR(tmp_stat.st_mode) && (Rflag || rflag))
type = DIR_TO_DNE;

View File

@ -1,4 +1,4 @@
/* $NetBSD: mv.c,v 1.16 1997/10/19 12:55:07 mycroft Exp $ */
/* $NetBSD: mv.c,v 1.17 1998/07/28 04:01:03 mycroft Exp $ */
/*
* Copyright (c) 1989, 1993, 1994
@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993, 1994\n\
#if 0
static char sccsid[] = "@(#)mv.c 8.2 (Berkeley) 4/2/94";
#else
__RCSID("$NetBSD: mv.c,v 1.16 1997/10/19 12:55:07 mycroft Exp $");
__RCSID("$NetBSD: mv.c,v 1.17 1998/07/28 04:01:03 mycroft Exp $");
#endif
#endif /* not lint */
@ -88,7 +88,7 @@ main(argc, argv)
int ch;
char path[MAXPATHLEN + 1];
setlocale(LC_ALL, "");
(void)setlocale(LC_ALL, "");
while ((ch = getopt(argc, argv, "if")) != -1)
switch (ch) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: rm.c,v 1.21 1997/12/21 15:28:27 kleink Exp $ */
/* $NetBSD: rm.c,v 1.22 1998/07/28 04:01:03 mycroft Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1990, 1993, 1994\n\
#if 0
static char sccsid[] = "@(#)rm.c 8.8 (Berkeley) 4/27/95";
#else
__RCSID("$NetBSD: rm.c,v 1.21 1997/12/21 15:28:27 kleink Exp $");
__RCSID("$NetBSD: rm.c,v 1.22 1998/07/28 04:01:03 mycroft Exp $");
#endif
#endif /* not lint */
@ -94,7 +94,7 @@ main(argc, argv)
{
int ch, rflag;
setlocale(LC_ALL, "");
(void)setlocale(LC_ALL, "");
Pflag = rflag = 0;
while ((ch = getopt(argc, argv, "dfiPRrW")) != -1)