Commit Graph

209 Commits

Author SHA1 Message Date
dbj
ab48f19cba don't calculate fake superblock used for finding alternate superblocks
if the disklabel is missing the cpg parameter.  Also print a warning
if this is skipped because of a missing fsize, frag or cpg disklabel parameter
this fixes a divide by zero error reported by martin@
2004-01-20 15:29:35 +00:00
dbj
67b7740914 print warning if the user specifies a conversion level greater than implemented 2004-01-17 22:17:07 +00:00
dbj
d3ee830d65 terminate preen message from previous with \n 2004-01-15 14:52:04 +00:00
dbj
e23f416c6b if the user specifies both -b and -p, then just go ahead and update
the primary superblock.
2004-01-15 14:49:28 +00:00
dbj
6300af6ca7 change the message "COVERTING TO FFSv2 SUPERBLOCK" to
"CONVERT TO NEW SUPERBLOCK LAYOUT" to help avoid confusion
2004-01-12 19:40:24 +00:00
mrg
2a3954efe6 - some KNF (80 cols)
- fix a printf format issue
2004-01-10 14:28:37 +00:00
wiz
cf9b70c6d4 Update Dd for previous and fix a case. 2004-01-09 23:42:11 +00:00
dbj
8f3b1a3c98 use %#llx instead of %llx when printing incorrect qfmask or qbmask 2004-01-09 22:23:18 +00:00
dbj
753116e06f do not upgrade superblock or set FS_FLAGS_UPDATED unless -c 4 option
is provided.
add compatibility for filesystems before FFSv2 integration
these patches are from pr port-macppc/23925 and should also
fix problems discussed in pr kern/21404 and pr kern/21283
2004-01-09 19:12:31 +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
dbj
1c65fb7cac fix logic for handling symlinks in inodes when isappleufs 2004-01-03 17:56:21 +00:00
dbj
1f5f1d50af when doing both -c 2 and -B, swap the blocks listed in the inode
of symlinks, since the swapping happens before the symlinks
are moved into the inode.
2004-01-03 17:27:35 +00:00
dbj
f491995334 fix paste-o in previous commit 2004-01-03 10:25:06 +00:00
dbj
f3786e90b7 fix bugs with unsigned comparison ofs fs_maxsymlinklen 2004-01-03 10:11:41 +00:00
dbj
9aad8f72b5 increase size of buffer used for updating symlinks with -c 1
otherwise, the block read will blow the stack
2004-01-03 10:07:02 +00:00
dbj
23d4eb34b2 add uuid field to apple ufs volume label 2004-01-02 05:08:57 +00:00
dbj
16c34ed5bc fix minor bug in buf cache statistic collecting 2003-12-29 11:42:09 +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
itojun
731ae88ecd realloc pedant 2003-09-19 08:35:15 +00:00
agc
276d62f603 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:22 +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
itojun
0e4dc5229d use bounded string op 2003-07-13 08:16:15 +00:00
fvdl
fe36fefa1a Oops. The clearinode macro had the UFS2 case reversed, causing it to
zero out two inodes in the plain FFS case, since UFS2 dinodes are
twice as big.
2003-04-24 20:08:25 +00:00
fvdl
7b402ff9df If an alternate superblock is used, update the standard one correctly. 2003-04-14 18:50:52 +00:00
yamt
f5f20840e2 save and restore errno in signal handlers. 2003-04-13 10:22:40 +00:00
enami
e89481b248 Correctly detect a UFS1 file system of non-native endian. 2003-04-11 10:21:40 +00:00
fvdl
774a28f33f Correctly deal with directories that need indirect blocks by adding
some code I missed in the UFS2 commit. Should fix false positives
seen by fsck_ffs on clean filesystems.

