History log of /freebsd-10.0-release/sbin/fsdb/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
259065 07-Dec-2013 gjb

- Copy stable/10 (r259064) to releng/10.0 as part of the
10.0-RELEASE cycle.
- Update __FreeBSD_version [1]
- Set branch name to -RC1

[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so
start releng/10.0 at '100' so the branch is started with
a value ending in zero.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


248658 23-Mar-2013 mckusick

Revert 248634 and 248643 (e.g., restoring 248625 and 248639).

Build verified by: Glen Barber (gjb@)


248643 23-Mar-2013 gjb

Revert r248639 to fix build failure on head/


248639 23-Mar-2013 mckusick

Fix the build after addition of cylinder group cacheing (r248625)

Reported by: Glen Barber (gjb@)
Pointy hat to: Kirk McKusick (mckusick@)


247234 24-Feb-2013 pluknet

Catch up with internal API changes for initbarea() and getdatablk()
of fsck_ffs introduced with r247212.

Submitted by: David Wolfskill <david@catwhisker.org>


246823 15-Feb-2013 pluknet

Remove write only assignments and thus fix the build after struct bufarea
TAILQ conversion (r246812).


241013 27-Sep-2012 mdf

Fix sbin/ build with a 64-bit ino_t.

Original code by: Gleb Kurtsou


232749 09-Mar-2012 dim

Partially undo r228693, by removing NO_WFORMAT.clang in fsdb's Makefile,
and fixing the format string in sbin/fsdb/fsdbutil.c instead.

Note the remark "Work around a problem with format string warnings and
ntohs macros" was actually incorrect. The DIP(dp, di_nlink) macro
invocation actually returned an int, due to its ternary expression, even
though the di_nlink members of struct ufs1_dinode and struct ufs2_dinode
are both defined as int16_t.

MFC after: 2 weeks


232263 28-Feb-2012 dim

Define several extra macros in bsd.sys.mk and sys/conf/kern.pre.mk, to
get rid of testing explicitly for clang (using ${CC:T:Mclang}) in
individual Makefiles.

Instead, use the following extra macros, for use with clang:
- NO_WERROR.clang (disables -Werror)
- NO_WCAST_ALIGN.clang (disables -Wcast-align)
- NO_WFORMAT.clang (disables -Wformat and friends)
- CLANG_NO_IAS (disables integrated assembler)
- CLANG_OPT_SMALL (adds flags for extra small size optimizations)

As a side effect, this enables setting CC/CXX/CPP in src.conf instead of
make.conf! For clang, use the following:

CC=clang
CXX=clang++
CPP=clang-cpp

MFC after: 2 weeks


231102 06-Feb-2012 truckman

Improve sparse file handling when printing the block list for an inode by
not bailing out early when a hole is encountered in the direct block list.
Print NULL block pointers in the direct block list. Simplify the
code that prints the fragment count.

Match the style of the existing code.

Reviewed by: mckusick
MFC after: 1 week


228693 18-Dec-2011 dim

Revert r228603, and add the workaround to sbin/fsdb/Makefile instead.

MFC after: 1 week


228603 16-Dec-2011 dim

In sbin/fsdb/fsdbutil.c, work around a clang false positive with printf
format warnings and conditional operators. (See LLVM PR 11313 for more
information.)

MFC after: 1 week


225847 28-Sep-2011 ed

Get rid of major/minor number distinction.

As of FreeBSD 6, devices can only be opened through devfs. These device
nodes don't have major and minor numbers anymore. The st_rdev field in
struct stat is simply based a copy of st_ino.

Simply display device numbers as hexadecimal, using "%#jx". This is
allowed by POSIX, since it explicitly states things like the following
(example taken from ls(1)):

"If the file is a character special or block special file, the
size of the file may be replaced with implementation-defined
information associated with the device in question."

This makes the output of these commands more compact. For example, ls(1)
now uses approximately four columns less. While there, simplify the
column length calculation from ls(1) by calling snprintf() with a NULL
buffer.

Don't be afraid; if needed one can still obtain individual major/minor
numbers using stat(1).


217769 24-Jan-2011 mckusick

The dump, fsck_ffs, fsdb, fsirand, newfs, makefs, and quot utilities
include sys/time.h instead of time.h. This include is incorrect as
per the manpages for the APIs and the POSIX definitions. This commit
replaces sys/time.h where necessary with time.h.

The commit also includes some minor style(9) header fixup in newfs.

This commit is part of a larger effort by Garrett Cooper started in
//depot/user/gcooper/posix-conformance-work/ -- to make FreeBSD more
POSIX compliant.

Submitted by: Garrett Cooper yanegomi at gmail dot com


207141 24-Apr-2010 jeff

- 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


163846 31-Oct-2006 pjd

Update after function renames.

Sponsored by: home.pl


162395 18-Sep-2006 ru

Markup fixes.


161568 24-Aug-2006 ceri

Add a note that the btime command only works on UFS2.

Suggested by: maxim (who had also done the btime patch independently).


161558 23-Aug-2006 ceri

Allow fsdb to manipulate the birthtime entries on UFS2.

Approved by: jhb
MFC after: 1 month


159169 02-Jun-2006 maxim

o Implement findblk command: find the inode(s) owning the specified
disk block(s) number(s).

Obtained from: NetBSD
MFC after: 2 months


157950 21-Apr-2006 maxim

o Do recrack(arguments) for commands which actually take NAME as
arguments so we do not coredump at "help foo", "back bar" and such.

o Be consistent and print argc - 1 as a command arguments number in
all cases.

PR: bin/37096
Submitted by: Joshua Goodall
MFC after: 1 month


151471 19-Oct-2005 stefanf

Use the new name H_SETSIZE instead of the old H_EVENT to set the history
size.

PR: 86355


148833 07-Aug-2005 stefanf

The libedit update made a const cast necessary.


141775 12-Feb-2005 trhodes

Reword a sentence to conform with our mdoc(7) style.
Modify wording in a sentence to avoid a run on within ().
Remove a contraction.

Submitted by: Joel Dahl <joel@automatvapen.se> (original version)


140415 18-Jan-2005 ru

Sort sections.


136322 09-Oct-2004 le

Make fsck WARNS=2 clean.


132763 28-Jul-2004 kan

Downgrade WARNS level until GCC 3.4.2 warning are fixed.


131488 02-Jul-2004 ru

Mechanically kill hard sentence breaks.


125503 05-Feb-2004 ru

Fixed style of DPADD and LDADD assignments as per style.Makefile(5).


122621 13-Nov-2003 johan

Make this WARNS=2 clean by
- #include <timeconv.h> for _time_to_time32 et al
- use (uintmax_t) and %j
- remove unused variable 'j' (from PR 39866)

PR: 39866
Submitted by: Dan Lukes <dan@obluda.cz>
Tested by: make universe


119569 30-Aug-2003 brueffer

Backout Rev. 1.24

English lessons provided by: jhb


119564 29-Aug-2003 brueffer

Grammar fix


103402 16-Sep-2002 phk

I forgot fsdb was still sharing files with fsck.


102231 21-Aug-2002 trhodes

s/filesystem/file system/g as discussed on -developers


100935 30-Jul-2002 phk

Warning cleanup.

Format changes by peter


99501 06-Jul-2002 charnier

The .Nm utility


98542 21-Jun-2002 mckusick

This commit adds basic support for the UFS2 filesystem. The UFS2
filesystem expands the inode to 256 bytes to make space for 64-bit
block pointers. It also adds a file-creation time field, an ability
to use jumbo blocks per inode to allow extent like pointer density,
and space for extended attributes (up to twice the filesystem block
size worth of attributes, e.g., on a 16K filesystem, there is space
for 32K of attributes). UFS2 fully supports and runs existing UFS1
filesystems. New filesystems built using newfs can be built in either
UFS1 or UFS2 format using the -O option. In this commit UFS1 is
the default format, so if you want to build UFS2 format filesystems,
you must specify -O 2. This default will be changed to UFS2 when
UFS2 proves itself to be stable. In this commit the boot code for
reading UFS2 filesystems is not compiled (see /sys/boot/common/ufsread.c)
as there is insufficient space in the boot block. Once the size of the
boot block is increased, this code can be defined.

Things to note: the definition of SBSIZE has changed to SBLOCKSIZE.
The header file <ufs/ufs/dinode.h> must be included before
<ufs/ffs/fs.h> so as to get the definitions of ufs2_daddr_t and
ufs_lbn_t.

Still TODO:
Verify that the first level bootstraps work for all the architectures.
Convert the utility ffsinfo to understand UFS2 and test growfs.
Add support for the extended attribute storage. Update soft updates
to ensure integrity of extended attribute storage. Switch the
current extended attribute interfaces to use the extended attribute
storage. Add the extent like functionality (framework is there,
but is currently never used).

Sponsored by: DARPA & NAI Labs.
Reviewed by: Poul-Henning Kamp <phk@freebsd.org>


96707 16-May-2002 trhodes

more file system > filesystem


96570 14-May-2002 phk

Match prototypes to functions over in fsck_ffs.


92881 21-Mar-2002 imp

o __P removal.
o ansi function definitions.
o main prototype removal
o unifdef __STDC__


92806 20-Mar-2002 obrien

Remove 'register' keyword.
It does not help modern compilers, and some may take some hit from it.
(I also found several functions that listed *every* of its 10 local vars with
"register" -- just how many free registers do people think machines have?)


92358 15-Mar-2002 ru

This sounds better.


89827 26-Jan-2002 joerg

Something i always wanted to see: add a function to print the list of
blocks allocated by some inode. Indirect blocks are printed
recursively, so beware :), the list could become lengthy...
(We should probably add some output pager to fsdb.)

