Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-6]: src/usr.bin/du Apply patch (requested by simonb in ticket #...
details: https://anonhg.NetBSD.org/src/rev/954c2a11cbfe
branches: netbsd-1-6
changeset: 530339:954c2a11cbfe
user: grant <grant%NetBSD.org@localhost>
date: Thu Jun 19 00:21:50 2003 +0000
description:
Apply patch (requested by simonb in ticket #1284):
If no files are specified on the command line, put { ".", NULL } in
it's own little array instead of writing over argv. Fixes problems
where du shows up in ps as ". fts_open `%s'" (and shorter or longer
combinations of that depending in what argc was).
diffstat:
usr.bin/du/du.c | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
diffs (46 lines):
diff -r fa5732c32258 -r 954c2a11cbfe usr.bin/du/du.c
--- a/usr.bin/du/du.c Thu Jun 19 00:19:13 2003 +0000
+++ b/usr.bin/du/du.c Thu Jun 19 00:21:50 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: du.c,v 1.17 2001/01/04 23:05:54 lukem Exp $ */
+/* $NetBSD: du.c,v 1.17.2.1 2003/06/19 00:21:50 grant Exp $ */
/*
* Copyright (c) 1989, 1993, 1994
@@ -46,7 +46,7 @@
#if 0
static char sccsid[] = "@(#)du.c 8.5 (Berkeley) 5/4/95";
#else
-__RCSID("$NetBSD: du.c,v 1.17 2001/01/04 23:05:54 lukem Exp $");
+__RCSID("$NetBSD: du.c,v 1.17.2.1 2003/06/19 00:21:50 grant Exp $");
#endif
#endif /* not lint */
@@ -74,11 +74,10 @@
FTS *fts;
FTSENT *p;
long blocksize, totalblocks;
- int ftsoptions, listdirs, listfiles;
- int Hflag, Lflag, Pflag, aflag, ch, cflag, kmflag, notused, rval, sflag;
- char **save;
+ int ftsoptions, listdirs, listfiles, notused;
+ int Hflag, Lflag, Pflag, aflag, ch, cflag, kmflag, rval, sflag;
+ char *noargv[2];
- save = argv;
Hflag = Lflag = Pflag = aflag = cflag = kmflag = sflag = 0;
totalblocks = 0;
ftsoptions = FTS_PHYSICAL;
@@ -156,9 +155,9 @@
}
if (!*argv) {
- argv = save;
- argv[0] = ".";
- argv[1] = NULL;
+ noargv[0] = ".";
+ noargv[1] = NULL;
+ argv = noargv;
}
if (!kmflag)
Home |
Main Index |
Thread Index |
Old Index