makefs: whitespace cleanup in msdos files
Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
2da6fd55d9
commit
5add92953e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=336706
@ -75,7 +75,7 @@ msdos_prep_opts(fsinfo_t *fsopts)
|
|||||||
{
|
{
|
||||||
struct msdos_options_ex *msdos_opt = ecalloc(1, sizeof(*msdos_opt));
|
struct msdos_options_ex *msdos_opt = ecalloc(1, sizeof(*msdos_opt));
|
||||||
const option_t msdos_options[] = {
|
const option_t msdos_options[] = {
|
||||||
#define AOPT(_opt, _type, _name, _min, _desc) { \
|
#define AOPT(_opt, _type, _name, _min, _desc) { \
|
||||||
.letter = _opt, \
|
.letter = _opt, \
|
||||||
.name = # _name, \
|
.name = # _name, \
|
||||||
.type = _min == -1 ? OPT_STRPTR : \
|
.type = _min == -1 ? OPT_STRPTR : \
|
||||||
@ -91,7 +91,7 @@ msdos_prep_opts(fsinfo_t *fsopts)
|
|||||||
.desc = _desc, \
|
.desc = _desc, \
|
||||||
},
|
},
|
||||||
ALLOPTS
|
ALLOPTS
|
||||||
#undef AOPT
|
#undef AOPT
|
||||||
{ 'U', "utf8", &msdos_opt->utf8, OPT_BOOL,
|
{ 'U', "utf8", &msdos_opt->utf8, OPT_BOOL,
|
||||||
0, 1, "Use UTF8 names" },
|
0, 1, "Use UTF8 names" },
|
||||||
{ .name = NULL }
|
{ .name = NULL }
|
||||||
@ -169,7 +169,7 @@ msdos_makefs(const char *image, const char *dir, fsnode *root, fsinfo_t *fsopts)
|
|||||||
fsopts->sectorsize = msdos_opt->options.bytes_per_sector;
|
fsopts->sectorsize = msdos_opt->options.bytes_per_sector;
|
||||||
} else if (fsopts->sectorsize != msdos_opt->options.bytes_per_sector) {
|
} else if (fsopts->sectorsize != msdos_opt->options.bytes_per_sector) {
|
||||||
err(1, "inconsistent sectorsize -S %u"
|
err(1, "inconsistent sectorsize -S %u"
|
||||||
"!= -o bytes_per_sector %u",
|
"!= -o bytes_per_sector %u",
|
||||||
fsopts->sectorsize, msdos_opt->options.bytes_per_sector);
|
fsopts->sectorsize, msdos_opt->options.bytes_per_sector);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -223,8 +223,8 @@ msdos_populate_dir(const char *path, struct denode *dir, fsnode *root,
|
|||||||
|
|
||||||
assert(dir != NULL);
|
assert(dir != NULL);
|
||||||
assert(root != NULL);
|
assert(root != NULL);
|
||||||
assert(fsopts != NULL);
|
assert(fsopts != NULL);
|
||||||
|
|
||||||
for (cur = root->next; cur != NULL; cur = cur->next) {
|
for (cur = root->next; cur != NULL; cur = cur->next) {
|
||||||
if ((size_t)snprintf(pbuf, sizeof(pbuf), "%s/%s", path,
|
if ((size_t)snprintf(pbuf, sizeof(pbuf), "%s/%s", path,
|
||||||
cur->name) >= sizeof(pbuf)) {
|
cur->name) >= sizeof(pbuf)) {
|
||||||
|
@ -108,7 +108,7 @@ msdosfs_mount(struct vnode *devvp, int flags)
|
|||||||
if (!(flags & MSDOSFSMNT_GEMDOSFS)) {
|
if (!(flags & MSDOSFSMNT_GEMDOSFS)) {
|
||||||
if (bsp->bs50.bsBootSectSig0 != BOOTSIG0
|
if (bsp->bs50.bsBootSectSig0 != BOOTSIG0
|
||||||
|| bsp->bs50.bsBootSectSig1 != BOOTSIG1) {
|
|| bsp->bs50.bsBootSectSig1 != BOOTSIG1) {
|
||||||
DPRINTF(("bootsig0 %d bootsig1 %d\n",
|
DPRINTF(("bootsig0 %d bootsig1 %d\n",
|
||||||
bsp->bs50.bsBootSectSig0,
|
bsp->bs50.bsBootSectSig0,
|
||||||
bsp->bs50.bsBootSectSig1));
|
bsp->bs50.bsBootSectSig1));
|
||||||
error = EINVAL;
|
error = EINVAL;
|
||||||
@ -142,10 +142,10 @@ msdosfs_mount(struct vnode *devvp, int flags)
|
|||||||
pmp->pm_SecPerTrack, pmp->pm_Heads, pmp->pm_Media));
|
pmp->pm_SecPerTrack, pmp->pm_Heads, pmp->pm_Media));
|
||||||
if (!(flags & MSDOSFSMNT_GEMDOSFS)) {
|
if (!(flags & MSDOSFSMNT_GEMDOSFS)) {
|
||||||
/* XXX - We should probably check more values here */
|
/* XXX - We should probably check more values here */
|
||||||
if (!pmp->pm_BytesPerSec || !SecPerClust
|
if (!pmp->pm_BytesPerSec || !SecPerClust
|
||||||
|| pmp->pm_SecPerTrack > 63) {
|
|| pmp->pm_SecPerTrack > 63) {
|
||||||
DPRINTF(("bytespersec %d secperclust %d "
|
DPRINTF(("bytespersec %d secperclust %d "
|
||||||
"secpertrack %d\n",
|
"secpertrack %d\n",
|
||||||
pmp->pm_BytesPerSec, SecPerClust,
|
pmp->pm_BytesPerSec, SecPerClust,
|
||||||
pmp->pm_SecPerTrack));
|
pmp->pm_SecPerTrack));
|
||||||
error = EINVAL;
|
error = EINVAL;
|
||||||
@ -317,7 +317,7 @@ msdosfs_mount(struct vnode *devvp, int flags)
|
|||||||
* must be a power of 2
|
* must be a power of 2
|
||||||
*/
|
*/
|
||||||
if (pmp->pm_bpcluster ^ (1 << pmp->pm_cnshift)) {
|
if (pmp->pm_bpcluster ^ (1 << pmp->pm_cnshift)) {
|
||||||
DPRINTF(("bpcluster %lu cnshift %lu\n",
|
DPRINTF(("bpcluster %lu cnshift %lu\n",
|
||||||
pmp->pm_bpcluster, pmp->pm_cnshift));
|
pmp->pm_bpcluster, pmp->pm_cnshift));
|
||||||
error = EINVAL;
|
error = EINVAL;
|
||||||
goto error_exit;
|
goto error_exit;
|
||||||
|
@ -101,7 +101,7 @@ msdosfs_times(struct msdosfsmount *pmp, struct denode *dep,
|
|||||||
struct timespec at;
|
struct timespec at;
|
||||||
struct timespec mt;
|
struct timespec mt;
|
||||||
|
|
||||||
if (stampst.st_ino)
|
if (stampst.st_ino)
|
||||||
st = &stampst;
|
st = &stampst;
|
||||||
|
|
||||||
#ifndef HAVE_NBTOOL_CONFIG_H
|
#ifndef HAVE_NBTOOL_CONFIG_H
|
||||||
@ -133,7 +133,7 @@ msdosfs_times(struct msdosfsmount *pmp, struct denode *dep,
|
|||||||
* memory denode's will be in synch.
|
* memory denode's will be in synch.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
msdosfs_findslot(struct denode *dp, struct componentname *cnp)
|
msdosfs_findslot(struct denode *dp, struct componentname *cnp)
|
||||||
{
|
{
|
||||||
daddr_t bn;
|
daddr_t bn;
|
||||||
int error;
|
int error;
|
||||||
@ -494,7 +494,7 @@ msdosfs_wfile(const char *path, struct denode *dep, fsnode *node)
|
|||||||
0, &bp)) != 0) {
|
0, &bp)) != 0) {
|
||||||
DPRINTF(("bread %d\n", error));
|
DPRINTF(("bread %d\n", error));
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
cpsize = MIN((nsize - offs), blsize - on);
|
cpsize = MIN((nsize - offs), blsize - on);
|
||||||
memcpy((char *)bp->b_data + on, dat + offs, cpsize);
|
memcpy((char *)bp->b_data + on, dat + offs, cpsize);
|
||||||
bwrite(bp);
|
bwrite(bp);
|
||||||
|
Loading…
Reference in New Issue
Block a user