mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-21 02:06:37 +00:00
makefs: warn that ffs sectorsize other than 512 may not work
newfs always sets sectorsize to DEV_BSIZE (512) and derives some other
values based on the number of 512-byte sectors per real sector. Similar
logic is required in makefs. Until that happens, emit a warning that
the image may be incorrect.
PR: 276571
(cherry picked from commit 176b9e0d72
)
This commit is contained in:
parent
a323dd42bc
commit
8e40217819
|
@ -340,6 +340,9 @@ ffs_validate(const char *dir, fsnode *root, fsinfo_t *fsopts)
|
|||
/* set FFS defaults */
|
||||
if (fsopts->sectorsize == -1)
|
||||
fsopts->sectorsize = DFL_SECSIZE;
|
||||
if (fsopts->sectorsize != DFL_SECSIZE)
|
||||
warnx("sectorsize %d may produce nonfunctional image",
|
||||
fsopts->sectorsize);
|
||||
if (ffs_opts->fsize == -1)
|
||||
ffs_opts->fsize = MAX(DFL_FRAGSIZE, fsopts->sectorsize);
|
||||
if (ffs_opts->bsize == -1)
|
||||
|
|
Loading…
Reference in a new issue