Thanks to Takahiro Kambe for debugging help.
2003-04-09 12:49:28 +00:00
fvdl
e06c710852 Swap the right blocks in an inode in the byteswapping case. 2003-04-08 14:59:52 +00:00
fvdl
750ed85d47 Write update some old fields when writing the superblock, similar to
ffs_oldfscompat_write() in the kernel. Use the old totals when
time < old_time (i.e. an old kernel or fsck wrote the filesystem last).
When setting the date back on a new kernel, that works out ok, since
new kernels always update both fields.
2003-04-06 17:23:25 +00:00
fvdl
8e4c90f49a Skip checks for old 4.2BSD filesystem; as it stands, we can't deal with
writing them. Could be fixed, but doesn't have a high priority.
2003-04-05 13:45:21 +00:00
fvdl
5f7172ed40 When fixing the cstotal structure, use the right size to copy it back.
Also, remove some accidentally committed debug code from the previous
commit.
2003-04-04 15:02:40 +00:00
fvdl
373feac024 Initialize cg_irotor correctly in newcg, to avoid false positives
for bad cylinder groups.
2003-04-04 13:45:21 +00:00
he
e75cb67772 On LP64 hosts, iswap64() result is "long int", so cast result to (long long)
before printing with %lld.
2003-04-02 22:27:09 +00:00
he
bfd92e95d2 The new UFS2 code uses memset(), so include <string.h> for prototype. 2003-04-02 22:25:56 +00:00
fvdl
42614ed3f3 Add support for UFS2. UFS2 is an enhanced FFS, adding support for
64 bit block pointers, extended attribute storage, and a few
other things.

This commit does not yet include the code to manipulate the extended
storage (for e.g. ACLs), this will be done later.

Originally written by Kirk McKusick and Network Associates Laboratories for
FreeBSD.
2003-04-02 10:39:19 +00:00
wiz
0acfa3bb9e Consistently spell occurrence with two rs. 2003-03-29 22:48:37 +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
fvdl
bb8bd280d4 Only check relevant fields when comparing the superblock to an alternate
superblock. Avoids false positives should fsck_ffs be run on a filesystem
that was created after the UFS2 code has been merged.

This commit is mostly a forward compatibility patch that can be pulled
up in to the 1.6 branch.

From Kirk Mckusick in FreeBSD (setup.c rev. 1.30). Original commit message:
========
When checking the alternate superblock, we used to copy any fields
that might have changed, then did a byte-by-byte comparison with
the alternate. If any unused fields got used, they had to be added
to the exception list. Such changes caused too many false alarms.
So, I have changed the comparison algorithm to compare a selected
set of fields that are not expected to change. This new algorithm
causes far fewer false hits and still does a good job of detecting
problems when they have really occurred. In particular, this change
should ease the transition to kernels supporting UFS2 which make
some significant changes to the superblock.

Sponsored by:	DARPA, NAI Labs
========
2003-02-21 15:15:49 +00:00
grant
c39c2e62d5 'NetBSD.org' and some mdoc fixes. 2003-02-14 16:21:47 +00:00
mrg
cf9ff87a3a make this build on alpha after daddr_t->64bit 2003-01-28 05:17:12 +00:00
fvdl
a3ff3a3038 Bump daddr_t to 64 bits. Replace it with int32_t in all places where
it was used on-disk, so that on-disk formats remain the same.
Remove ufs_daddr_t and ufs_lbn_t for the time being.
2003-01-24 21:55:02 +00:00
dbj
3f75e3780c check that a disklabel is valid before trying to extract partition
information from it when checking for apple ufs filesystems
2002-11-05 05:18:50 +00:00
wiz
2fb4b1db52 New sentence, new line. By Robert Elz with minimal fixes. 2002-10-01 13:40:23 +00:00
dbj
43395bd5a8 Add support for the Apple UFS variation on ffs
This is the bulk of PR #17345

The general approach is to use a run time deteriminable value
for DIRBLKSIZ.  Additional allowances are included for using
MAXSYMLINKLEN with FS_42INODEFMT and a shift in the cylinder group
cluster summary count array.  Support is added for managing
the Apple UFS volume label.
2002-09-28 20:11:05 +00:00
lukem
7360d7b6ae Use ${NETBSDSRCDIR}/some/path instead of ${.CURDIR}/../../some/path 2002-08-19 10:16:51 +00:00
dbj
c88ccea33d commit fix from pr bin/15449
this fixes FS_42POSTBLFMT compatibility
2002-06-30 22:57:30 +00:00
simonb
1d08e313ae Don't bother testing if a uint8_t is > 256 -- that test is always false. 2002-05-09 02:55:49 +00:00
agc
6df6be6300 Make this compile on some of the more esoteric architectures. 2002-05-06 19:37:51 +00:00
lukem
bb82a84ded If SIGINFO is received, display summary information to stderr.
Based on changes in FreeBSD, via Chuck Cranor <chuck@research.att.com>
2002-05-06 03:17:43 +00:00
mycroft
fb1196703d Some manual strength reduction. 2002-04-10 17:29:30 +00:00