Commit Graph

171 Commits

Author SHA1 Message Date
christos 7570f6e829 Remove my license. 2004-03-20 20:28:44 +00:00
jmmv b635f565e7 Homogenize usage messages: make the 'usage' word all lowercase, as this seems
to be the most common practice in our tree.
2004-01-05 23:23:32 +00:00
dsl e69ce3e4bf Add a -q (quiet) option to print nothing for clean filesystems.
Support in fsck_ffs and stub in fsck_xxx.
Push a few more messages through pwarn() instead of printf() to ensure
disk name is shown.
2003-10-20 12:04:38 +00:00
agc bf07c8719a Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22308, verified by myself.
2003-08-07 10:04:11 +00:00
perseant 42b9009195 Make vmsg non-static, so it can be used directly by fsck_lfs. 2003-03-28 08:12:38 +00:00
wiz 990562bfef .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
2003-02-25 10:34:36 +00:00
wiz 2fb4b1db52 New sentence, new line. By Robert Elz with minimal fixes. 2002-10-01 13:40:23 +00:00
lukem f8df88f111 if RESCUEDIR is defined, set _PATH_RESCUE to that 2002-08-23 03:19:07 +00:00
lukem 8f87d6469c if _PATH_RESCUE is defined, try that before _PATH_SBIN & _PATH_USRSBIN 2002-08-23 03:17:18 +00:00
grant 6742cb1812 sweep of errx/warnx, remove unnecessary trailing \n 2002-07-20 08:36:17 +00:00
soren dc53bf3cba Sync getopt() / man page with actual getopt options. 2001-12-20 20:10:33 +00:00
wiz bb03964e95 Sort SEE ALSO. 2001-11-16 11:31:30 +00:00
lukem 3c367dcbb0 use MAXPATHLEN instead of 32 as the size of the rawbuf 2001-11-09 07:50:19 +00:00
lukem 4475e1747e fix a couple of -Wshadow warnings 2001-11-01 07:31:22 +00:00
lukem 172a636b48 - Don't attempt to fsck a file system that is mounted read-write unless -f
(force) is given. fsck(8) will return with a zero exit status if "fsck -p"
  is used in this circumstance, but all other invocations (e.g, "fsck",
  "fsck /filesystem", "fsck -p /filesystem") will return with a non-zero exit
  status in this circumstance.
  Per discussions with various people including Bill Sommerfeld.
