Commit Graph

128 Commits

Author SHA1 Message Date
jschauma
5398861167 The '-l' option *always* prints a total, not only if output is to a
terminal.
2005-01-09 16:33:32 +00:00
mycroft
75a40767d0 Print some future timestamps with HH:MM rather than YYYY, so that we get
something reasonable if we're using a file server whose time is slightly
ahead.
2004-11-17 17:00:00 +00:00
jschauma
1a12f82f4b If a files date is any time in the future (not six months or more),
use "date "+%b %e %Y"" format.  This is what SUSv3 says.
Ok jdolecek, dsl
2004-08-09 20:14:54 +00:00
jschauma
6734ab72b9 Clarify meaning of '-c' flag by using similar wording as for '-u' flag. 2004-08-06 03:17:19 +00:00
hannken
8c21bc6224 Add ffs internal snapshots. Written by Marshall Kirk McKusick for FreeBSD.
- Not enabled by default. Needs kernel option FFS_SNAPSHOT.
- Change parameters of ffs_blkfree.
- Let the copy-on-write functions return an error so spec_strategy
    may fail if the copy-on-write fails.
- Change genfs_*lock*() to use vp->v_vnlock instead of &vp->v_lock.
- Add flag B_METAONLY to VOP_BALLOC to return indirect block buffer.
- Add a function ffs_checkfreefile needed for snapshot creation.
- Add special handling of snapshot files:
    Snapshots may not be opened for writing and the attributes are read-only.
    Use the mtime as the time this snapshot was taken.
    Deny mtime updates for snapshot files.
- Add function transferlockers to transfer any waiting processes from
  one lock to another.
- Add vfsop VFS_SNAPSHOT to take a snapshot and make it accessible through
  a vnode.
- Add snapshot support to ls, fsck_ffs and dump.

Welcome to 2.0F.

Approved by: Jason R. Thorpe <thorpej@netbsd.org>
2004-05-25 14:54:55 +00:00
wiz
07d5d4dfe3 Crossreference -h and -k. Use Aq instead of \*[Lt]\*[Gt]. 2003-12-26 11:19:50 +00:00
simonb
ba2dda9f8e Fix bug with previous change- always initialise d.s_block. Now "ls -1sh"
works.
XXX: ls -sh now always uses 4 chars for the size column width even if it
     needs less than that.
