using -m and -g switches and "available space" is negative (i.e. when
the file system is already using the root-reserved minimum free space).
Obtained from: Stefan Farfeleder <stefan@fafoe.narf.at>
PR: bin/62536
Submitted by: Peter van Dijk <peter@dataloss.nl>
Approved by: grog (mentor), bde
that this provokes. "Wherever possible" means "In the kernel OR NOT
C++" (implying C).
There are places where (void *) pointers are not valid, such as for
function pointers, but in the special case of (void *)0, agreement
settles on it being OK.
Most of the fixes were NULL where an integer zero was needed; many
of the fixes were NULL where ascii <nul> ('\0') was needed, and a
few were just "other".
Tested on: i386 sparc64
accurate reporting of multi-terabyte filesystem sizes.
You should build and boot a new kernel BEFORE doing a `make world'
as the new kernel will know about binaries using the old statfs
structure, but an old kernel will not know about the new system
calls that support the new statfs structure. Running an old kernel
after a `make world' will cause programs such as `df' that do a
statfs system call to fail with a bad system call.
Reviewed by: Bruce Evans <bde@zeta.org.au>
Reviewed by: Tim Robbins <tjr@freebsd.org>
Reviewed by: Julian Elischer <julian@elischer.org>
Reviewed by: the hoards of <arch@freebsd.org>
Sponsored by: DARPA & NAI Labs.
is a style bug at best. When the variable isn't a flag, it potentially
overflows after a large number of settings. Here the number of settings
is limited by ARG_MAX, but the variable is the exit code so it became
bogus after the second setting and effectively overflowed to 0 after
approx. 128 settings.
Fixed some style bugs involving comments in and near previous commit.
Clarification of previous commit message: df -t didn't give undefined
behaviour, and the behaviour used to conform perfectly with the man
page, since the buggy behaviour is documented in the BUGS section. -t
just worked when no files or file systems were specified, and was just
ignored if a file or file system was specified.
-t Only print out statistics for filesystems of the specified types.
Make the behavior of df(1) conform to its man page (behavior is otherwise
undefined).
Submitted by: Rob Braun <bbraun@apple.com>
Obtained from: Apple
- Make getvfsbyname() take a struct xvfsconf *.
- Convert several consumers of getvfsbyname() to use struct xvfsconf.
- Correct the getvfsbyname.3 manpage.
- Create a new vfs.conflist sysctl to dump all the struct xvfsconf in the
kernel, and rewrite getvfsbyname() to use this instead of the weird
existing API.
- Convert some {set,get,end}vfsent() consumers to use the new vfs.conflist
sysctl.
- Convert a vfsload() call in nfsiod.c to kldload() and remove the useless
vfsisloadable() and endvfsent() calls.
- Add a warning printf() in vfs_sysctl() to tell people they are using
an old userland.
After these changes, it's possible to modify struct vfsconf without
breaking the binary compatibility. Please note that these changes don't
break this compatibility either.
When bp will have updated mount_smbfs(8) with the patch I sent him, there
will be no more consumers of the {set,get,end}vfsent(), vfsisloadable()
and vfsload() API, and I will promptly delete it.
refetch the filesystem information in MNT_WAIT mode. This avoids
incorrect column alignment that sometimes occurs with NFS filesystems.
Submitted by: Ian <freebsd@damnhippie.dyndns.org>
in df(1) when we have multiple filesystem types, and the complications of
handling UFS2 pushes this over the edge.
Use the .../mount/extern.h to get prototypes of the functions we
borrow from there. Constify things to match. (why aren't these
functions in a lib anyway ?)
Make everything static and set WARNS?=5.
The way the "df diskdevice" thing works for unmounted diskdevices
is not very general.
Sponsored by: DARPA & NAI Labs.
filesystems. We now keep track of the maximum width required for
every variable-width field instead of just the first one.
PR: bin/15510
MFC after: 1 week
o Old-style K&R declarations have been converted to new C89 style
o register has been removed
o prototype for main() has been removed (gcc3 makes it an error)
o int main(int argc, char *argv[]) is the preferred main definition.
o Attempt to not break style(9) conformance for declarations more than
they already are.
Approved by: arch@, new style(9)
and remove the setgid operator bit from the installed binary: if you want
to view free disk space on an unmounted device, you should have read
permissions to access it.
Reviewed by: phk
cases and broke the world in some cases.
Fixed some style bugs (the usual ones for DPADD and LDADD, misplacement
of DPADD and LDADD, and misplacement of $FreeBSD$).
Obtained from: parts of human readable code from OpenBSD
Reviewed by: obrien
add POSIX, byte and megabyte block size ouput flags
PR: 13579 (POSIX flag)
Submitted by: Mike Meyer <mwm@phone.net>
be ignored by default by the df(1) program. This is used mostly to
avoid stat()-ing entries that do not represent "real" disk mount
points (such as those made by an automounter such as amd.) It is
also useful not to have to stat() these entries because it takes
longer to report them that for other file systems, being that these
mount points are served by a user-level file server and resulting in
several context switches. Worse, if the automounter is down
unexpectedly, a causal df(1) will hang in an interruptible way.
PR: kern/9764
Submitted by: Erez Zadok <ezk@cs.columbia.edu>