- Use "file system" instead of "filesystem"
2001-06-18 06:28:59 +00:00
lukem 9e2e804c1c use TAILQ_xxx instead of referencing tqe_xxx elements directly 2001-06-18 02:43:32 +00:00
lukem f97f509658 ansi knf 2001-06-18 02:31:09 +00:00
lukem dacdbbf6ac use TAILQ_xxx instead of referencing tqh_xxx elements directly 2001-06-18 02:22:33 +00:00
lukem 4905fe31e2 -d is always compiled in; there's no specific #define to remove it 2001-06-18 01:55:12 +00:00
wiz 73f545bb5b Drop arguments of .Os. 2001-06-05 11:22:41 +00:00
wiz f53dfc72b2 Xref exit 3, not 2. Whitespace fixes while I'm here. 2001-04-03 11:06:20 +00:00
fair 676026bddb Clarify the description of "preen" mode, per PR 12110 2001-03-07 23:48:54 +00:00
cgd 8a986b2e96 convert to use getprogname() 2001-02-19 22:48:57 +00:00
christos 8358095fd4 remove redundant declarations and nested externs. 2001-02-04 19:59:37 +00:00
is 9979da6cbb Format string cleanups by Bill Sommerfeld. 2000-10-10 20:24:49 +00:00
abs 6d094b5b76 Copy code across from newfs so that 'fsck sd0a' and similar will work. 1999-04-22 04:20:53 +00:00
erh 95086b8941 Add missing .El 1999-03-10 00:08:33 +00:00
mycroft f6590b22cd Clean up SYNOPSIS formatting. 1999-03-07 11:02:05 +00:00
christos 7b57bf6d78 Adjust for DKTYPENAME changes. 1998-11-12 16:19:47 +00:00
ross 029a64cc29 from Erik Bertelsen <erik@mediator.uni-c.dk>
{ put } { in } { lots } { of } { these } { to } { shut } { up } { egcs }
1998-08-25 19:18:12 +00:00
thorpej a04741e102 Cast pointer diffs to int for use in printf format width specifiers. 1998-07-30 17:41:03 +00:00
mycroft b93acf4aaf const poisoning. 1998-07-26 20:02:36 +00:00
mycroft 48ba78aafd const poisoning. 1998-07-26 12:00:43 +00:00
bouyer aca8393893 This is now in libutil. 1998-03-18 17:03:30 +00:00
mycroft 3cd66a1543 Rewrite catopt(), as in mount(8). 1997-10-31 09:48:04 +00:00
mycroft e49dfa57a5 Format police. 1997-10-31 09:11:53 +00:00
christos 460f07da9b PR/4384: Brian Grayson: Use real name for exec'ed child's argv[0] 1997-10-29 18:36:47 +00:00
bouyer 7cdf2a0dc5 The number of fs types is FSMAXTYPES not DKMAXTYPES. 1997-10-13 09:44:18 +00:00
bouyer 7052d78b8d Ext2 metadata are always stored on disk in little-endian byte order,
so do byte-swapping on big-endian system. The byte-swap routines are in
fsck/bswap.c because they will also be used in fsck_ffs in future.
Tested on i386 and sparc.
1997-10-09 13:19:32 +00:00
lukem d3b61af7f4 resolve conflicts from lite-2 merge 1997-09-16 14:52:35 +00:00
lukem 26ba0ba0ba * cleanup for WARNS=1
* deprecate register
* prefix hex numbers with '0x'
1997-09-14 14:11:00 +00:00
mikel dc73f7a073 eliminate excess errx() argument 1997-06-23 01:03:35 +00:00
christos 1cf34f53c0 Move fscknames to <sys/disklabel.h> where they belong logically. 1997-06-20 15:14:09 +00:00
christos fa1d4fc6d7 PR/3002: bug in my previous commit. 1996-12-07 19:09:11 +00:00
christos 468b0bc4a8 PR/2975: fsck lies to children about their program name
PR/2979: fsck is not smart enough about filesystems not in /etc/fstab
1996-12-05 18:30:23 +00:00
perry 6af2a74574 Fix more cosmetic problems -- changed .Nm fsck to just .Nm (thats the
whole point of the .Nm macro), replaced naked "fsck"s with .Nm's,
fixed another "the the", and .Dq'ed the "no" in the -t
description. Note that the description of -t is still ambiguous --
needs to be cleaned up by someone like Christos that actually knows it
well.
1996-11-09 18:43:22 +00:00
lukem 8c7e6f0d43 fixed typos, from SAITOH Masanobu <msaitoh@spa.is.uec.ac.jp> in [misc/2924] 1996-11-09 01:49:54 +00:00
christos 1b51e8821e Fix varyadic non ansi functions. 1996-10-22 16:57:51 +00:00
christos eb7ef0a925 - Move some pieces from the fsck_ffs manual page that are appropriate for
fsck now.
- Correct the usage.
1996-10-22 15:30:56 +00:00
christos 6c3ecd5300 Document -f flag. 1996-10-03 20:08:29 +00:00
christos c623b74b84 - Null terminate the argv vector [from ws]
- Dynamically allocate the argv vector
- Add -f global flag [from ws]
1996-10-03 20:06:30 +00:00
christos 195da734cb Fix typo. 1996-09-28 19:23:29 +00:00
christos ef1bd36baf Allow for an extra argument needed by quotacheck. 1996-09-28 19:21:41 +00:00
christos 7dfca7604a - Rename util.c and util.h to fsutil.c and fsutil.h to avoid conflict with
<util.h>
- Change checkfstab so that the checkit function takes the name of the
  mount point too (needed by quotacheck).
- Remove globals debug, verbose and preen
1996-09-27 22:38:37 +00:00
cgd 46243af406 fix up a debugging printf (was given its args in the wrong order), and
allow "ufs" in /etc/fstab to indicate MOUNT_UFS == MOUNT_FFS (for backward
compatibility).
1996-09-27 21:51:03 +00:00
christos fdf6ea6c50 - added -T fstype:fsoptions per cgd's suggestion.
- handle parallelism in preening here using the original preening code from
  fsck_ffs.
- move common code from fsck_ffs and fsck_msdos here.
1996-09-23 16:11:32 +00:00
christos 80411b3382 New version of filesystem independent fsck(8) program similar to mount(8). 1996-09-11 20:27:11 +00:00
cgd effa4b1417 this file has moved; not properly checked in in previous commit. 1996-04-05 01:48:29 +00:00
cgd fea3644f0b check in changes proposed in PR 2006 (approved by J.T.), to rename fsck
to fsck_ffs, so that in the future 'fsck' can be a wrapper than invokes
appropriate filesystem-specific checker programs.  For now, the only
user-visible change is that the names have changed in the manual page
and in error messages; fsck and fsck.8 are now links to fsck_ffs and
fsck_ffs.8, until the rest of the transition is complete.
1996-04-05 01:44:24 +00:00
mycroft afdfe1b51f Use fs_csaddr to find the cg summary area. From der Mouse, PR 1366. 1996-01-18 21:55:27 +00:00
thorpej 9952e89162 Squish some type bugs pointed out by Jonathan Stone. 1995-12-17 06:03:36 +00:00
thorpej 78bd4a1051 Make this compile with -Werror. 1995-12-14 22:17:26 +00:00
jtc 0a1e7de7b6 merge in changes from 1.1 release branch 1995-11-28 05:25:28 +00:00
cgd e85da9ab29 recognize 'ffs' and 'ufs' as meaning the same thing. 1995-07-12 03:39:53 +00:00
cgd 5f6a15bcbe implement a 'force check' flag, '-f'. I used the SunOS name, but the Digital
semantics.  now:
	(1) dirty file systems will always be checked; nothing new there.
	(2) if not '-f' clean file systems will _NEVER_ be checked,
		i.e. they won't be checked even if -p isn't specified.  This
		allows one to 'fsck -p ; fsck' to preen, then clean up
		anything that 'fsck -p' barfs on, without waiting for the
		clean file systems to be checked again.
	(3) if '-f' clean file systems will ALWAYS be checked.  This
		allows people to put 'fsck -fp' into /etc/rc on systems
		where they're leery of the FS clean flag state, need
		the extra reliability, and can afford time 'wasted'
		in checks.
