diff options
-rw-r--r-- | usr.bin/du/du.1 | 9 | ||||
-rw-r--r-- | usr.bin/du/du.c | 10 |
2 files changed, 13 insertions, 6 deletions
diff --git a/usr.bin/du/du.1 b/usr.bin/du/du.1 index 7be3636fe38..67291728cea 100644 --- a/usr.bin/du/du.1 +++ b/usr.bin/du/du.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: du.1,v 1.4 1996/10/18 18:16:06 millert Exp $ +.\" $OpenBSD: du.1,v 1.5 1998/02/16 09:23:06 deraadt Exp $ .\" $NetBSD: du.1,v 1.6 1996/10/18 07:20:31 thorpej Exp $ .\" .\" Copyright (c) 1990, 1993 @@ -44,7 +44,7 @@ .Nm du .Op Fl H | Fl L | Fl P .Op Fl a | Fl s -.Op Fl ckx +.Op Fl ckrx .Op Ar file ... .Sh DESCRIPTION The @@ -81,6 +81,11 @@ Partial numbers of blocks are rounded up. Display the grand total after all the arguments have been processed. .It Fl s Display only the grand total for the specified files. +.It Fl r +Generate messages about directories that cannot be read, files +that cannot be opened, and so on. This is the default case. +This option exists solely for conformance with +.St -xpg4 . .It Fl x Filesystem mount points are not traversed. .El diff --git a/usr.bin/du/du.c b/usr.bin/du/du.c index 1cdc80fcbcb..66abc5ff162 100644 --- a/usr.bin/du/du.c +++ b/usr.bin/du/du.c @@ -1,4 +1,4 @@ -/* $OpenBSD: du.c,v 1.4 1997/01/15 23:42:25 millert Exp $ */ +/* $OpenBSD: du.c,v 1.5 1998/02/16 09:23:06 deraadt Exp $ */ /* $NetBSD: du.c,v 1.11 1996/10/18 07:20:35 thorpej Exp $ */ /* @@ -47,7 +47,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)du.c 8.5 (Berkeley) 5/4/95"; #else -static char rcsid[] = "$OpenBSD: du.c,v 1.4 1997/01/15 23:42:25 millert Exp $"; +static char rcsid[] = "$OpenBSD: du.c,v 1.5 1998/02/16 09:23:06 deraadt Exp $"; #endif #endif /* not lint */ @@ -82,7 +82,7 @@ main(argc, argv) Hflag = Lflag = Pflag = aflag = cflag = kflag = sflag = 0; totalblocks = 0; ftsoptions = FTS_PHYSICAL; - while ((ch = getopt(argc, argv, "HLPacksx")) != -1) + while ((ch = getopt(argc, argv, "HLPacksxr")) != -1) switch (ch) { case 'H': Hflag = 1; @@ -109,6 +109,8 @@ main(argc, argv) case 's': sflag = 1; break; + case 'r': + break; case 'x': ftsoptions |= FTS_XDEV; break; @@ -248,6 +250,6 @@ usage() { (void)fprintf(stderr, - "usage: du [-H | -L | -P] [-a | -s] [-ckx] [file ...]\n"); + "usage: du [-H | -L | -P] [-a | -s] [-ckrx] [file ...]\n"); exit(1); } |