block numbers are measured in f_frsize units. Make -P option
use this instead of f_bsize. Also account for reserved blocks like normal non-P output. Fixes PR bin/41541.
This commit is contained in:
parent
3479599edd
commit
61ace358f2
10
bin/df/df.c
10
bin/df/df.c
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: df.c,v 1.85 2009/01/25 14:18:21 lukem Exp $ */
|
||||
/* $NetBSD: df.c,v 1.86 2009/06/06 09:30:45 mlelstv Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1990, 1993, 1994
|
||||
@ -45,7 +45,7 @@ __COPYRIGHT(
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)df.c 8.7 (Berkeley) 4/2/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: df.c,v 1.85 2009/01/25 14:18:21 lukem Exp $");
|
||||
__RCSID("$NetBSD: df.c,v 1.86 2009/06/06 09:30:45 mlelstv Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -473,9 +473,9 @@ prtstat(struct statvfs *sfsp, int maxwidth)
|
||||
*/
|
||||
(void)printf("%s %" PRId64 " %" PRId64 " %" PRId64 " %s %s\n",
|
||||
sfsp->f_mntfromname,
|
||||
fsbtoblk(sfsp->f_blocks, sfsp->f_bsize, blocksize),
|
||||
fsbtoblk(used, sfsp->f_bsize, blocksize),
|
||||
fsbtoblk(sfsp->f_bavail, sfsp->f_bsize, blocksize),
|
||||
fsbtoblk(sfsp->f_blocks, sfsp->f_frsize, blocksize),
|
||||
fsbtoblk(used, sfsp->f_frsize, blocksize),
|
||||
fsbtoblk(bavail, sfsp->f_frsize, blocksize),
|
||||
availblks == 0 ? full : strpct64((uint64_t) used,
|
||||
(uint64_t) availblks, 0), sfsp->f_mntonname);
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user