History log of /openbsd-current/bin/df/ext2fs_df.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.16 01-Mar-2016 mmcc

remove unneeded includes

from Michal Mazurek, ok tb@


Revision tags: OPENBSD_5_9_BASE
# 1.15 08-Feb-2016 mmcc

remove needless headers

ok tb@, from Michal Mazurek


# 1.14 27-Nov-2015 millert

Use strlcpy to copy strings in struct mount, not memmove. Avoids
reading past the end of a buffer. Problem found and OK jsg@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.13 01-Mar-2015 tobias

Avoid SIGFPE when parsing an invalid ext2fs through a raw device operation.

ok millert


# 1.12 16-Jan-2015 deraadt

Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible. Annotate <sys/param.h> lines with their current reasons. Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution. These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)


Revision tags: OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.11 14-Sep-2004 deraadt

do not alias unions between files (lint hates it)


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE
# 1.10 02-Jun-2003 millert

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999. Proofed by myself and Theo.


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.9 04-Jul-2002 deraadt

ansi


Revision tags: OPENBSD_3_1_BASE
# 1.8 16-Feb-2002 millert

Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.


Revision tags: OPENBSD_3_0_BASE
# 1.7 11-May-2001 mickey

use strlcpy instead of strncpy+a[len-1]='\0'


Revision tags: OPENBSD_2_9_BASE
# 1.6 28-Jan-2001 niklas

$OpenBSD$


Revision tags: OPENBSD_2_7_BASE OPENBSD_2_8_BASE
# 1.5 26-Apr-2000 jasoni

Support for ext2fs rev. 1


Revision tags: OPENBSD_2_6_BASE
# 1.4 31-May-1999 millert

New struct statfs with mount options. NOTE: this replaces statfs(2),
fstatfs(2), and getfsstat(2) so you will need to build a new kernel
before doing a "make build" or you will get "unimplemented syscall" errors.

The new struct statfs has the following featuires:
o Has a u_int32_t flags field--now softdep can have a real flag.

o Uses u_int32_t instead of longs (nicer on the alpha). Note: the man
page used to lie about setting invalid/unused fields to -1. SunOS does
that but our code never has.

o Gets rid of f_type completely. It hasn't been used since NetBSD 0.9
and having it there but always 0 is confusing. It is conceivable
that this may cause some old code to not compile but that is better
than silently breaking.

o Adds a mount_info union that contains the FSTYPE_args struct. This
means that "mount" can now tell you all the options a filesystem was
mounted with. This is especially nice for NFS.

Other changes:
o The linux statfs emulation didn't convert between BSD fs names
and linux f_type numbers. Now it does, since the BSD f_type
number is useless to linux apps (and has been removed anyway)

o FreeBSD's struct statfs is different from our (both old and new)
and thus needs conversion. Previously, the OpenBSD syscalls
were used without any real translation.

o mount(8) will now show extra info when invoked with no arguments.
However, to see *everything* you need to use the -v (verbose) flag.


Revision tags: OPENBSD_2_2_BASE OPENBSD_2_3_BASE OPENBSD_2_4_BASE OPENBSD_2_5_BASE
# 1.3 23-Jul-1997 kstailey

tabify


# 1.2 30-Jun-1997 deraadt

Wall


# 1.1 16-Jun-1997 denny

Better support for unmounted filesystems (i.e. df /dev/rsd0a):
- interpret the superblock of lfs, ext2fs, and ffs filesystems.
- never mount() an offline filesystem, always read its superblock.
- use the same algorithm as statfs() for ffs, get the same answers.

Even so, now I'm really unsure this code should remain in df.
Similar functionality should be added to dumpfs or fsck instead.