FreeBSD Bugzilla – Attachment 24870 Details for
Bug 42430
Add -m option to du(1) for compatibility to GNU [PATCH]
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 2.52 KB, created by
Fork
on 2002-09-04 23:20:02 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Fork
Created:
2002-09-04 23:20:02 UTC
Size:
2.52 KB
patch
obsolete
>*** du.orig/du.1 Wed Sep 4 18:06:28 2002 >--- du/du.1 Wed Sep 4 18:02:45 2002 >*************** >*** 44,50 **** > .Op Fl I Ar mask > .Op Fl a | s | d Ar depth > .Op Fl c >! .Op Fl h | k > .Op Fl x > .Op Ar > .Sh DESCRIPTION >--- 44,50 ---- > .Op Fl I Ar mask > .Op Fl a | s | d Ar depth > .Op Fl c >! .Op Fl h | k | m > .Op Fl x > .Op Ar > .Sh DESCRIPTION >*************** >*** 98,103 **** >--- 98,105 ---- > Display a grand total. > .It Fl k > Display block counts in 1024-byte (1-Kbyte) blocks. >+ .It Fl m >+ Display block counts in 1048576-byte (1-Mbyte) blocks. > .It Fl x > Filesystem mount points are not traversed. > .El >*************** >*** 125,140 **** > .It Ev BLOCKSIZE > If the environment variable > .Ev BLOCKSIZE >! is set, and the > .Fl k >! option is not specified, the block counts will be displayed in units of that >! size block. >! If > .Ev BLOCKSIZE >! is not set, and the >! .Fl k >! option is not specified, the block counts will be displayed in 512-byte blocks. >! .El > .Sh SEE ALSO > .Xr df 1 , > .Xr fts 3 , >--- 127,143 ---- > .It Ev BLOCKSIZE > If the environment variable > .Ev BLOCKSIZE >! is set the block counts will be displayed in units of that >! size block, unless the > .Fl k >! , >! .Fl m >! or >! .Fl h >! option is specified. >! If > .Ev BLOCKSIZE >! is not set, and the previous options are not specified, the block counts will be displayed in 512-byte blocks. > .Sh SEE ALSO > .Xr df 1 , > .Xr fts 3 , >diff -crN du.orig/du.c du/du.c >*** du.orig/du.c Wed Sep 4 18:06:28 2002 >--- du/du.c Wed Sep 4 17:50:49 2002 >*************** >*** 125,131 **** > depth = INT_MAX; > SLIST_INIT(&ignores); > >! while ((ch = getopt(argc, argv, "HI:LPasd:chkrx")) != -1) > switch (ch) { > case 'H': > Hflag = 1; >--- 125,131 ---- > depth = INT_MAX; > SLIST_INIT(&ignores); > >! while ((ch = getopt(argc, argv, "HI:LPasd:chkmrx")) != -1) > switch (ch) { > case 'H': > Hflag = 1; >*************** >*** 169,174 **** >--- 169,177 ---- > case 'k': > putenv("BLOCKSIZE=1024"); > break; >+ case 'm': /* Compatibility with GNU */ >+ putenv("BLOCKSIZE=1048576"); >+ break; > case 'r': /* Compatibility. */ > break; > case 'x': >*************** >*** 390,396 **** > usage() > { > (void)fprintf(stderr, >! "usage: du [-H | -L | -P] [-a | -s | -d depth] [-c] [-h | -k] [-x] [-I mask] [file ...]\n"); > exit(EX_USAGE); > } > >--- 393,399 ---- > usage() > { > (void)fprintf(stderr, >! "usage: du [-H | -L | -P] [-a | -s | -d depth] [-c] [-h | -k | -m] [-x] [-I mask] [file ...]\n"); > exit(EX_USAGE); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 42430
: 24870