diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2020-02-04 19:15:57 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2020-02-04 19:15:57 +0000 |
commit | f9c763bb90a6c8832ad276a3144d17988615aef3 (patch) | |
tree | 065912132e73a82957ab88d27410dbd433fceeed /sbin | |
parent | f5cfccb58404c07e95cbcf734658750823aacce4 (diff) | |
download | src-f9c763bb90a6c8832ad276a3144d17988615aef3.tar.gz src-f9c763bb90a6c8832ad276a3144d17988615aef3.zip |
MFC r351382 (by delphij):
When creating a new FAT32 filesystem, use "unknown" (0xFFFFFFFF) for
FSI_Nxt_Free instead of providing a wrong value.
With this change, fsck_msdosfs would no longer complain about invalid
FSInfo information.
MFC r355317 (by delphij):
newfs_msdos: -A is incompatible with -r, not -o.
PR: 242314
Submitted by: Guy Yur <guyyur gmail com>
MFC r357227:
Merge r357225 from the clang1000-import branch:
Fix the following -Werror warning from clang 10.0.0 in newfs_msdos:
sbin/newfs_msdos/newfs_msdos.c:181:2: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]
if (o.align) {
^
sbin/newfs_msdos/newfs_msdos.c:179:5: note: previous statement is here
if (argc < 1 || argc > 2)
^
Notes
Notes:
svn path=/stable/11/; revision=357516
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/newfs_msdos/mkfs_msdos.c | 2 | ||||
-rw-r--r-- | sbin/newfs_msdos/newfs_msdos.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sbin/newfs_msdos/mkfs_msdos.c b/sbin/newfs_msdos/mkfs_msdos.c index c2cdebaccd17..c14f33d95bfb 100644 --- a/sbin/newfs_msdos/mkfs_msdos.c +++ b/sbin/newfs_msdos/mkfs_msdos.c @@ -715,7 +715,7 @@ mkfs_msdos(const char *fname, const char *dtype, const struct msdos_options *op) mk4(img, 0x41615252); mk4(img + MINBPS - 28, 0x61417272); mk4(img + MINBPS - 24, 0xffffffff); - mk4(img + MINBPS - 20, bpb.bpbRootClust); + mk4(img + MINBPS - 20, 0xffffffff); mk2(img + MINBPS - 2, DOSMAGIC); } else if (lsn >= bpb.bpbResSectors && lsn < dir && !((lsn - bpb.bpbResSectors) % diff --git a/sbin/newfs_msdos/newfs_msdos.c b/sbin/newfs_msdos/newfs_msdos.c index e3528ab1828e..bac250e7dd05 100644 --- a/sbin/newfs_msdos/newfs_msdos.c +++ b/sbin/newfs_msdos/newfs_msdos.c @@ -178,10 +178,10 @@ main(int argc, char *argv[]) argv += optind; if (argc < 1 || argc > 2) usage(); - if (o.align) { - if (o.hidden_sectors_set) - errx(1, "align (-A) is incompatible with -r"); - } + if (o.align) { + if (o.reserved_sectors) + errx(1, "align (-A) is incompatible with -r"); + } fname = *argv++; if (!o.create_size && !strchr(fname, '/')) { snprintf(buf, sizeof(buf), "%s%s", _PATH_DEV, fname); |