bin/ls sources to libutil:
o Bump libutil minor version number
o Fix uses to include <util.h> to pick up the function definitions
o Fix most uses of flags_to_string() to release the now-malloc()ed result
"Modify the man page to match the behaviour of "ls -q",
(done by yamt@ previously)
...
modify both the behaviour and documentation for "ls -b" and "ls -B" to
make spaces readily apparent. This could be done by adding VIS_WHITE
to the flags passed to strvis(3) in the safe_print() function in
src/bin/ls/util.c."
'ls -b' now yields foo\sbar (whitespace) foo\tbar (tab) foo\rbar (CR).
'ls -B' now yields foo\040bar foo\011bar foo\015bar.
to reflect the actual change (plus minor nits). So here's the actual change:
Rather than '-h' suppressing '-s' when using '-l', make it display
the blocks used in human readable form, as suggested by Alan Barrett
and Daniel Carosone.
(Missing bits spotted, as usual, by wiz@.)
as long as a specific format (that could use COLUMNS) was requested.
This makes
env COLUMNS=50 ls -C > file
not surprise the user who clearly wanted some specific output in the file.
- 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>
* 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).
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.
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.