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