Age | Commit message (Collapse) | Author |
|
jmc@ dislikes a comma before "then" in a conditional, so leave those
untouched.
ok jmc@
|
|
fails to report the path that the failure occured on. Suggested by
deraadt@ after some tech discussion.
Work done and verified by Ashton Fagg <ashton@fagg.id.au>
ok deraadt@ semarie@ claudio@
|
|
and installing USD/SMM/PSD docs.
jmc@ agrees with the direction, ok millert@ on an earlier diff
|
|
ok mortimer
|
|
in phase one to be used in phase 5, unless we're tight on memory.
From FreeBSD; ok bket@
|
|
ncg * ipg calcualtion can overflow if signed types are used. Move
to uint32_t for the relevant values. Aligned with FreeBSD changes.
Also make sure newfs refuses to create an fs with more that 2^32-1
inodes. ok millert@
|
|
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.
|
|
Found the hard way and OK tb@
|
|
so if a problem is encountered with this the whole set needs backout
and study.
|
|
that do repeated lookups. OK tb@
|
|
an overflow seen with scanning for alternate superblocks; ok deraadt@
|
|
|
|
scanning the used inode map. The code as written assumes inosused
is signed but this is no longer the case. OK deraadt@
|
|
unsigned.
While there, fix a whitespace issue.
OK deraadt@
|
|
adding appropriate #ifdef's around declarations.
ok millert@ (with a tweak I will commit separately)
|
|
by passing a flag to setup().
ok deraadt
|
|
|
|
in the label; ok deraadt@ krw@
|
|
add a special case for the missing "rpath" and "tty" promises.
Issue found and initial analysis by Jan Stary, thanks!
ok deraadt
|
|
|
|
|
|
Discovered by krw
|
|
resistant against memory correctup, if a corrupt filesystem is given to them.
ok krw
|
|
on filesystem error, fsck will try to display username of inode, resulting need
of "getpw" for not SMALL version.
add a missed (?) -DSMALL in distrib/special/ for fsck_ffs and fsck_ext2fs
found by hard way by ajacoutot@
OK millert@
|
|
opening to before the pledge, and cache the fd.
looked over by millert
|
|
a point where open() and disklabel reading have completed. After that
point, pledge "stdio".
As a result, an fsck of a hostile partition (noone ever does that, or
do they? :) is done by a program with SUBSTANTIALLY less system call
exposure.
ok semarie
|
|
will be calling these directly, and not for the multiple filesystem case.
fsck(8) is generally the parent and will handle things.
ok semarie; this change will also help a goal jsing has
|
|
ok deraadt@
|
|
|
|
from michael mcconville
ok deraadt
|
|
ok tedu miod
|
|
delete <sys/param.h> if now possible
ok guenther
|
|
ok millert
|
|
possible. Annotate <sys/param.h> lines with their current reasons. Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution. These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)
|
|
hand-crafting a solution.
ok millert
|
|
|
|
this fixes handling of very large files on FFS2.
Correct a copy-n-pasto that rendered useless the check for allocated
fragmented that are marked free in the bitmap.
allocdir() returns an inode number, so return an ino_t.
sizeof()*N should be printed with %zu, while direct and indirect block
numbers should be cast to (long long) use %lld
inodesc.id_entryno fix based on a diff from David Vasek <vasek@fido.cz>
ok krw@ otto@
|
|
don't need to be married.
ok guenther miod beck jsing kettenis
|
|
a filesystem. fs_nspf and its derivitives like fs_spc are DEV_BSIZE
values, not actual hardware disk sector values. Adjust initializations
accordingly.
Tweak header and man page comments to make the DEV_BSIZE'ness more
obvious for future spelunkers.
No-op for DEV_BSIZE (a.k.a. 512-byte) sector devices but should help
checking filesystems on, e.g., 4k-byte sector devices.
ok jmc@ on the man page tweaks.
|
|
printing out block numbers and sector numbers. Make output verbiage
consistent. -Wall happier.
Original diff and ok chl@
|
|
|
|
p[read|write]. Makes the code much clearer by eliminating extra error
checking and verbiage.
No intentional functional change.
Tweaks by and ok guenther@
|
|
|
|
on 4096-byte sector disks. No-op on 512-byte sector disks.
Adhering to the bedrock idea that ffs will *never* use anything but
512-byte block disk addressing (a.k.a. daddr_t), and believing that
the 'fake' bread()/bwrite() functions should always be using 512-btye
block numbers like their kernel big brothers, nuke the computed
dev_bsize and use DEV_BSIZE for conversions to/from byte offsets.
Spotted and various fixes tested by David Vasek.
Still to fix: scanning for superblocks on 4K disks.
ok otto@
|
|
it to not optimize away a comparison against NULL-1.
Add (unsigned char) casts for some ctype calls.
Teach fsck_ext2fs about MAXPARTITIONS, letting it operate on
partitions 'i' through 'p'.
ok deraadt@ millert@ otto@
|
|
|
|
DL_[GET|SET]PSIZE(), DL_[GET|SET]POFFSET(), DL_[GET|SET]DSIZE() in
order to get|set correct value that includes the high bits of the
value.
|
|
for defines fragnum, fsbtodb, cgsblock, and cgdmin.
|
|
(u_int64_t) instead of (daddr_t) when casting a variable in an
expression passed to DL_SETDSIZE().
Change a variable counting open files from daddr_t to int64_t.
ok deraadt@ with the tweak to fix that pesky expression.
|
|
variables. Some random whitespace/knf repairs encountered on the way.
ok miod@ on inspection, feedback & more suggestions from millert@
|