2003-12-26 10:51:25 +00:00
simonb
c4d01568e0 KNF - wrap long lines. 2003-12-26 10:47:32 +00:00
grant
f4c4780250 implement -h(umanize).
from David P. Reese Jr. in PR bin/23870.
2003-12-26 06:19:19 +00:00
lukem
171d653219 Overhaul how `build.sh tools' are used:
*	Rename "config.h" to "nbtool_config.h" and
	HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H.
	This makes in more obvious in the source when we're using
	tools/compat/config.h versus "standard autoconf" config.h

    *	Consistently move the inclusion of nbtool_config.h to before
    	<sys/cdefs.h> so that the former can provide __RCSID() (et al),
    	and there's no need to protect those macros any more.

These changes should make it easier to "tool-ify" a program by adding:
	#if HAVE_NBTOOL_CONFIG_H
	#include "nbtool_config.h"
	#endif
to the top of the source files (for the general case).
2003-10-27 00:12:41 +00:00
wiz
835710a2a0 Bump date for previous; comma cleanup. 2003-09-22 06:01:43 +00:00
jschauma
21ab633500 After last weeks addition of the '-b' flag, add '-B' and '-w' flags,
suggested by uwe@, inspired by FreeBSD.  The three flags override
each other (and the '-q' flag) and behave as follows:

     -B      Force printing of non-printable characters in file names as
	     \xxx, where xxx is the numeric value of the character in octal.

     -b      As -B, but use C escape codes whenever possible.

     -w      Force raw printing of non-printable characters.  This is the
             default when output is not to a terminal.
2003-09-22 02:43:19 +00:00
wiz
fb2e1913c5 Bump date for previous. 2003-09-14 21:56:25 +00:00
jschauma
2ccef82cc4 Implement '-b' option, which, following FreeBSD, Linux and (I think) Solaris
prints octal escapes for nongraphic characters.
2003-09-14 19:16:05 +00:00
wiz
4157dbb127 Sort options (AaBb...). 2003-09-02 08:36:20 +00:00
wiz
9fdd63d776 From FreeBSD bug report 54294, via Jonathan Gray and then jmc@openbsd:
-l option to ls(1) gives all permissions, not just owner and group.
2003-08-28 19:44:09 +00:00
itojun
e1e0321817 use bounded string op 2003-08-13 02:51:20 +00:00
agc
b5b2954259 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22249, verified by myself.
2003-08-07 09:05:01 +00:00
simonb
ae46649fa5 Pass a NULL to getbsize() for any arguments that aren't needed, and
remove the otherwise unused variables.
2003-05-30 00:17:25 +00:00
kleink
7c8d837e74 If both -g and -l options are present, let -l take precedence over -g,
as requested by several users.

POSIX-2001 is unclear on conflicting option letters as far as the -g
option is concerned; a clarification request will be made.

Addresses PR bin/21519 by Geoff Wing.
2003-05-11 08:06:01 +00:00
simonb
7efb28b165 Add a FALLTHROUGH to keep lint happy. 2003-05-07 13:23:32 +00:00
grant
75d0e9d0c0 make -g behave as it should according to SUSv3 (long listing without
owner).

ok'd by kleink@.
2003-05-07 13:00:24 +00:00
wiz
990562bfef .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
2003-02-25 10:34:36 +00:00
grant
fbaeb4bd05 some mdoc improvements.
ok'd by wiz.
2003-02-10 16:10:22 +00:00
itojun
6bf8c47b32 we can't do {} while (0) for TEST() macro since it has "break" which
goes out of the switch statement.  from shin-ichi kaneta.
2002-11-16 13:42:36 +00:00
enami
0cb758feb5 Default .Ar arugment is sufficient. 2002-11-09 12:27:53 +00:00
enami
54a944c353 Cosmetic changes. 2002-11-09 12:27:08 +00:00
simonb
4bce9043f0 Need to initialise the blocksize variable if the -i option is used
too.  The code in display() could possibly be a bit smarter about this
requirement...

Fixes the problem in PR bin/18321 from David Laight and PR bin/18436
from FUKAUMI Naoki.
2002-09-27 12:01:51 +00:00
wiz
14dfaa4b03 New policy: New sentences start on a new line.
Patches by Robert Elz <kre at munnari oz au>, with minimal changes by me.
2002-09-25 15:18:36 +00:00
sommerfeld
af723a4db0 Use the output blocksize when computing how much room to leave for the
-s option, to suppress unnecessary leading spaces.
2002-09-14 04:25:55 +00:00
christos
1eb5da90ed don't include utmp.h 2002-08-01 20:05:48 +00:00
kleink
7595143319 Note that -T is to be used with -l; synced with FreeBSD via Michal
Pasternak on current-users.
2002-06-24 20:14:35 +00:00
kleink
5f23bdba58 Add missing -p to synopsis; from Ryan Younce in PR misc/16555. 2002-04-29 19:47:01 +00:00
ross
dc5571b22e Generate <>& symbolically. I'm avoiding .../dist/... directories for now. 2002-02-08 01:21:55 +00:00
fair
4d71b1538f Add explanation of directory sizes, and a reference to dir(5),
per PR 14291.
2002-02-03 08:00:05 +00:00
tv
9fbd88883c Roll in fixes to permit cross-compiling from non-NetBSD hosts. This
round has been tested on Solaris/x86 and Linux hosts.

* Add host tools cap_mkdb, ctags, m4, uudecode.
* Protect __RCSID() and __COPYRIGHT() better.
* Reduce the number of places that need to include "config.h", to keep
  sources closer to their "vanilla" versions.
* Add more compat #defines and autoconf-checked functions.
2002-01-31 22:43:33 +00:00
tv
fcae5f73b7 Add hooks to make mtree compilable from src/tools. 2002-01-29 00:07:27 +00:00
soren
3dfa483ad3 Oops, pasto. 2001-12-20 20:17:29 +00:00
soren
dc53bf3cba Sync getopt() / man page with actual getopt options. 2001-12-20 20:10:33 +00:00
wiz
8adaff33d3 Use standard headers. 2001-12-20 20:05:25 +00:00
wiz
3ebcdc5e43 Whitespace nits. 2001-12-20 19:31:48 +00:00
lukem
678a800f83 change from WARNS?=1 to WARNS?=2 for bin/ 2001-11-03 13:40:30 +00:00
lukem
a596720367 enable WARNS?= 2 2001-10-19 00:59:07 +00:00
lukem
353bb37176 fix strlcpy length in previous... 2001-10-18 08:03:46 +00:00
lukem
b720dda403 make this WARNS=2 safe 2001-10-18 03:54:18 +00:00
lukem
0d74a5dc03 flags_to_strings() changes:
- fix bug where the 'clear' flag was set outside of main loop, so
  "dump,uchg,arch" on a file with flags would clear all the bits
  (because "dump" sets 'clear'). noted in FreeBSD PR 10071, and fix
  obtained from FreeBSD.

- enforce right-most priority on arguments by clearing the appropriate
  bit in the opposite set; if a string of "nouchg,uchg" is given,
  chflags(8) would clear uchg because it applies the "set" bits before
  clearing the "clear" bits.  now, "uchg" sets UF_IMMUTABLE in setp
  and also resets it in clrp, solving this problem

- constify second arg (the `default' arg)
2001-10-18 03:16:20 +00:00
simonb
79f5a137af Xref getbsize(3). 2001-07-08 15:34:13 +00:00
christos
18d76c325c fix nested extern. 2001-02-04 19:32:26 +00:00
kleink
2caf6aacdd For commands and utilities, use EXIT STATUS rather than RETURN VALUES as
appropriate (and documented in mdoc(7)).
2000-09-04 07:30:07 +00:00
hubertf
1cb54f68ac Add 'RETURN VALUE' section header. 2000-08-28 02:11:04 +00:00