MFC after: 1 month


89826 26-Jan-2002 joerg

Avoid pointless initialization of global variables to 0. This only
bloats the resulting binary file by forcing them out of .bss into
.data, while the C standard already guarantees them to become
initialized to 0 at program startup.

MFC after: 1 week


89810 26-Jan-2002 joerg

Don't exit with -1 if the user typed "quit".

MFC after: 1 week


89792 25-Jan-2002 green

Remove a not-very-useful printf(3).


89791 25-Jan-2002 green

Allow fsdb the ability to work with entries named with whitespace embedded.

This works by retokenizing a line with a split limit so that if the
argument count for a command is greater than the number of arguments
formed by splitting apart the line of user input, the last argument
is instead all of the remainder of the input line.

Yes, I needed this capability at one point to fix a filesystem manually,
which happened to break with a problematic space-containing directory
entry.


87325 04-Dec-2001 obrien

Default to WARNS=2.
Binary builds that cannot handle this must explicitly set WARNS=0.

Reviewed by: mike


86258 11-Nov-2001 iedowse

Check that the mode argument to fsdb's `chmod' command contains no
inode type bits set. Previously it would let you set IFMT bits (but
not clear them). The `chtype' command should be be used instead
for changing the inode type; having chmod half-work only causes
confusion.


84261 01-Oct-2001 obrien

*** empty log message ***


79754 15-Jul-2001 dd

Remove whitespace at EOL.


79530 10-Jul-2001 ru

mdoc(7) police: removed HISTORY info from the .Os call.


75884 23-Apr-2001 iedowse

In fsdb, call sblock_init() which is now necessary to initialise
the global variable dev_bsize. Add a prototype for sblock_init()
to fsck.h, and set the return type correctly.


74815 26-Mar-2001 ru

- Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.


74652 22-Mar-2001 roberto

Respect style(9), one must not include both <sys/types.h> and
<sys/param.h> (the latter includes the former).

Submitted by: bde


74594 21-Mar-2001 alfred

Include headers to unbreak world.

Submitted by: Ollivier Robert <roberto@eurocontrol.fr>


74531 20-Mar-2001 ru

Set the default manual section for sbin/ to 8.


71895 01-Feb-2001 ru

mdoc(7) police: split punctuation characters + misc fixes.


71099 16-Jan-2001 ru

Prepare for mdoc(7)NG.


68960 20-Nov-2000 ru

mdoc(7) police: use the new features of the Nm macro.


68575 10-Nov-2000 ru

Avoid use of direct troff requests in mdoc(7) manual pages.


66868 09-Oct-2000 adrian

Reviewed by: rwatson, bp
Approved by: rwatson
Obtained from: NetBSD source tree

Second part of the fsck wrappers commit. This commit enables the new fsck
code (removing the fsck/* code and replacing it with the netbsd fsck
wrapper code), and enabling some FFS-based utilities to compile.

Details:

* quotacheck, fsdb required modification to use the fsck_ffs/ code rather
than fsck/ . This might change later since quotacheck requires preen.c
which should exist in fsck/ rather than fsck_ffs/

* src/Makefile has fsck_ffs added to it so it it built as part of the tree
now

* share/doc/smm/03.fsck/ uses the SMM.doc/ stuff from fsck_ffs, not fsck.

I've tested this, and it shouldn't require any changes on your machine.
The fsck wrapper reads /etc/fsck and is command-line-compatible enough
to not require rc changes (well, most changes unless you want to do
anything nifty by specifying the fs types explicityly, read the man page
if you want further details on what it can do.)

This now allows us to support multiple filesystem types during bootup.


59869 01-May-2000 asmodai

Remove unused includes.


56407 23-Jan-2000 mpp

Fix various man pages to stop abusing the .Bx macro to generate
the strings "FreeBSD" and "NetBSD". Use the .Fx or .Nx macro
instead.


54872 20-Dec-1999 billf

'clri' takes an argument.

Reviewed by: phk


50476 28-Aug-1999 peter

$Id$ -> $FreeBSD$


46080 25-Apr-1999 imp

More egcs warning fixes:
o main returns int not void
o use braces to avoid potentially ambiguous else

Note: The fix to natd is potentially functional in nature since I used
the indentation as the right thing rather than the struct semantics.
Someone more familiar with the code should double check me on this one.

Reviewed by: obrien and chuckr


45641 13-Apr-1999 ghelmer

Correctly ref editline(3).

PR: docs/10973


41023 09-Nov-1998 truckman

Fix some calculations that use sizeof to attempt to find the end of an
array that were doing sizeof on an unrelated variable. This just happened
to work right on the i386, but would not on the alpha.

PR: bin/8427


37237 28-Jun-1998 bde

Fixed printf format errors.


37001 15-Jun-1998 charnier

Correct use of .Nm. Use .Bl/.El for enumerating options. Use .An. Correct
formatting of rcsid. Remove unused #includes. Do not use memory after
freeing it.


33139 06-Feb-1998 jhay

opt_diagnostic.h isn't needed anymore.


33118 05-Feb-1998 jhay

fsdb and fsck use the ffs code which needs opt_diagnostic.h.


26557 11-Jun-1997 charnier

Remove __progname. Make -f a no-op flag as stated in the man page. Remove
unused variables.


24956 15-Apr-1997 joerg

Implement a -r option to fsdb(8), ``read/only''.


23854 13-Mar-1997 bde

Fixed bogus casts from (int32_t *) to (time_t *).


23839 13-Mar-1997 peter

Missing $Id$


23838 13-Mar-1997 peter

Make this compile. Mostly use the new names for the ctime/atime/mtime
stamps in the inodes and call one of fsck's utility funcs with a new arg.


22990 22-Feb-1997 peter

Revert $FreeBSD$ to $Id$


21673 14-Jan-1997 jkh

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.


21635 13-Jan-1997 wosch

Sort cross references.


18585 30-Sep-1996 guido

Get rid of useless -f flag (though left for historical reasons).


18498 26-Sep-1996 guido

Add chlen command so you can set the size of an inode. This was handy
in order to create sparse directory files that caused a panic of a
filesystem where fsck would not find anything. A fix for fsck is in the
make but still has to be reviewed by Kirk McKusick.


18406 20-Sep-1996 nate

ts_sec -> tv_sec
ts_nsec -> tv_nsec


18003 02-Sep-1996 peter

Add ${DPADD}, $Id$


12480 24-Nov-1995 peter

Adjust relative paths in Makefile to ../sbin/fsck and ../../sys/ufs/ffs


12051 03-Nov-1995 peter

Commit FreeBSD-specific changes. Mainly to do with structure layout
differences that we dont have.


12049 03-Nov-1995 peter

This commit was generated by cvs2svn to compensate for changes in r12048,
which included commits to RCS files with non-trunk default branches.