Commit Graph

78 Commits

Author SHA1 Message Date
brueffer
4fe7c95b0b Add missing -l flag to usage().
PR:		163629
Submitted by:	olgeni
MFC after:	1 week
2011-12-26 16:47:45 +00:00
ed
be30d30457 Staticify dumpfs.
This tool only consists of a single C file, so we can simply mark
everything except main() static. This seems to shave off about 8% of the
binary size.
2011-12-13 09:01:44 +00:00
ed
5b02333e84 Add missing static keywords for global variables to tools in sbin/.
These tools declare global variables without using the static keyword,
even though their use is limited to a single C-file, or without placing
an extern declaration of them in the proper header file.
2011-11-04 13:36:02 +00:00
delphij
fd66b2cc64 Use _PATH_DEV and make the format more consistent with GEOM_LABEL.
Submitted by:	ivoras
2011-07-14 17:43:23 +00:00
delphij
06a305b8e2 Add a -l option to show file system's corresponding /dev/ufsid path.
This is useful for scripts that converts existing system's fstab to
use their /dev/ufsid devices.

MFC after:	2 weeks
2011-07-14 08:06:03 +00:00
gavin
22cea9155a We now have multiple filesystems (UFS, ZFS, ...), so for tools that only
operate on one type of filesystem, mention this.
While here, capitalise the use of "UFS" in growfs.8 to match other uses of
the term in other man pages.

MFC after:	1 week
2011-05-08 12:34:31 +00:00
jmallett
1c16fc7189 Add support for displaying newfs flags for SU+J and TRIM. 2011-03-23 08:33:12 +00:00
kib
d69a17ac0a Add support for FS_TRIM to user-mode UFS utilities.
Reviewed by:	mckusick, pjd, pho
Tested by:	pho
MFC after:	1 month
2010-12-29 12:31:18 +00:00
jeff
a574495410 - Merge soft-updates journaling from projects/suj/head into head. This
brings in support for an optional intent log which eliminates the need
   for background fsck on unclean shutdown.

Sponsored by:   iXsystems, Yahoo!, and Juniper.
With help from: McKusick and Peter Holm
2010-04-24 07:05:35 +00:00
gavin
0b338ccc3c Print leading zeros in the UFS2 FSID.
PR:		bin/142155
Submitted by:	Efstratios Karatzas  gpf.kira gmail.com
Approved by:	ed (mentor)
MFC after:	2 weeks
2010-01-06 14:01:28 +00:00
trasz
f04a989f2d Implement NFSv4 ACL support for UFS.
Reviewed by:	rwatson
2009-12-21 19:39:10 +00:00
ru
763b9ae1f8 Switch the default WARNS level for sbin/ to 6.
Submitted by:	Ulrich Spörlein
2009-10-19 16:00:24 +00:00
ru
ff417f4e2b Properly re-create "-s size" argument to newfs(8). 2009-10-19 14:04:19 +00:00
rwatson
4185e1e7a9 Print disk offets as %jd rather than %lld; I fixed one before committing
but missed the other, which breaks 64-bit builds.

Reported by:	bf <bf2006a at yahoo dot com>
MFC after:	1 week
2009-01-28 12:08:19 +00:00
trhodes
80224e0059 Bump doc date for recent change. 2009-01-28 11:31:09 +00:00
rwatson
72666b75fd Add a new flag to dumpfs(8), -f, which causes dumpfs to list all free
fragments in the file system by fragment (block) number.  This new
mode does the necessary arithmetic to generate absolute fragment
numbers rather than than the cg-relative numbers printed in the default
mode.

If -f is passed once, contiguous fragment ranges are collapsed into
an X-Y format as free block lists are currently printed in regular
dumpfs output, but if specified twice, all block numbers are printed
individually, allowing both compact and more script-friendly
representation.

This proves quite handy when attempting to recover deleted data, as it
allows exclusion of non-deleted data from blocks searched.
MFC after:	1 week
Discussed with:	jeff, Richard Clayton <richard dot clayton at cl.cam.ac.uk>
Sponsored by:	Google, Inc.
2009-01-28 09:33:00 +00:00
pav
4ee2adff4a Replace incomprehensive description of -m by much clearer text from OpenBSD,
with the exception of one word.

PR:		docs/112465
Submitted by:	naddy
Obtained from:	OpenBSD
MFC after:	1 week
2007-05-12 22:35:22 +00:00
pjd
aaa4c16f67 Teach about new fields (cg_unrefs and fs_unrefs) and new FS_GJOURNAL flag.
Sponsored by:	home.pl
2006-10-31 22:02:24 +00:00
ru
719be5d341 Sync program's usage() with manpage's SYNOPSIS. 2005-02-10 09:19:34 +00:00
ru
46fddaa54b Mechanically kill hard sentence breaks. 2004-07-02 21:45:06 +00:00
markm
90f91e7879 Remove advertising clause from University of California Regent's license,
per letter dated July 22, 1999.

