| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- convert boot1.efi to corrrectly calculate the lba for what the
media reports and convert the size based on what FreeBSD uses.
The existing code would use the 512 byte lba and convert the
size using 4K byte size.
- make fsck_msdosfs read the boot block as 4K so the read doesn't
fail on a 4Kn drive since FreeBSD will error out parition reads
of a block. Make the bpbBytesPerSec check a multiple of 512 since
it can be 512 or 4K depending on the disk. This allows fsck to
pass checking the EFI partition on a 4Kn disk.
To create the EFI file system I used:
newfs_msdos -F 32 -S 4096 -c 1 -m 0xf8 <partition>
This works for booting 512 and 4Kn disks.
Caveat is that loader.efi cannot read the 4Kn EFI partition. This isn't
critical right now since boot1.efi will read loader.efi from the ufs
partition. It looks like loader.efi can be fixed via making some of the
512 bytes reads more flexible. loader.efi doesn't have trouble reading
the ufs partition. This is probably a simple fix.
I now have FreeBSD installed on a system with 4Kn drives and tested the
same code works on 512.
MFC after: 1 week
|
|
|
|
|
|
|
| |
Fix some whitespace issues while here.
Obtained from: NetBSD (rev. 1.9)
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When truncating cluster chains fix the length of the cluster head.
http://marc.info/?t=140304310700005&r=1&w=2
Avoid infinite loops in cluster chain linked lists.
http://marc.info/?l=openbsd-tech&m=140275150804337&w=2
Avoid off-by-one on FAT12 filesystems.
http://marc.info/?l=openbsd-tech&m=140234174104724&w=2
Obtained from: NetBSD (from OpenBSD)
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The free space value in the FSInfo block is merely unitialized when it is
0xffffffff. This fixes a bug found in NetBSD.
It must be noted that we never supported all the checks that NetBSD does
as some of them would cause failures with a freshly created FAT32
from MS-Windows.
While here, bring some space fixes.
Obtained from: NetBSD (rev. 1.22)
MFC after: 3 days
|
|
|
|
|
|
|
|
| |
Several whitespace fixes
convert *rootDir from external to static.
Obtained from: NetBSD, OpenBSD (partial)
MFC after: 3 days
|
|
|
|
|
| |
PR: bin/168447
Submitted by: Boris Kochergin
|
|
|
|
|
|
|
|
|
| |
- sprinkle const
- add volatile qualifier to avoid vfork clobbering
Inspired by: NetBSD
PR: bin/139802
Reviewed by: ed
|
|
|
|
|
|
|
|
|
| |
- rename some other vars too
- merge NetBSD license changes
Obtained from: NetBSD
PR: bin/139802
Reviewed by: ed
|
|
|
|
| |
especially in error cases.
|
|
|
|
|
|
| |
These tools declare global variables without using the static keyword,
even though their use is limited to a single C-file, or without placing
an extern declaration of them in the proper header file.
|
|
|
|
|
|
|
|
|
| |
Fix some casting errors.
PR: 142384
Submitted by: giffunip at tutopia dot com
Obtained from: NetBSD
MFC after: 3 weeks
|
| |
|
|
|
|
|
|
|
|
|
| |
incomplete as some info doesn't really belong to the structs where it is
defined.
Submitted by: Pedro F. Giffuni <giffunip tutopia com>
Reviewed by: bde
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
|
|
| |
- fix sign-compare issues.
- ANSIfy a couple of functions.
- Remove more duplicate #includes.
- Memory leak found by Coverity on NetBSD.
Submitted by: Pedro F. Giffuni <giffunip tutopia com>
Reviewed by: bde
MFC after: 2 weeks
|
|
|
|
|
|
|
| |
Move to 2 clause license, approved by Wolfgang Solfrank.
Submitted by: Pedro F. Giffuni <giffunip tutopia com>
MFC after: 2 weeks
|
|
|
|
|
|
|
| |
Submitted by: marck
Reviewed by: current@
Approved by: jhb (mentor)
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
| |
and begins with a capital letter. The rest of pwarn/ask pairs here
follows this style.
Requested by: bde
|
|
|
|
|
| |
with the problem description on the terminal: use
conventional punctuation.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Allow check to proceed with bad backup boot block if we're doing a
readonly check. Various typos in comments.
Obtained from: NetBSD
|
|
|
|
| |
Use WARNS?= instead of WARNS=.
|
|
|
|
|
|
|
|
|
| |
has now has no effect except in combination with -p, and plain fsck
checks all file systems instead of skipping clean ones for msdosfs
only.
Renamed the force flag to skipclean and inverted its logic as in
fsck_ffs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
combined with the the signature check in a wrong way (basically
(dirty:= signature_recognised() && !clean) instead of
(mightbedirty:= !signature_recognized || !clean), so file systems
with unrecognized signatures were considered clean. Many of the
don't-care and reserved bits were not ignored, so some file systems
with valid signatures were unrecognized. One of my FAT32 file systems
has a signature of f8,ff,ff,ff,ff,ff,ff,f7 when dirty, but only
f8,ff,ff,0f,ff,ff,ff,07 was recognised as dirty for FAT32, so the
fail-unsafeness made my file system always considered clean.
Check the i/o non-error bit in checkdirty(). Its absence would give
an unrecognized signature in code that is unaware of it, but we now
mask it out of the signature so we have to check it explicitly. This
combines naturally with the check of the clean bit.
Reviewed by: rnordier (except for final details)
|
|
|
|
|
|
|
|
|
|
|
|
| |
better. There is a related I/O error flag which we don't support in
the kernel but must support here. (Support for bits that we don't
understand here is mostly automatic by fail-safeness, but checkdirty()
has fail-unsafeness.) There are some reserved and don't-care bits
that weren't fully documented and aren't always masked properly. The
comment about the bits in readfat() will be removed when the masking
is fixed.
Submitted by: rnordier
|
|
|
|
|
| |
identical to a subset of readfat(), so it belongs near readfat() if not
in it.
|
|
|
|
|
|
|
|
|
|
|
| |
this program. Gnu indentation is used for these. Redo the fix for
the large expression at the end of the previous commit to give gnu
indentation. The original version was gnuish but had 9 bogus extra
characters of indentation in its continuation lines, perfect tab
lossage on every line, and other bugs.
The previous commit log should have claimed to fix style bugs in the
previous-1 commit (1.5), not the forced null previous commit (1.6).
|
|
|
|
| |
Fixed a nearby style bug (unreachable break).
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Don't use errexit() to (mis)implement usage(). Using errexit() just
gave the bogus exit code 8.
- Fixed 3 other style bugs in usage().
fsck/fsutil.[ch]:
- Garbage-collected errexit(). It is essentially just one of NetBSD's
fsck_ext2fs error printing functions, but we don't have fsck_ext2fs
and the function is unsuitable for use there too (since pfatal() is
also used and it printf to a different stream).
|
|
|
|
| |
wording in a comment).
|
|
|
|
| |
Obtained from: fsck_ffs.8
|
| |
|
|
|
|
| |
and addition of a tab to a blank line).
|
|
|
|
|
|
|
|
| |
Enable lockf support.
PR: 55861
Submitted by: Jun Su <junsu@m-net.arbornet.org> (original version)
Reviewed by: make universe
|
|
|
|
|
| |
Avoid shadowing declarations.
Avoid compairing signed and unsigned types.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Also change one case of blatant __progname abuse (several more remain)
This commit does not touch anything in src/{contrib,crypto,gnu}/.
|
|
|
|
|
|
|
| |
o ansi function prototypes
o unifdef -D__STDC__
o __dead2 on usage prototype
o remove now-bogus main prototype
|
|
|
|
|
|
| |
Binary builds that cannot handle this must explicitly set WARNS=0.
Reviewed by: mike
|
| |
|
| |
|
|
|
|
|
|
|
| |
be cleaned immediately in foreground, or if its cleaning can be deferred
to background.
Submitted by: Maxime Henrion <mux@qualys.com>
|