Commit Graph

172 Commits

Author SHA1 Message Date
mlelstv a62f667a0a fix logic that handles command line arguments. Now you can:
fsck /mnt/point
fsck dkX
fsck rdkX
fsck /dev/dkX
fsck /dev/rdkX
fsck NAME=wedge
2014-10-25 22:00:19 +00:00
jakllsch aff82b369b Make getdiskinfo() always return correct dkwedge_info for the raw partition.
A real disk's raw partition does not implement DIOCGWEDGEINFO, but does
implement DIOCGDINFO.  This was resulting in the returned wedge information
containing 32-bit-clamped values for size of the raw partition, with no
indication thereof.
2013-04-13 22:08:57 +00:00
mlelstv 9fc3186941 Support symlinks to a block device to resolve the name of the
corresponding raw device.
2013-01-13 19:53:16 +00:00
christos ba7ad7276d Don't re-use the same buffer that we pass in for newname in the cooked->raw
conversion. Better variable names.
2012-04-08 04:19:14 +00:00
christos ca11e1e667 factor out rawname() from dump, fsck, savecore. 2012-04-07 16:44:10 +00:00
christos 5727fadda2 use getfsspecname() 2012-04-07 04:52:20 +00:00
christos 29c49ee745 use getfstypename 2011-11-13 22:04:51 +00:00
joerg 6923d07c1a Use __dead and __printflike. 2011-08-27 17:34:44 +00:00
christos 453164da22 fix compilation. 2011-06-09 21:23:29 +00:00
christos 23ffdf5bd3 share more code. 2011-06-09 19:57:50 +00:00
wiz b882daa546 New sentence, new line. Sort sections. 2011-04-28 12:16:10 +00:00
christos c6af1de885 - use warn/err properly
- wrap long lines
2010-03-06 00:30:54 +00:00
hannken 626b19f88a Dont pass option -x down to fsck_xxxfs.
Hi christos ...
2010-02-24 13:56:07 +00:00
wiz e386b4ea79 Use Dq for double quotes; remove trailing whitespace. 2010-02-18 06:57:17 +00:00
christos 639f597520 Add -x <mountpoint> ``exclude'' option. 2010-02-17 23:30:21 +00:00
christos c68c36a514 Centralize time printing and deal with ctime possibly returning NULL. 2010-02-04 23:55:42 +00:00
snj 550147bd6a Remove 3rd and 4th clauses in christos' license. OK christos. 2009-10-21 01:07:44 +00:00
dyoung ca53a4b923 Callers expect getdiskinfo() to return -1 on error, so do that.
Simplify getdiskinfo() a bit while I am here: don't save error
codes that we will never refer to again.
2009-07-16 23:50:32 +00:00
haad 44141aa6ee Remove bogus warn, which was printed when DIOCGDISKINFO failed. 2009-06-14 21:06:18 +00:00
haad 63b509d1c8 Add support for devices which do not support DIOCGDISKINFO ioctl yet. This
change  will restore fsck/newfs on vnd device.
2009-06-06 18:31:29 +00:00
haad 42c8b251b8 Remove debug printfs. 2009-06-06 17:47:50 +00:00
haad f5b48500f1 Add support for DIOCGDISKINFO to disk like device drivers. Change
partutil.c::getdiskinfo to use it to get disk geometry info.
Use DIOCGWEDGEINFO ioctl to get information about partition size, if disk
driver doesn't support it use old DIOCGDINFO. This patch adds support for
wedge like devices(lvm logical volumes, ZFS zvol partitions) to newfs and
other tools.

No objections on tech-userlevel@.
2009-06-05 21:52:31 +00:00
lukem cefb0777de fix sign-compare issues 2009-04-11 06:48:36 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
lukem 481ad7b03a errexit() now provides the trailing \n (since fsck_ffs assumed that
from a conversion from err(3)), so "make it so".
2008-03-16 23:17:55 +00:00
reed baa9962260 Fix typo. 2008-02-24 00:34:51 +00:00
christos 742b48d55e Make sure that the exit values are always sane, and use symbolic instead
of magic constants. Reviewed by go@
2008-02-23 21:41:47 +00:00
christos 1fe4bceb66 Say what our exit values mean (this is not correct right now, because not
all fsck programs have been fixed but it will be soon).
2008-02-23 20:38:53 +00:00
ragge 9949926272 __attribute -> __attribute__. 2007-09-15 14:35:33 +00:00
christos fede0a77fc kill MFSNAMELEN 2007-07-17 20:03:10 +00:00
rumble 0a71191807 Cross-reference fsck_lfs and fsck_ext2fs. 2007-02-23 19:32:16 +00:00
christos df99a4dd43 Sprinkle volatile, instead of using the (void)&foo; which does not work on
gcc 4.
2006-12-13 16:08:26 +00:00
apb f93df16b06 Improve the progress bar displayed by fsck_ffs -p -P.
The progress bar will now travel from 0 to 20% during pass 1, from 20%
to 95% during pass 2, and from 95% to 100% during passes 3, 4, and 5.
Previously, the progress bar was not displayed at all during pass 1,
slowly traveled from 0 to about 50% during pass 2, and then very rapidly
traveled from 50% to 100% during passes 3, 4, and 5.

Note that fsck_ffs is the only user of fsck/progress.{c,h}.
2006-11-14 21:01:46 +00:00
christos 56641252ba - add volatile
- static before const
2006-10-16 02:44:46 +00:00
christos e0811114bb add a const 2006-08-27 09:20:53 +00:00
christos 09e8908e10 - make preen recognize wedges and insert their parent disks in the disk list
so that we don't run multiple fsck's on the same spindle at the same time!
- Add some partition getting utilities that are wedge aware (soon to be able
  to use the native geometry ioctl), so that we can fsck wedges.
2006-08-26 21:54:05 +00:00
christos 2a1607d040 Programs that use efun. 2006-08-26 18:14:28 +00:00
christos 6a6266cc74 s/perror/perr/ so that we can make it varyadic. Overloading stdio's perror()
sneaky.
2006-06-05 16:52:05 +00:00
christos 635d729786 Coverity CID 1745: Fix memory leak. 2006-03-20 01:27:44 +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
atatat 885dad801d If progress is disabled, don't clear the progress bar. 2005-05-10 00:39:04 +00:00
xtraeme 665b6c1237 Add 'P' (progress meter flag) to getopt()'s optstring, remove
main() prototype.
2005-01-19 17:48:15 +00:00
wiz 0826288907 Sync usage with reality. 2005-01-19 16:38:28 +00:00
wiz 9817d5f00a Sort options. 2005-01-19 16:13:57 +00:00
christos 5f101a4767 When we run with 'fsck -f -n' we should go over all the filesystems, not
exit on the first one that fails. Add a new flag CHECK_NOFIX so that we
specify -n, we keep going.
2005-01-13 22:56:09 +00:00
christos a73c2bd574 Add a progress meter to fsck_ffs based on the work by thorpej presented
to the mailing lists last January. This is optional.
2005-01-13 15:22:35 +00:00
dsl 750ce43a65 Add (unsigned char) to isdigit() call 2004-10-28 19:59:09 +00:00
thorpej ef92b0de59 Try the DIOCGWEDGEINFO ioctl first. If that succeeds (i.e. the block
device is a wedge), use the partition type string from the dkwedge_info
structure to get the file system type.
2004-09-25 03:32:52 +00:00
christos 4ee0bfb762 Remove special case for RESCUEDIR 2004-08-19 23:02:51 +00:00
christos ea369b9669 Deal with RESCUEDIR 2004-08-19 22:25:49 +00:00