mount: style fixes

This commit is contained in:
Denis Vlasenko 2006-09-17 15:04:35 +00:00
parent 3bc59aa2a4
commit 13b4924ce0

View File

@ -1340,14 +1340,14 @@ static int singlemount(struct mntent *mp, int ignore_busy)
loopFile = bb_simplify_path(mp->mnt_fsname); loopFile = bb_simplify_path(mp->mnt_fsname);
mp->mnt_fsname = 0; mp->mnt_fsname = 0;
switch (set_loop(&(mp->mnt_fsname), loopFile, 0)) { switch (set_loop(&(mp->mnt_fsname), loopFile, 0)) {
case 0: case 0:
case 1: case 1:
break; break;
default: default:
bb_error_msg( errno == EPERM || errno == EACCES bb_error_msg( errno == EPERM || errno == EACCES
? bb_msg_perm_denied_are_you_root ? bb_msg_perm_denied_are_you_root
: "cannot setup loop device"); : "cannot setup loop device");
return errno; return errno;
} }
// Autodetect bind mounts // Autodetect bind mounts
@ -1379,7 +1379,7 @@ static int singlemount(struct mntent *mp, int ignore_busy)
for (fl = fslist; fl; fl = fl->link) { for (fl = fslist; fl; fl = fl->link) {
mp->mnt_type = fl->data; mp->mnt_type = fl->data;
rc = mount_it_now(mp,vfsflags, filteropts); rc = mount_it_now(mp, vfsflags, filteropts);
if (!rc) break; if (!rc) break;
mp->mnt_type = 0; mp->mnt_type = 0;
@ -1431,31 +1431,31 @@ int mount_main(int argc, char **argv)
while ((opt = getopt(argc, argv, "o:t:rwavnf")) > 0) { while ((opt = getopt(argc, argv, "o:t:rwavnf")) > 0) {
switch (opt) { switch (opt) {
case 'o': case 'o':
append_mount_options(&cmdopts, optarg); append_mount_options(&cmdopts, optarg);
break; break;
case 't': case 't':
fstype = optarg; fstype = optarg;
break; break;
case 'r': case 'r':
append_mount_options(&cmdopts, "ro"); append_mount_options(&cmdopts, "ro");
break; break;
case 'w': case 'w':
append_mount_options(&cmdopts, "rw"); append_mount_options(&cmdopts, "rw");
break; break;
case 'a': case 'a':
all = TRUE; all = TRUE;
break; break;
case 'n': case 'n':
USE_FEATURE_MTAB_SUPPORT(useMtab = FALSE;) USE_FEATURE_MTAB_SUPPORT(useMtab = FALSE;)
break; break;
case 'f': case 'f':
USE_FEATURE_MTAB_SUPPORT(fakeIt = FALSE;) USE_FEATURE_MTAB_SUPPORT(fakeIt = FALSE;)
break; break;
case 'v': case 'v':
break; // ignore -v break; // ignore -v
default: default:
bb_show_usage(); bb_show_usage();
} }
} }
argv += optind; argv += optind;