Lines Matching refs:opts
706 static void fat_reset_iocharset(struct fat_mount_options *opts) in fat_reset_iocharset() argument
708 if (opts->iocharset != fat_default_iocharset) { in fat_reset_iocharset()
710 kfree(opts->iocharset); in fat_reset_iocharset()
711 opts->iocharset = fat_default_iocharset; in fat_reset_iocharset()
943 struct fat_mount_options *opts = &sbi->options; in fat_show_options() local
944 int isvfat = opts->isvfat; in fat_show_options()
946 if (!uid_eq(opts->fs_uid, GLOBAL_ROOT_UID)) in fat_show_options()
948 from_kuid_munged(&init_user_ns, opts->fs_uid)); in fat_show_options()
949 if (!gid_eq(opts->fs_gid, GLOBAL_ROOT_GID)) in fat_show_options()
951 from_kgid_munged(&init_user_ns, opts->fs_gid)); in fat_show_options()
952 seq_printf(m, ",fmask=%04o", opts->fs_fmask); in fat_show_options()
953 seq_printf(m, ",dmask=%04o", opts->fs_dmask); in fat_show_options()
954 if (opts->allow_utime) in fat_show_options()
955 seq_printf(m, ",allow_utime=%04o", opts->allow_utime); in fat_show_options()
963 switch (opts->shortname) { in fat_show_options()
981 if (opts->name_check != 'n') in fat_show_options()
982 seq_printf(m, ",check=%c", opts->name_check); in fat_show_options()
983 if (opts->usefree) in fat_show_options()
985 if (opts->quiet) in fat_show_options()
987 if (opts->showexec) in fat_show_options()
989 if (opts->sys_immutable) in fat_show_options()
992 if (opts->dotsOK) in fat_show_options()
994 if (opts->nocase) in fat_show_options()
997 if (opts->utf8) in fat_show_options()
999 if (opts->unicode_xlate) in fat_show_options()
1001 if (!opts->numtail) in fat_show_options()
1003 if (opts->rodir) in fat_show_options()
1006 if (opts->flush) in fat_show_options()
1008 if (opts->tz_set) { in fat_show_options()
1009 if (opts->time_offset) in fat_show_options()
1010 seq_printf(m, ",time_offset=%d", opts->time_offset); in fat_show_options()
1014 if (opts->errors == FAT_ERRORS_CONT) in fat_show_options()
1016 else if (opts->errors == FAT_ERRORS_PANIC) in fat_show_options()
1020 if (opts->nfs == FAT_NFS_NOSTALE_RO) in fat_show_options()
1022 else if (opts->nfs) in fat_show_options()
1024 if (opts->discard) in fat_show_options()
1026 if (opts->dos1xfloppy) in fat_show_options()
1128 int silent, int *debug, struct fat_mount_options *opts) in parse_options() argument
1135 opts->isvfat = is_vfat; in parse_options()
1137 opts->fs_uid = current_uid(); in parse_options()
1138 opts->fs_gid = current_gid(); in parse_options()
1139 opts->fs_fmask = opts->fs_dmask = current_umask(); in parse_options()
1140 opts->allow_utime = -1; in parse_options()
1141 opts->codepage = fat_default_codepage; in parse_options()
1142 fat_reset_iocharset(opts); in parse_options()
1144 opts->shortname = VFAT_SFN_DISPLAY_WINNT|VFAT_SFN_CREATE_WIN95; in parse_options()
1145 opts->rodir = 0; in parse_options()
1147 opts->shortname = 0; in parse_options()
1148 opts->rodir = 1; in parse_options()
1150 opts->name_check = 'n'; in parse_options()
1151 opts->quiet = opts->showexec = opts->sys_immutable = opts->dotsOK = 0; in parse_options()
1152 opts->unicode_xlate = 0; in parse_options()
1153 opts->numtail = 1; in parse_options()
1154 opts->usefree = opts->nocase = 0; in parse_options()
1155 opts->tz_set = 0; in parse_options()
1156 opts->nfs = 0; in parse_options()
1157 opts->errors = FAT_ERRORS_RO; in parse_options()
1160 opts->utf8 = IS_ENABLED(CONFIG_FAT_DEFAULT_UTF8) && is_vfat; in parse_options()
1179 opts->name_check = 's'; in parse_options()
1182 opts->name_check = 'r'; in parse_options()
1185 opts->name_check = 'n'; in parse_options()
1188 opts->usefree = 1; in parse_options()
1192 opts->nocase = 1; in parse_options()
1195 opts->shortname = VFAT_SFN_DISPLAY_WIN95 in parse_options()
1200 opts->quiet = 1; in parse_options()
1203 opts->showexec = 1; in parse_options()
1209 opts->sys_immutable = 1; in parse_options()
1214 opts->fs_uid = make_kuid(current_user_ns(), option); in parse_options()
1215 if (!uid_valid(opts->fs_uid)) in parse_options()
1221 opts->fs_gid = make_kgid(current_user_ns(), option); in parse_options()
1222 if (!gid_valid(opts->fs_gid)) in parse_options()
1228 opts->fs_fmask = opts->fs_dmask = option; in parse_options()
1233 opts->fs_dmask = option; in parse_options()
1238 opts->fs_fmask = option; in parse_options()
1243 opts->allow_utime = option & (S_IWGRP | S_IWOTH); in parse_options()
1248 opts->codepage = option; in parse_options()
1251 opts->flush = 1; in parse_options()
1263 opts->tz_set = 1; in parse_options()
1264 opts->time_offset = option; in parse_options()
1267 opts->tz_set = 1; in parse_options()
1268 opts->time_offset = 0; in parse_options()
1271 opts->errors = FAT_ERRORS_CONT; in parse_options()
1274 opts->errors = FAT_ERRORS_PANIC; in parse_options()
1277 opts->errors = FAT_ERRORS_RO; in parse_options()
1280 opts->nfs = FAT_NFS_STALE_RW; in parse_options()
1283 opts->nfs = FAT_NFS_NOSTALE_RO; in parse_options()
1286 opts->dos1xfloppy = 1; in parse_options()
1291 opts->dotsOK = 1; in parse_options()
1294 opts->dotsOK = 0; in parse_options()
1299 fat_reset_iocharset(opts); in parse_options()
1303 opts->iocharset = iocharset; in parse_options()
1306 opts->shortname = VFAT_SFN_DISPLAY_LOWER in parse_options()
1310 opts->shortname = VFAT_SFN_DISPLAY_WIN95 in parse_options()
1314 opts->shortname = VFAT_SFN_DISPLAY_WINNT in parse_options()
1318 opts->shortname = VFAT_SFN_DISPLAY_WINNT in parse_options()
1322 opts->utf8 = 0; in parse_options()
1325 opts->utf8 = 1; in parse_options()
1328 opts->unicode_xlate = 0; in parse_options()
1331 opts->unicode_xlate = 1; in parse_options()
1334 opts->numtail = 1; /* negated option */ in parse_options()
1337 opts->numtail = 0; /* negated option */ in parse_options()
1340 opts->rodir = 1; in parse_options()
1343 opts->discard = 1; in parse_options()
1364 if (!strcmp(opts->iocharset, "utf8")) { in parse_options()
1371 if (opts->allow_utime == (unsigned short)-1) in parse_options()
1372 opts->allow_utime = ~opts->fs_dmask & (S_IWGRP | S_IWOTH); in parse_options()
1373 if (opts->unicode_xlate) in parse_options()
1374 opts->utf8 = 0; in parse_options()
1375 if (opts->nfs == FAT_NFS_NOSTALE_RO) { in parse_options()