OpenBSD CVS

CVS log for src/bin/df/ffs_df.c


[BACK] Up to [local] / src / bin / df

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.19 / (download) - annotate - [select for diffs], Tue Mar 1 17:57:49 2016 UTC (8 years, 3 months ago) by mmcc
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, HEAD
Changes since 1.18: +1 -3 lines
Diff to previous 1.18 (colored)

remove unneeded includes

from Michal Mazurek, ok tb@

Revision 1.18 / (download) - annotate - [select for diffs], Mon Feb 8 16:23:54 2016 UTC (8 years, 4 months ago) by mmcc
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.17: +2 -3 lines
Diff to previous 1.17 (colored)

remove needless headers

ok tb@, from Michal Mazurek

Revision 1.17 / (download) - annotate - [select for diffs], Fri Nov 27 13:49:41 2015 UTC (8 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.16: +4 -4 lines
Diff to previous 1.16 (colored)

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

Revision 1.16 / (download) - annotate - [select for diffs], Tue Jan 20 18:22:20 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.15: +2 -2 lines
Diff to previous 1.15 (colored)

Adjust <sys/param.h> comments regarding use of use of MAXFRAG, or
delete <sys/param.h> if now possible
ok guenther

Revision 1.15 / (download) - annotate - [select for diffs], Fri Jan 16 06:39:31 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)

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 1.14 / (download) - annotate - [select for diffs], Fri May 16 13:44:09 2014 UTC (10 years ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.13: +5 -6 lines
Diff to previous 1.13 (colored)

Make the df calculations of available space the same as that done in
ffs_statfs().

In 1998, with /usr/src/sys/ufs/ffs/ffs_vfsops.c r1.16, mickey@
improved the calculation of available blocks in ffs_statfs().

Yesterday guenther@ noticed that this fix had not been applied to the
same calculation being done by df(8) when run against raw
devices. Which meant different values were displayed depending on
which device/file system you gave to df.

ok otto@

Revision 1.13 / (download) - annotate - [select for diffs], Tue Oct 27 23:59:21 2009 UTC (14 years, 7 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.12: +1 -7 lines
Diff to previous 1.12 (colored)

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable).  these days, people use source.  these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms

Revision 1.12 / (download) - annotate - [select for diffs], Mon Apr 30 18:40:24 2007 UTC (17 years, 1 month ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.11: +24 -12 lines
Diff to previous 1.11 (colored)

ffs2 support for reading df data directly from device; ok millert@ pedro@

Revision 1.11 / (download) - annotate - [select for diffs], Mon Mar 19 13:27:47 2007 UTC (17 years, 2 months ago) by pedro
Branch: MAIN
Changes since 1.10: +7 -7 lines
Diff to previous 1.10 (colored)

Add FFS2 fields to the superblock, change file system tools to keep
accessing FFS1 fields, okay art@, quite some testing by ckuethe@, simon@
and thib@, thanks.

Revision 1.10 / (download) - annotate - [select for diffs], Tue Sep 14 22:46:04 2004 UTC (19 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (colored)

do not alias unions between files (lint hates it)

Revision 1.9 / (download) - annotate - [select for diffs], Mon Jun 2 23:32:07 2003 UTC (21 years ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.8: +2 -6 lines
Diff to previous 1.8 (colored)

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

Revision 1.8 / (download) - annotate - [select for diffs], Thu Jul 4 04:26:39 2002 UTC (21 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.7: +2 -5 lines
Diff to previous 1.7 (colored)

ansi

Revision 1.7 / (download) - annotate - [select for diffs], Sat Feb 16 21:27:06 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.6: +4 -4 lines
Diff to previous 1.6 (colored)

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 1.6 / (download) - annotate - [select for diffs], Fri May 11 18:40:46 2001 UTC (23 years, 1 month ago) by mickey
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.5: +2 -3 lines
Diff to previous 1.5 (colored)

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

Revision 1.5 / (download) - annotate - [select for diffs], Sun Jan 28 23:04:55 2001 UTC (23 years, 4 months ago) by niklas
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.4: +2 -0 lines
Diff to previous 1.4 (colored)

$OpenBSD$

Revision 1.4 / (download) - annotate - [select for diffs], Wed Oct 18 20:37:42 2000 UTC (23 years, 7 months ago) by mickey
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

sort out printf formats according to types, 64bit arithmetics in ffs_df; millert@ ok

Revision 1.3 / (download) - annotate - [select for diffs], Mon May 31 17:34:40 1999 UTC (25 years ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_7_BASE, OPENBSD_2_7, OPENBSD_2_6_BASE, OPENBSD_2_6
Changes since 1.2: +0 -1 lines
Diff to previous 1.2 (colored)

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 1.2 / (download) - annotate - [select for diffs], Mon Jun 30 07:15:37 1997 UTC (26 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_5_BASE, OPENBSD_2_5, OPENBSD_2_4_BASE, OPENBSD_2_4, OPENBSD_2_3_BASE, OPENBSD_2_3, OPENBSD_2_2_BASE, OPENBSD_2_2
Changes since 1.1: +5 -2 lines
Diff to previous 1.1 (colored)

Wall

Revision 1.1 / (download) - annotate - [select for diffs], Mon Jun 16 04:37:49 1997 UTC (27 years ago) by denny
Branch: MAIN

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.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.