Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/df use strspct.
details: https://anonhg.NetBSD.org/src/rev/fb4251accfd6
branches: trunk
changeset: 772539:fb4251accfd6
user: christos <christos%NetBSD.org@localhost>
date: Sat Jan 07 18:45:13 2012 +0000
description:
use strspct.
diffstat:
bin/df/df.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diffs (45 lines):
diff -r 78c03a5bda79 -r fb4251accfd6 bin/df/df.c
--- a/bin/df/df.c Sat Jan 07 18:42:38 2012 +0000
+++ b/bin/df/df.c Sat Jan 07 18:45:13 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: df.c,v 1.89 2011/08/29 17:30:28 gson Exp $ */
+/* $NetBSD: df.c,v 1.90 2012/01/07 18:45:13 christos Exp $ */
/*
* Copyright (c) 1980, 1990, 1993, 1994
@@ -45,7 +45,7 @@
#if 0
static char sccsid[] = "@(#)df.c 8.7 (Berkeley) 4/2/94";
#else
-__RCSID("$NetBSD: df.c,v 1.89 2011/08/29 17:30:28 gson Exp $");
+__RCSID("$NetBSD: df.c,v 1.90 2012/01/07 18:45:13 christos Exp $");
#endif
#endif /* not lint */
@@ -473,7 +473,7 @@
fsbtoblk(sfsp->f_blocks, sfsp->f_frsize, blocksize),
fsbtoblk(used, sfsp->f_frsize, blocksize),
fsbtoblk(bavail, sfsp->f_frsize, blocksize),
- availblks == 0 ? full : strpct(pb, sizeof(pb), used,
+ availblks == 0 ? full : strspct(pb, sizeof(pb), used,
availblks, 0), sfsp->f_mntonname);
/*
* another concession by the structured programming police to
@@ -495,15 +495,14 @@
fsbtoblk(bavail, sfsp->f_frsize, blocksize));
(void)printf(" %3s%%",
availblks == 0 ? full :
- /* We know that these values are never negative */
- strpct(pb, sizeof(pb), used, availblks, 0));
+ strspct(pb, sizeof(pb), used, availblks, 0));
if (iflag) {
inodes = sfsp->f_files;
used = inodes - sfsp->f_ffree;
(void)printf(" %8jd %8jd %3s%%",
(intmax_t)used, (intmax_t)sfsp->f_ffree,
inodes == 0 ? (used == 0 ? empty : full) :
- strpct(pb, sizeof(pb), used, inodes, 0));
+ strspct(pb, sizeof(pb), used, inodes, 0));
}
(void)printf(" %s\n", sfsp->f_mntonname);
}
Home |
Main Index |
Thread Index |
Old Index