Approved by: core, imp
2004-04-09 19:58:40 +00:00
truckman
0fc471dff5 Reinstate 1.40 -- swap avgfilesize and avgfpdir column order.
MFC after:	3 days
2003-12-07 05:27:27 +00:00
truckman
545adddc4d I forgot about the code freeze, so back this out. 2003-12-01 00:33:57 +00:00
truckman
d88b7043b3 Swap avgfilesize and avgfpdir order to give better column alignment. 2003-12-01 00:32:34 +00:00
truckman
e31c4979dd Print the dirpref avgfilesize and avgfpdir parameters.
MFC after:	2 weeks
2003-11-17 01:22:07 +00:00
johan
b9e1262c4c Make this WARNS=2 clean by
- using (intmax_t) and %j instead of %q

Tested by:	make universe
2003-11-14 13:13:23 +00:00
jmallett
6cb7abd918 Marshal newfs -L (filesystem volume names), the names are not marshalled
with any quoting, but that should be OK for re-input, regardless.
2003-06-09 09:26:02 +00:00
ru
8b5b8ec6a7 mdoc(7) police: markup laundry. 2003-02-23 01:47:49 +00:00
mckusick
e6a38537d0 Correct lines incorrectly added to the copyright message. Add missing period.
Submitted by:	Bruce Evans <bde@zeta.org.au>
Sponsored by:   DARPA & NAI Labs.
2003-02-14 21:08:14 +00:00
gordon
f340c1ac9e Bring in support for volume labels to the filesystem utilities.
Reviewed by:	mckusick
2003-02-01 04:17:10 +00:00
ru
7c6bc18961 Spell libufs correctly in DPADD.
Reviewed by:	juli
2003-01-26 12:34:36 +00:00
njl
7d4d4fab25 Parse both old flags location and new one. Print out new flags including
acls, multilabel, and location updated.
2003-01-24 00:07:40 +00:00
jmallett
d18b7f355c Add libufs to dependencies. 2003-01-20 21:18:44 +00:00
jmallett
3152c15fb9 Kill initialisation and shadow warnings. Half-hearted cleanup (e.g. only the
more important ones) of format warnings.  XXX Lots of this assumes int32 can
be printed with %d.  Yuck.

Reviewed by:	bde
2003-01-19 12:13:47 +00:00
jmallett
49b60b2ebe Add support to marshal a filesystem to a newfs(8) command that could be used
to create it.  A small number of options are not marshalled as they are things
it would be dumb to spit out, as they are used by internal computations, and
newfs may change them, or they may not be directly apparent.
2003-01-19 10:25:11 +00:00
jmallett
e03de97093 Let libufs handle all the work with regard to going through a list of cgs, now. 2003-01-19 05:51:36 +00:00
jmallett
7a4607b5ca Use libufs to read one cylinder group from the disk at a time. 2003-01-19 01:31:49 +00:00
jmallett
4f8d2d71f0 Simplify the main function now that libufs will hunt for the disk for us. 2003-01-19 01:02:25 +00:00
jmallett
406bb0cfa5 Simplify conditional. 2003-01-18 04:20:20 +00:00
mckusick
9251693096 Create a new 32-bit fs_flags word in the superblock. Add code to move
the old 8-bit fs_old_flags to the new location the first time that the
filesystem is mounted by a new kernel. One of the unused flags in
fs_old_flags is used to indicate that the flags have been moved.
Leave the fs_old_flags word intact so that it will work properly if
used on an old kernel.

Change the fs_sblockloc superblock location field to be in units
of bytes instead of in units of filesystem fragments. The old units
did not work properly when the fragment size exceeeded the superblock
size (8192). Update old fs_sblockloc values at the same time that
the flags are moved.

Suggested by:	BOUWSMA Barry <freebsd-misuser@netscum.dyndns.dk>
Sponsored by:   DARPA & NAI Labs.
2002-11-27 02:18:58 +00:00
peter
1b82dc8de9 Deal with the possibility that time_t != int32_t. Otherwise ia64 thought
the fs_old_size was the half part of fs_old_time etc.
2002-11-17 23:50:41 +00:00
jmallett
3edca81a10 Use more non-b0rked error reporting. Print the disk we are trying to open
and (we have the disk error from libufs? the disk error: the errno).

Requested by:	bde, <many>
2002-11-05 14:30:41 +00:00
jmallett
2d3640fddd Forgot to include <errno.h> when using 'errno' here. 2002-10-22 19:55:44 +00:00
jmallett
7eb8ba29f0 When errno is not set, do not use warn(3). 2002-10-22 19:31:05 +00:00
jmallett
6c17414e48 Use the libufs_printerror() function, which hopefully will deconfuse users
getting error cases in a libufsificated dumpfs(8).

Poked by:	kkenn
2002-10-22 19:27:09 +00:00
trhodes
136be46680 s/filesystem/file system/g as discussed on -developers 2002-08-21 18:11:48 +00:00
jmallett
68c9d8c3c7 Simplify some things to use libufs-provided functionality here, such as the
version of UFS on a disk, and bread() instead of other types of idiocy.

Obtained from:	jmallett_libufs Perforce branch.
2002-08-11 15:38:51 +00:00
jmallett
356638a289 Remove unused variables due to libufs(3) commit. Clean up extraneous use of
semicolon at closing paren of a function body.
2002-07-11 21:46:12 +00:00
jmallett
3f66160d6d Convert dumpfs(8) to libufs(3), rather than rolling local functions for a
number of things.
2002-07-11 21:44:03 +00:00
charnier
a2accd01f0 The .Nm utility 2002-07-06 19:34:18 +00:00