Commit Graph

308 Commits

Author SHA1 Message Date
joerg baa8e84b6f Use __dead 2011-08-29 14:34:58 +00:00
christos 64aae439ac WARNS=4 2011-08-14 12:32:01 +00:00
mrg 75e42fa7da remove most of the remaining HAVE_GCC tests that are always true in
the modern world.
2011-06-20 07:43:56 +00:00
christos 23ffdf5bd3 share more code. 2011-06-09 19:57:50 +00:00
bouyer a3a7248ce7 Fix bad cut'n'paste in copyright. Pointed out by dyoung@ 2011-06-07 14:56:12 +00:00
dholland aae84c3a7c Improve documentation of FFS formats and format levels from PR 32100.
Prompted also by recent discussion on tech-kern. Bump date.
2011-05-14 19:46:10 +00:00
wiz 36fa577686 Re-add -q description that got lost when -x was added.
Sort descriptions.
Bump date.
2011-04-29 10:34:52 +00:00
bouyer 875bb8e6c3 initialise memory allocated for uquot_user_hash & uquot_group_hash.
Pointed out by Nicolas Joly.
2011-03-20 11:41:24 +00:00
bouyer 063f96f3c2 merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
2011-03-06 17:08:10 +00:00
njoly 0913e1dac9 Do Skip device checks, which ends up parsing fstab, when working on a
filesystem image with -F option set.
2011-02-06 12:02:59 +00:00
drochner ebb3b30048 minimal ansification/constification 2010-09-12 16:03:39 +00:00
hannken 738a97ca87 Add -x option which allows to run `fsck_msdos -n' on a snapshot of
a live file system.

While here modify snap_open() to accept a character device as its
first arg and remove now unneeded get_snap_device().

Reviewed by: Manuel Bouyer <bouyer@netbsd.org>
2010-04-11 08:23:51 +00:00
mlelstv bc76b1d5b0 When clearing a log on failure, not only ask the kernel to ignore an
existing log but to remove it on next mount.
2010-03-06 11:31:40 +00:00
christos c68c36a514 Centralize time printing and deal with ctime possibly returning NULL. 2010-02-04 23:55:42 +00:00
mlelstv 0aef69272b Skip handling of APPLEUFS_LABEL if it is smaller than a device block.
In particular:

- newfs will not try to erase the label
- fsck_ffs will not try to validate the label

This lets newfs and fsck work on 2048-byte-per-sector media.

Does Apple UFS support such media and how?
2010-01-31 16:04:34 +00:00
christos 36cd9355e9 make this compile again. 2010-01-07 01:39:56 +00:00
christos 87e82597b6 PR/42568: Pedro F. Giffuni: Better signal handling from OpenBSD, but simplified. 2010-01-06 18:12:37 +00:00
bouyer 59e1504d12 Restore changes from 1.86 and 1.87 after commit of 1.88. 2009-09-27 17:13:37 +00:00
bouyer cab6cd67bc Do some basic checks of the WAPBL journal, to abort the boot before the
kernel refuse to mount a filesystem read-write (booting a system
multiuser with critical filesystems read-only is bad):
Add a check_wapbl() which will check some WAPBL values in the superblock,
and try to read the journal via wapbl_replay_start() if there is one.
pfatal() if one of these fail (abort boot if in preen mode,
as "CONTINUE" otherwise). In non-preen mode the bogus journal will
be cleared.
check_wapbl() is always called if the superblock supports WAPBL.
Even if FS_DOWAPBL is not there, there could be flags asking the
kernel to clear or create a log with bogus values which would cause the
kernel refuse to mount the filesystem.
Discussed in
http://mail-index.netbsd.org/tech-kern/2009/08/17/msg005896.html
and followups.
2009-09-13 14:25:28 +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
wiz 3932d28101 New sentence, new line. 2009-05-07 08:27:14 +00:00
lukem 51d7a18bc6 Use "FFSv2" instead of "UFS2".
Expand the description of -c.
Xref dumpfs.
2009-05-07 06:54:23 +00:00
lukem ef685eeea9 Enable WARNS=4 by default except for:
dump  dump_lfs  fsck_ffs  fsck_lfs  fsdb  mount_smbfs
	newfs_ext2fs  newfs_lfs  resize_lfs  setkey
2009-04-11 07:58:11 +00:00
lukem 8e2fe69844 fix sign-compare issues 2009-04-11 07:31:21 +00:00
mrg 5c9ab7f6c0 fix a logic error in the previous, as point out by frank kardel. 2009-04-07 05:50:11 +00:00
mrg 1c6ecba9bc don't ignore "fsck -f" when given with "-p" on a wapbl filesystem.
ie, "fsck -fp" actually forces the check in preen mode now.
2009-03-25 03:42:41 +00:00
christos 7b2f022cd6 don't copy the address of a pointer. Noticed by Anon Ymous 2009-02-25 13:52:18 +00:00
joerg 3fbdfc8af9 Reduce internals of WAPBL exposed to the rest of the system. 2008-11-10 20:12:13 +00:00
christos 85db23df23 reallocate the correct amount. From Anon Ymous 2008-10-12 23:26:12 +00:00
wiz af2c2b73f3 Don't use unicode in usage.
Noted by Anon Ymous.
2008-10-12 20:49:43 +00:00
wiz 89cc13767c Sync usage with man page. 2008-10-09 18:38:24 +00:00
christos 59334248e2 Disable userid to username lookups by default. Add a -U flag to perform them.
In single user mode lookups that involve the network might not work and they
slow down fsck.
2008-10-09 16:56:23 +00:00
christos c6070f6f5a Avoid allocating 2 x inospace and use realloc instead. This also saves a
large memcpy.
2008-10-09 15:50:46 +00:00
gdt 4a8ce74d3f Add an explanation of why one would want to use -x/-X, after
discussion with bouyer@.
2008-08-30 15:07:40 +00:00
dogcow fefef6828c Make it compile. (HI BOUYER!) 2008-08-30 14:07:32 +00:00
bouyer a8ac39af81 Add fss(4) snapshot support to fsck_ffs(8) (via -x or -X options, like
dump(8)). This allows fsck_ffs -n to work on a snapshot of a R/W mounted
filesystem, and avoid errors related to filesystem activity.
2008-08-30 10:46:16 +00:00
gmcgarry 3c9a95916d Wrap compiler-specific flags with HAVE_GCC and HAVE_PCC as necessary. Add a few flags for PCC. 2008-08-29 00:02:21 +00:00
simonb 36d65f1138 Merge the simonb-wapbl branch. From the original branch commit:
Add Wasabi System's WAPBL (Write Ahead Physical Block Logging)
   journaling code.  Originally written by Darrin B. Jewell while
   at Wasabi and updated to -current by Antti Kantee, Andy Doran,
   Greg Oster and Simon Burge.

OK'd by core@, releng@.
2008-07-31 05:38:04 +00:00
lukem 6543a91fea Remove the \n and tabs from the __COPYRIGHT() strings.
(Tweak some to use a consistent format.)
2008-07-20 01:20:21 +00:00
simonb 9e826282a4 Fix funny whitespace in a variable assignment. 2008-07-08 08:14:37 +00:00
tsutsui 34dd728d42 There is only one more file which requires HACKS for m68000,
so handle it in each Makefile rather than sys.mk.

These ICEs might be related with GCC Bugzilla Bug 32424
which is not resolved yet even in the upstream.
2008-05-04 15:37:19 +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
mrg ecc90aa046 make all sun2 use -O0 and move most of the hacks out into just 3 files. 2008-02-09 02:37:21 +00:00
christos 7bf1a6f81d Avoid zero-divides from Anon Ymous 2007-08-22 16:30:28 +00:00
pooka 704e075311 Make all mount(2) return value error checks against -1. Some file
systems just checked != 0, breaking MNT_GETARGS.  Others worked with < 0,
but make them check against -1 too for consistency.  And sprinkle some
stylish line wrapping where appropriate.
2007-07-16 17:06:52 +00:00
dsl 7af7206539 Add additional 'sizeof args' parameter to mount(2). 2007-07-14 15:57:24 +00:00
chs cb9ef1cfbd apply revision 1.31 yet again:
"make sure that we don't try to allocate negative memory when blks == 0."
or on amd64, "make sure that we don't allocate 32 GB when blks == 0."
2007-04-12 05:19:18 +00:00
drochner 628f1591c1 include <signal.h> where signal(3) is used 2007-02-08 21:36:58 +00:00
hubertf df06563bc3 Remove more duplicate #includes,
from Slava Semushin <slava.semushin@gmail.com>
2007-01-17 21:59:49 +00:00
apb 324b3b8a78 Fix error in previous. Pass 1 needs to use progress_setrange(),
not progress_sethighlim().
2006-11-14 22:51:11 +00:00