Commit Graph

30 Commits

Author SHA1 Message Date
xtraeme 598409109e Add -b flag into usage(). 2007-05-01 21:43:37 +00:00
xtraeme b83d27bc99 Bump date. 2007-05-01 21:41:52 +00:00
perseant faaef229b4 Add a "-b" option to search a partition for valid alternate superblocks,
rather than searching the disk for partitions.  Also, test LFS superblock
checksums before we report them.
2007-05-01 21:28:50 +00:00
xtraeme bebefe198b * There's no need to use an int to store the returned value of
ffs_checkver() and later use it in the switch statement, just
  use ffs_checkver.
* Remove unneded <sys/queue.h> header.
* Remove LFS from fstypes, it was never used.
* Increase SBCOUNT to 128, works faster.
* Remove unneded casts.
* (-F mode) close fd when the scan has finished or if pread() failed.
* (-F mode) print total size of file.
2007-02-16 01:32:21 +00:00
wiz a88697ed0e Improve English. 2006-10-17 09:26:21 +00:00
xtraeme 3481053ae9 Use O_DIRECT (aka Direct I/O) when -F is used. 2006-10-15 13:18:24 +00:00
xtraeme 7cf1cb802e Detect FFSv1 partitions with fragsize/blocksize greater than
2048/16384.
2006-10-14 13:22:34 +00:00
wiz 49751ff510 Sort options in usage and SYNOPSIS. 2006-09-10 20:28:52 +00:00
xtraeme a0a2046917 - Change the cast of st_size to uint64_t to avoid future problems
with large files.
- u_uintXX_t -> uintXX_t
2006-09-08 12:38:32 +00:00
xtraeme 96734c01d1 Change -f to -F, per mrg's suggestion. 2006-09-07 02:24:51 +00:00
xtraeme 7aa92d971b Add -f file support. Useful to search for partitions on disk images. 2006-09-07 00:48:21 +00:00
ghen 6c96070844 scan_ffs(8) has been pulled up into netbsd-3 and thus will have
"first appeared in NetBSD 3.1", not 4.0.
2006-08-12 10:14:22 +00:00
xtraeme d5b623c0b0 Specify the scan_ffs manpage, otherwise it will use scan_ffs.1. 2005-09-10 23:15:52 +00:00
wiz e9134234a3 Fold scan_lfs.8 into scan_ffs.8. It's the same program, after all.
Ok'd by xtraeme.
2005-09-10 23:08:37 +00:00
wiz 1635c91622 Improve wording and comma usage. 2005-09-09 20:21:39 +00:00
xtraeme 52f9067be9 Remove an extra conditional while searching for LFS superblocks,
it's not needed.
2005-09-02 17:48:40 +00:00
he 488e14a7ad Undefine the 17 macros commonly defined by <ufs/ffs/fs.h> and
<ufs/lfs/lfs.h> before including the second of them, and also after
including the second, to ensure the rest of the code doesn't depend
on their (ambigious) definition.

This fixes a build problem for vax; gcc 2.95.3's preprocessor
apparently doesn't like redefinition of macros.

Discussed with xtraeme.
2005-08-09 12:59:29 +00:00
xtraeme 4ef578d357 * Replace lseek() and read() calls with one single pread()
* Align cpg/sgs correctly.
2005-08-09 01:49:23 +00:00
christos b6a232217f Pass lint and get/setprogname. 2005-07-31 20:19:40 +00:00
xtraeme c99f08c80d typo 2005-07-31 19:40:50 +00:00
xtraeme 016ad35975 Add scan_lfs(8), utility to find LFS partitions on disk, useful
to recover lost disklabels.
2005-07-31 19:26:06 +00:00
christos 2c6eadc9ce Move WARNS=3 to the Makefile.inc, and add a little const to the remaining
programs that did not compile before.
2005-06-27 01:00:04 +00:00
xtraeme ddd459d409 Add missing '\n' into usage(). 2005-06-23 17:25:31 +00:00
wiz 9a425d58bc Remove superfluous .El; a slight wording change. 2005-06-19 16:01:38 +00:00
wiz 6aa388dc21 Incorporate my review comments. 2005-06-19 16:00:26 +00:00
christos e0db7c68ff WARNS=4, misc cleanups.
- void casts
- remove unused notreached
- use a loop instead of code duplication
- use switches and #define constants
2005-06-15 20:03:03 +00:00
peter d191390e9e fix the date, use .An for names, correct the name (scanffs -> scan_ffs),
.Ox/.Nx for OpenBSD/NetBSD, mention appearance in NetBSD.
2005-06-15 19:02:54 +00:00
kleink 4a74bb7497 Use EXIT_{SUCCESS,FAILURE}. 2005-06-15 18:42:23 +00:00
kleink 32f2d508d6 No need to define SRCS here. 2005-06-15 18:39:46 +00:00
xtraeme b67b8509c2 Add scan_ffs(8) from OpenBSD, it was modified to support FFSv2
for NetBSD (with different blocksizes). Utility to find
FFSv1 and FFSv2 partitions on disks, useful to recover lost
disklabels.

Reviewed by christos.
2005-06-15 18:06:19 +00:00