summaryrefslogtreecommitdiffstats
path: root/sbin/dumpfs/dumpfs.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* With filesystem having many cylinder groups and many inodes per cg theotto2020-06-201-21/+22
| | | | | | | ncg * ipg calcualtion can overflow if signed types are used. Move to uint32_t for the relevant values. Aligned with FreeBSD changes. Also make sure newfs refuses to create an fs with more that 2^32-1 inodes. ok millert@
* Do not look for an FFS1 file system at SBLOCK_UFS2. Doing so willotto2020-02-171-1/+3
| | | | | find the wrong super-block for file systems with 64k block size. ok visa@
* When system calls indicate an error they return -1, not some arbitraryderaadt2019-06-281-2/+2
| | | | | | value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
* Use pledge "disklabel" as needed. The theory here is these tools become morederaadt2015-11-231-1/+4
| | | | | resistant against memory correctup, if a corrupt filesystem is given to them. ok krw
* Adjust <sys/param.h> comments regarding use of use of MAXFRAG, orderaadt2015-01-201-2/+2
| | | | | delete <sys/param.h> if now possible ok guenther
* Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2015-01-161-3/+5
| | | | | | | | | possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
* Nuke another pointless dev_bsize variable always set to 512 and usekrw2014-05-131-6/+3
| | | | | | DEV_BSIZE. David Vasek says it still works the same on 4K-byte-sector device. i.e. prints one value incorrectly. For which a fix should be following soon.
* Use a time_t variable with ctime()guenther2013-04-021-2/+2
| | | | ok deraadt@
* switch open(...) to opendev(...)halex2011-02-281-3/+4
| | | | | | makes yet another utility honor DUID's ok jsing@ miod@ deraadt@
* rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt2009-10-271-15/+1
| | | | | | | unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
* Look at 'fs_flags' when dumping FFS2 file systems, okay beck@, millert@pedro2008-08-191-3/+4
| | | | and otto@.
* fix generated size for -m; bug report by Peter J. Philipp; ok millert@otto2008-06-081-3/+3
| | | | deraadt@
* pick the right csaddr when dumping cgs. Makes FFS2 dumps work much betterotto2008-01-221-3/+3
| | | | ok thib@ millert@
* Use SBLOCKSEARCH[] to find the superblock. OK pedro@millert2007-05-211-18/+14
|
* Add support for ffs2 and a new flag, -m, which will output amillert2007-05-051-129/+280
| | | | | newfs command that can be used to make a filesystem with the same settings. OK otto@
* teach dumpfs about the 'updated' flag; ok pedro@otto2007-04-191-5/+8
|
* Add FFS2 fields to the superblock, change file system tools to keeppedro2007-03-191-14/+14
| | | | | accessing FFS1 fields, okay art@, quite some testing by ckuethe@, simon@ and thib@, thanks.
* Remove option -n from newfs as well as all references to fs_postbl()pedro2006-03-091-25/+3
| | | | Various testing for a while, okay krw@
* ansideraadt2003-06-251-14/+7
|
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-7/+3
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* bogus ; outside of functionderaadt2002-09-061-4/+4
|
* rm trailing whitespacetodd2002-06-091-3/+3
|
* Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.millert2002-02-161-6/+6
|
* remove unused variable; csapuntz okderaadt2001-12-011-3/+3
|
* kill more registers;mpech2001-11-051-6/+6
| | | | millert@ ok
* Fix overflow in superblock. From FreeBSD.gluk2001-04-131-4/+4
| | | | | | | | | | | | | | | | | | | | | | FreeBSD's log: > The ffs superblock includes a 128-byte region for use by temporary > in-core pointers to summary information. An array in this region > (fs_csp) could overflow on filesystems with a very large number of > cylinder groups (~16000 on i386 with 8k blocks). When this happens, > other fields in the superblock get corrupted, and fsck refuses to > check the filesystem. > > Solve this problem by replacing the fs_csp array in 'struct fs' > with a single pointer, and add padding to keep the length of the > 128-byte region fixed. Update the kernel and userland utilities > to use just this single pointer. > > With this change, the kernel no longer makes use of the superblock > fields 'fs_csshift' and 'fs_csmask'. Add a comment to newfs/mkfs.c > to indicate that these fields must be calculated for compatibility > with older kernels. art@ ok.
* print out fs_flags fields; mpp@freebsdderaadt1999-07-181-2/+13
|
* handle truncated superblock read; rnordier@freebsdderaadt1998-04-251-3/+10
|
* Say "soft updates" when FS_DOSOFTDEP is set in superblock, could look nicer.millert1997-11-131-6/+6
|
* print fs_maxfilesize; bde@freebsdderaadt1997-06-301-4/+4
|
* lukem: Determine filesystem level (ref: fsck_ffs(8) -c ...) and display it.deraadt1997-05-311-6/+19
| | | | | | | Code was derivied from observing how fsck_ffs `upgrades' to a given level, and has been tested on recent NetBSD filesystems (reports as "3"), SunOS ("1"), and ULTRIX ("0"). I haven't found a filesystem of level "2" to test, but the code should detect it. Fixes [bin/1353]
* Remove occurences of headswitch and trackseek, they no longermillert1997-02-111-4/+3
| | | | exist in struct fs.
* update rcsidderaadt1996-06-231-1/+2
|
* sync with netbsdderaadt1996-01-111-5/+5
|
* lseek botch repair; from tegge@idt.unit.no; netbsd pr#1768deraadt1995-11-201-3/+3
|
* initial import of NetBSD treederaadt1995-10-181-0/+330