lukem
cefb0777de
fix sign-compare issues
2009-04-11 06:48:36 +00:00
perry
8b0f9554ff
convert __attribute__s to applicable cdefs.h macros
2007-12-15 19:44:37 +00:00
xtraeme
8b2678bd7e
Use a two clause license for all the code I contributed.
...
The envsys code will be changed later.
2007-10-06 07:21:02 +00:00
xtraeme
598409109e
Add -b flag into usage().
2007-05-01 21:43:37 +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
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
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
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
xtraeme
ddd459d409
Add missing '\n' into usage().
2005-06-23 17:25:31 +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
kleink
4a74bb7497
Use EXIT_{SUCCESS,FAILURE}.
2005-06-15 18:42:23 +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