OpenBSD CVS

CVS log for src/usr.bin/du/du.c


[BACK] Up to [local] / src / usr.bin / du

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.33 / (download) - annotate - [select for diffs], Sun Dec 4 23:50:48 2022 UTC (17 months, 2 weeks ago) by cheloha
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, HEAD
Changes since 1.32: +1 -2 lines
Diff to previous 1.32 (colored)

userspace: remove vestigial '?' cases from top-level getopt(3) loops

getopt(3) returns '?' when it encounters a flag not present in the in
the optstring or if a flag is missing its option argument.  We can
handle this case with the "default" failure case with no loss of
legibility.  Hence, remove all the redundant "case '?':" lines.

Prompted by dlg@.  With help from dlg@ and millert@.

Link: https://marc.info/?l=openbsd-tech&m=167011979726449&w=2

ok naddy@ millert@ dlg@

Revision 1.32 / (download) - annotate - [select for diffs], Wed Aug 24 03:13:45 2016 UTC (7 years, 8 months ago) by guenther
Branch: MAIN
CVS Tags: 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
Changes since 1.31: +8 -8 lines
Diff to previous 1.31 (colored)

Convert quad_t to int64_t and %q to %ll
Convert bzero() to memset() and bcopy() to memcpy()

ok natano@ millert@

