Lines Matching +full:com +full:- +full:seq
1 // SPDX-License-Identifier: GPL-2.0
6 * Brad Boyer (flar@allandria.com)
7 * (C) 2003 Ardis Technologies <roman@ardistech.com>
54 opts->creator = HFSPLUS_DEF_CR_TYPE; in hfsplus_fill_defaults()
55 opts->type = HFSPLUS_DEF_CR_TYPE; in hfsplus_fill_defaults()
56 opts->umask = current_umask(); in hfsplus_fill_defaults()
57 opts->uid = current_uid(); in hfsplus_fill_defaults()
58 opts->gid = current_gid(); in hfsplus_fill_defaults()
59 opts->part = -1; in hfsplus_fill_defaults()
60 opts->session = -1; in hfsplus_fill_defaults()
66 if (arg->to - arg->from != 4) in match_fourchar()
67 return -EINVAL; in match_fourchar()
68 memcpy(result, arg->from, 4); in match_fourchar()
116 if (match_fourchar(&args[0], &sbi->creator)) { in hfsplus_parse_options()
122 if (match_fourchar(&args[0], &sbi->type)) { in hfsplus_parse_options()
132 sbi->umask = (umode_t)tmp; in hfsplus_parse_options()
139 sbi->uid = make_kuid(current_user_ns(), (uid_t)tmp); in hfsplus_parse_options()
140 if (!uid_valid(sbi->uid)) { in hfsplus_parse_options()
144 set_bit(HFSPLUS_SB_UID, &sbi->flags); in hfsplus_parse_options()
152 sbi->gid = make_kgid(current_user_ns(), (gid_t)tmp); in hfsplus_parse_options()
153 if (!gid_valid(sbi->gid)) { in hfsplus_parse_options()
157 set_bit(HFSPLUS_SB_GID, &sbi->flags); in hfsplus_parse_options()
161 if (match_int(&args[0], &sbi->part)) { in hfsplus_parse_options()
167 if (match_int(&args[0], &sbi->session)) { in hfsplus_parse_options()
173 if (sbi->nls) { in hfsplus_parse_options()
179 sbi->nls = load_nls(p); in hfsplus_parse_options()
180 if (!sbi->nls) { in hfsplus_parse_options()
189 clear_bit(HFSPLUS_SB_NODECOMPOSE, &sbi->flags); in hfsplus_parse_options()
192 set_bit(HFSPLUS_SB_NODECOMPOSE, &sbi->flags); in hfsplus_parse_options()
195 clear_bit(HFSPLUS_SB_NOBARRIER, &sbi->flags); in hfsplus_parse_options()
198 set_bit(HFSPLUS_SB_NOBARRIER, &sbi->flags); in hfsplus_parse_options()
201 set_bit(HFSPLUS_SB_FORCE, &sbi->flags); in hfsplus_parse_options()
209 if (!sbi->nls) { in hfsplus_parse_options()
211 sbi->nls = load_nls("utf8"); in hfsplus_parse_options()
212 if (!sbi->nls) in hfsplus_parse_options()
213 sbi->nls = load_nls_default(); in hfsplus_parse_options()
214 if (!sbi->nls) in hfsplus_parse_options()
221 int hfsplus_show_options(struct seq_file *seq, struct dentry *root) in hfsplus_show_options() argument
223 struct hfsplus_sb_info *sbi = HFSPLUS_SB(root->d_sb); in hfsplus_show_options()
225 if (sbi->creator != HFSPLUS_DEF_CR_TYPE) in hfsplus_show_options()
226 seq_show_option_n(seq, "creator", (char *)&sbi->creator, 4); in hfsplus_show_options()
227 if (sbi->type != HFSPLUS_DEF_CR_TYPE) in hfsplus_show_options()
228 seq_show_option_n(seq, "type", (char *)&sbi->type, 4); in hfsplus_show_options()
229 seq_printf(seq, ",umask=%o,uid=%u,gid=%u", sbi->umask, in hfsplus_show_options()
230 from_kuid_munged(&init_user_ns, sbi->uid), in hfsplus_show_options()
231 from_kgid_munged(&init_user_ns, sbi->gid)); in hfsplus_show_options()
232 if (sbi->part >= 0) in hfsplus_show_options()
233 seq_printf(seq, ",part=%u", sbi->part); in hfsplus_show_options()
234 if (sbi->session >= 0) in hfsplus_show_options()
235 seq_printf(seq, ",session=%u", sbi->session); in hfsplus_show_options()
236 if (sbi->nls) in hfsplus_show_options()
237 seq_printf(seq, ",nls=%s", sbi->nls->charset); in hfsplus_show_options()
238 if (test_bit(HFSPLUS_SB_NODECOMPOSE, &sbi->flags)) in hfsplus_show_options()
239 seq_puts(seq, ",nodecompose"); in hfsplus_show_options()
240 if (test_bit(HFSPLUS_SB_NOBARRIER, &sbi->flags)) in hfsplus_show_options()
241 seq_puts(seq, ",nobarrier"); in hfsplus_show_options()