The assumption made here is that if a file system is marked clean, it
_IS CLEAN_, really, and shouldn't be checked unless fsck is explicitly
told to (with -f).  This should be a valid assumption, but may not be in
the presence of file system bugs.  Documentation updated to note '-f'.
1995-07-12 01:49:16 +00:00
cgd 788733b7a9 typeof(timeval.tv_sec) != time_t 1995-06-07 17:14:21 +00:00
cgd 555d4b510e slightly clean rcs ids, etc. 1995-04-23 10:33:03 +00:00
mycroft 7cb70c9889 Set the clean flag if necessary. If preening, don't check `clean' file
systems.
1995-04-12 21:24:07 +00:00
cgd 38bab6b6da type sizes 1995-03-21 01:30:09 +00:00
mycroft 283b35b06f Make sure to recreate the `..' entry in the root directory if missing. 1995-03-20 00:40:10 +00:00
cgd 0114e805ce convert to new RCS Id conventions; reduce my headache 1995-03-18 14:54:19 +00:00
cgd 9235328d5a functions which are 'fake-varaargs' should be passed longs, not ints. 1995-02-10 23:26:14 +00:00
mycroft 700673cebf Change some spacing to match Kirk's view of the world. 1994-12-28 00:15:50 +00:00
mycroft 0826920c54 Mostly sync with CSRG. 1994-12-28 00:03:49 +00:00
mycroft e5d0c2de0f Copy fs_maxcluster when comparing superblocks. 1994-12-27 19:26:57 +00:00
cgd 06e2955ff1 specify man pages the new way. 1994-12-22 10:44:04 +00:00
cgd d71db3e4a6 light clean, and make it compile against new header files. 1994-12-18 15:55:41 +00:00
cgd 73cf954189 adjust; from jimj. 1994-12-06 19:13:02 +00:00
cgd 5eeab43e28 more cleanups from Jim Jegers, passed over by me. 1994-12-05 20:15:31 +00:00
mycroft 54477c5285 Use the S_IS*() macros, and make this compile again after Chris's changes to ufs. 1994-10-28 16:55:05 +00:00
mycroft bedf1adf67 Get the byte order right when creating `.' and `..' entries. 1994-10-28 16:54:05 +00:00
mycroft 195d1d6f4e On a recursive call to fsck_readdir() through getpathname(), don't attempt to
fix a problem that's already being fixed.
1994-10-28 16:53:13 +00:00
mycroft c10923f665 dircheck() shouldn't be looking at d_type or d_namlen in blank entries
*at all*.  Not only is it wrong, but it causes a serious problem on
little-endian machines, since after -c2 conversion, d_type will often
be > 15.
1994-10-06 14:24:17 +00:00
mycroft 4922d725cf Remove some more uses of obsolete functions. 1994-09-23 23:48:10 +00:00
mycroft ea7b5d4ec6 Eliminate uses of some obsolete functions. 1994-09-23 14:26:58 +00:00
mycroft 815971855a A correct fix for the byte order problem when reconnecting. 1994-09-20 23:31:39 +00:00
mycroft 1466993ef3 Fix oversight in last patch. 1994-07-29 02:31:50 +00:00
mycroft 08d1c5cc81 Fix byte-order problem with directory entry creation. 1994-07-28 00:25:17 +00:00
cgd 138fcd8327 deal with new share/doc strategy 1994-06-30 05:33:30 +00:00
ws f455a4ed05 Reads on raw disks are only guarranteed in multiples of the block size 1994-06-29 11:01:35 +00:00
cgd 5b029eb9a8 update for new doc-make/install strategy 1994-06-25 05:57:47 +00:00
mycroft eadb2ad514 Fix compatibility with old fastlinks. 1994-06-14 22:49:57 +00:00
mycroft 16573e290b Import 4.4-Lite version. 1994-06-13 22:40:40 +00:00
mycroft ccfa3742b5 Update from 4.4-Lite, with local changes. 1994-06-08 18:57:30 +00:00
pk 77c9a3fa5b Prototype some things. 1994-05-02 10:18:21 +00:00
cgd 97c1f9d08d oops; changed comparison, but not field! 1994-04-25 18:33:42 +00:00
cgd 9a2c884999 need <sys/time.h> 1994-04-25 18:28:42 +00:00
cgd e82c231da3 need <sys/time.h> 1994-04-25 18:23:19 +00:00
cgd 1ddc4aa19f kill some code if SMALL is defined... 1994-04-18 06:08:27 +00:00
cgd eb0f0ad92d fs type names will soon be strings 1994-04-14 03:21:21 +00:00