Commit Graph

14 Commits

Author SHA1 Message Date
Xin LI
5c68d10833 Don't coredump when executed with -o. 2008-01-29 00:20:00 +00:00
Brian Somers
8428fde517 Default output to stdout as the man page suggests. 2007-02-14 23:22:33 +00:00
Brian Somers
30e3c0fa25 Only go through our cylinder group and inode info when we need to.
This allows ``ffsinfo -o - -l1 /tmp'' to run a lot quicker.
2007-02-14 23:20:30 +00:00
Brian Somers
89f0730d6b Re-indent main() in preparation for further changes. 2007-02-14 23:12:32 +00:00
Robert Watson
c4b2cc12ae Don't default to '/var/tmp/ffsinfo' for the output of ffsinfo(8), since
/var/tmp is a world-writable directory.

MFC after:	3 days
Reported by:	Jon Passki <cykyc@yahoo.com>
2005-03-31 04:05:17 +00:00
Ruslan Ermilov
8d646af581 Sync program's usage() with manpage's SYNOPSIS. 2005-02-10 09:19:34 +00:00
Robert Watson
7bb84191e6 The ffsinfo utility uses atol() to parse numeric values out of optarg
strings.  This isn't necessarily a bug, but it can be slightly inconvenient,
because atol() doesn't know how to parse hexadecimal or octal numbers and at
least one of the options of ffsinfo(8) would be easier to use if it did.

Changing atol() -> strtol() allows one to use hex masks for -l MASK, i.e.:

orion:/a/freebsd/src/sbin/ffsinfo# ./ffsinfo -l 0x3ff /

PR:		73110
Submitted by:	keramida
MFC after:	2 weeks
2005-01-03 18:59:04 +00:00
Stefan Farfeleder
f901ebcfb6 Assign the result of getopt() to an int rather than to a char (which is
possibly unsigned).
2004-07-26 15:04:57 +00:00
Robert Watson
942d2e0205 Commit 1 of 2 to fix ffsinfo(8) for UFS2.
Update ffsinfo(8) to use new UFS2 support in the growfs(8) debugging
functions.  Largely consists of renaming fields and types to be aware
of the UFS1/UFS2 distinction, relying on libufs(3) to open and sanity
check the device/file/label accessed.

Since libufs(3) now handles label/UFS interactions, remove -L argument.

Note: when submitted, this patch had substantial style changes.  I've
attempted to remove the restyling from the patch to separate the
functional and style changes.

Submitted by:	Lukas Ertl <l.ertl@univie.ac.at>
PR:		bin/53517
2003-08-14 18:55:31 +00:00
Tom Rhodes
ce66ddb763 s/filesystem/file system/g as discussed on -developers 2002-08-21 18:11:48 +00:00
Ruslan Ermilov
8af1452cf8 Removed duplicate VCS ID tags, as per style(9). 2001-08-13 14:06:34 +00:00
Thomas-Henning von Kamptz
adcaff07f8 cleanup to get rid of most warnings on alpha
and yes now it also works on alpha

Reviewed by:	chm
MFC after:	3 weeks
2001-06-07 20:43:00 +00:00
Thomas-Henning von Kamptz
4020c5bc54 corrected spelling mistakes in comments
check a couple of mallocs
usage of errx
linebreaks of DBG_ macros,
correcting the usage of nroff macros

Submitted by:	grog, charnier
Reviewed by:	chm
2000-12-12 20:03:17 +00:00
Thomas-Henning von Kamptz
3d5000784d added growfs(8) including ffsinfo(8) to the freebsd base system
Reviewed by:	 grog
2000-12-09 15:27:35 +00:00