Revision 1.31 / (download) - annotate - [select for diffs], Sat Oct 10 05:32:52 2015 UTC (8 years, 7 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.30: +4 -1 lines
Diff to previous 1.30 (colored)

pledge to only use "stdio rpath"; ok doug

Revision 1.30 / (download) - annotate - [select for diffs], Thu Jun 25 02:04:08 2015 UTC (8 years, 10 months ago) by uebayasi
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.29: +2 -1 lines
Diff to previous 1.29 (colored)

Put fts_close() where missing.

Not bugs in short-lived commands that call exit() -> _exit() immediately,
but for idempotency.

Originally found in ls(1) by Valgrind.  Changes for other commands are
from deraadt@.  Reviewed by me, tested in snapshots.

OK deraadt@

Revision 1.29 / (download) - annotate - [select for diffs], Mon Oct 20 22:13:11 2014 UTC (9 years, 7 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.28: +3 -2 lines
Diff to previous 1.28 (colored)

fix a regression that i caused in rev. 1.26: *do* report the size of
files listed on the command line, no matter what options are given;
issue reported by edd@; ok millert@ edd@

Revision 1.28 / (download) - annotate - [select for diffs], Sun Oct 19 18:24:58 2014 UTC (9 years, 7 months ago) by jmc
Branch: MAIN
Changes since 1.27: +2 -2 lines
Diff to previous 1.27 (colored)

rearrange -d, again, after giving ingo some dodgy advice;
ok ingo

Revision 1.27 / (download) - annotate - [select for diffs], Sun Oct 19 14:27:41 2014 UTC (9 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.26: +2 -2 lines
Diff to previous 1.26 (colored)

in usage() and SYNOPSIS, sort options as suggested by jmc@

Revision 1.26 / (download) - annotate - [select for diffs], Fri Oct 17 14:46:54 2014 UTC (9 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.25: +22 -22 lines
Diff to previous 1.25 (colored)

Add the -d flag (limit display depth) for compatibility with FreeBSD,
DragonFly, NetBSD and GNU coreutils, even though it's not POSIX.
Actually, this simplifies the code rather than complicating it.

Because -a and -d need not be mutually exclusive (as observed by
millert@) and -s is identical to -d 0, -a and -s are no longer
mutually exclusive, but -as and -sa are now the same as -s.
That is explicitly allowed by POSIX.

Based on a patch from William Orr <will at worrbase dot com>,
but extensively massaged and HISTORY added by me.

feedback and ok millert@

Revision 1.25 / (download) - annotate - [select for diffs], Tue May 20 01:25:23 2014 UTC (10 years ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (colored)

Use errc/warnc to simplify code.
Also, in 'ftp', always put the error message last, after the hostname/ipaddr.

ok jsing@ krw@ millert@

Revision 1.24 / (download) - annotate - [select for diffs], Wed Nov 13 21:20:01 2013 UTC (10 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.23: +3 -3 lines
Diff to previous 1.23 (colored)

a few things can be static to avoid need for protos

Revision 1.23 / (download) - annotate - [select for diffs], Wed Apr 27 07:52:11 2011 UTC (13 years ago) by sobrado
Branch: MAIN
CVS Tags: 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
Changes since 1.22: +6 -5 lines
Diff to previous 1.22 (colored)

cast one blocksize occurrence to unsigned long, fixes du(1)'s output
for directories larger than one terabyte; while here, wrap a long line.

problem found by Chano Antuna and diff written with lots of good
advice from millert@, thanks!

ok millert@

Revision 1.22 / (download) - annotate - [select for diffs], Tue Oct 27 23:59:37 2009 UTC (14 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.21: +1 -15 lines
Diff to previous 1.21 (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.21 / (download) - annotate - [select for diffs], Thu Aug 27 11:29:30 2009 UTC (14 years, 8 months ago) by millert
Branch: MAIN
Changes since 1.20: +6 -4 lines
Diff to previous 1.20 (colored)

Use FTS_ROOTLEVEL instead of 0 when checking fts_level.

Revision 1.20 / (download) - annotate - [select for diffs], Wed Jun 3 15:15:16 2009 UTC (14 years, 11 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.19: +4 -2 lines
Diff to previous 1.19 (colored)

If both -h and -k are specified, the latter takes precedence.
Prompted by jmc@, OK otto@

Revision 1.19 / (download) - annotate - [select for diffs], Wed Jan 25 06:20:03 2006 UTC (18 years, 3 months ago) by tedu
Branch: MAIN
CVS Tags: 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, OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.18: +7 -8 lines
Diff to previous 1.18 (colored)

lint says Pflag isn't needed.  i concur

Revision 1.18 / (download) - annotate - [select for diffs], Sun Apr 17 12:27:23 2005 UTC (19 years, 1 month ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.17: +3 -3 lines
Diff to previous 1.17 (colored)

sort options + sync usage();

Revision 1.17 / (download) - annotate - [select for diffs], Mon Jun 21 09:44:31 2004 UTC (19 years, 11 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.16: +56 -102 lines
Diff to previous 1.16 (colored)

Actually commit right (r&b tree) version, instead of hash table
one.  Previous commit from wrong tree. Spotted by Andre Lucas <andre
at ae-35 dot com> ok millert@ canacar@

Revision 1.16 / (download) - annotate - [select for diffs], Mon Jun 14 18:21:31 2004 UTC (19 years, 11 months ago) by otto
Branch: MAIN
Changes since 1.15: +132 -69 lines
Diff to previous 1.15 (colored)

- use fmt_scaled(3) instead of home grown function to print -h numbers
- do not use a linear list to keep track of inodes with link count > 2,
  use a red & black tree. Based on freebsd code that uses auto-sizing
  hash maps; this tree version by canacar@.

ok millert@ canacar@

Revision 1.15 / (download) - annotate - [select for diffs], Wed Jun 2 14:58:46 2004 UTC (19 years, 11 months ago) by tom
Branch: MAIN
Changes since 1.14: +3 -3 lines
Diff to previous 1.14 (colored)

Don't want text in err() call following malloc failures.

ok henning@

Revision 1.14 / (download) - annotate - [select for diffs], Wed Jul 2 21:04:09 2003 UTC (20 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.13: +5 -4 lines
Diff to previous 1.13 (colored)

protos

Revision 1.13 / (download) - annotate - [select for diffs], Tue Jun 10 22:20:46 2003 UTC (20 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.12: +7 -14 lines
Diff to previous 1.12 (colored)

mostly ansi cleanup; pval ok

Revision 1.12 / (download) - annotate - [select for diffs], Tue Jun 3 02:56:07 2003 UTC (20 years, 11 months ago) by millert
Branch: MAIN
Changes since 1.11: +3 -7 lines
Diff to previous 1.11 (colored)

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

Revision 1.11 / (download) - annotate - [select for diffs], Sat Feb 16 21:27:45 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2, OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.10: +5 -5 lines
Diff to previous 1.10 (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.10 / (download) - annotate - [select for diffs], Mon Jul 30 00:53:38 2001 UTC (22 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.9: +3 -3 lines
Diff to previous 1.9 (colored)

fix 0B case; morten@hotpost.dk

Revision 1.9 / (download) - annotate - [select for diffs], Thu Jul 12 05:17:00 2001 UTC (22 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.8: +3 -3 lines
Diff to previous 1.8 (colored)

first pass at a -Wall cleanup

Revision 1.8 / (download) - annotate - [select for diffs], Wed May 2 23:26:53 2001 UTC (23 years ago) by pjanzen
Branch: MAIN
Changes since 1.7: +7 -4 lines
Diff to previous 1.7 (colored)

-h overrides BLOCKSIZE; matt@anzen.com

Revision 1.7 / (download) - annotate - [select for diffs], Fri Feb 23 19:14:21 2001 UTC (23 years, 2 months ago) by pjanzen
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.6: +82 -17 lines
Diff to previous 1.6 (colored)

Add -h option ("human-readable") as df.  Based on suggestions and code from
Matt Bing <matt@anzen.com>.

Revision 1.6 / (download) - annotate - [select for diffs], Sun Apr 16 04:21:34 2000 UTC (24 years, 1 month ago) by ericj
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored)

correct return value; from FreeBSD

Revision 1.5 / (download) - annotate - [select for diffs], Mon Feb 16 09:23:06 1998 UTC (26 years, 3 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_6_BASE, OPENBSD_2_6, OPENBSD_2_5_BASE, OPENBSD_2_5, OPENBSD_2_4_BASE, OPENBSD_2_4, OPENBSD_2_3_BASE, OPENBSD_2_3
Changes since 1.4: +6 -4 lines
Diff to previous 1.4 (colored)

-r for xpg conformance

Revision 1.4 / (download) - annotate - [select for diffs], Wed Jan 15 23:42:25 1997 UTC (27 years, 4 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_2_BASE, OPENBSD_2_2, OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.3: +3 -3 lines
Diff to previous 1.3 (colored)

getopt(3) returns -1 when out of args, not EOF, whee!

Revision 1.3 / (download) - annotate - [select for diffs], Fri Oct 18 18:16:07 1996 UTC (27 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.2: +22 -11 lines
Diff to previous 1.2 (colored)

Implement a -c (Grand Total) option, a'la GNU du(1).
From Luke Mewburn <lukem@telstra.com.au>, NetBSD PR #2805.
Also -Wall happiness.

Revision 1.2 / (download) - annotate - [select for diffs], Wed Jun 26 05:32:38 1996 UTC (27 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.1: +2 -1 lines
Diff to previous 1.1 (colored)

rcsid

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:45:05 1995 UTC (28 years, 7 months ago) by deraadt
CVS Tags: netbsd_1_1
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of NetBSD tree

Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 18 08:45:05 1995 UTC (28 years, 7 months ago) by deraadt
Branch: MAIN

Initial revision

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.