Lines Matching refs:opts
246 static int parse_mount_options(char *data, int op, struct pts_mount_opts *opts) in parse_mount_options() argument
252 opts->setuid = 0; in parse_mount_options()
253 opts->setgid = 0; in parse_mount_options()
254 opts->uid = GLOBAL_ROOT_UID; in parse_mount_options()
255 opts->gid = GLOBAL_ROOT_GID; in parse_mount_options()
256 opts->mode = DEVPTS_DEFAULT_MODE; in parse_mount_options()
257 opts->ptmxmode = DEVPTS_DEFAULT_PTMX_MODE; in parse_mount_options()
258 opts->max = NR_UNIX98_PTY_MAX; in parse_mount_options()
264 opts->reserve = in parse_mount_options()
283 opts->uid = uid; in parse_mount_options()
284 opts->setuid = 1; in parse_mount_options()
292 opts->gid = gid; in parse_mount_options()
293 opts->setgid = 1; in parse_mount_options()
298 opts->mode = option & S_IALLUGO; in parse_mount_options()
303 opts->ptmxmode = option & S_IALLUGO; in parse_mount_options()
311 opts->max = option; in parse_mount_options()
330 struct pts_mount_opts *opts = &fsi->mount_opts; in mknod_ptmx() local
361 mode = S_IFCHR|opts->ptmxmode; in mknod_ptmx()
388 struct pts_mount_opts *opts = &fsi->mount_opts; in devpts_remount() local
390 err = parse_mount_options(data, PARSE_REMOUNT, opts); in devpts_remount()
406 struct pts_mount_opts *opts = &fsi->mount_opts; in devpts_show_options() local
408 if (opts->setuid) in devpts_show_options()
410 from_kuid_munged(&init_user_ns, opts->uid)); in devpts_show_options()
411 if (opts->setgid) in devpts_show_options()
413 from_kgid_munged(&init_user_ns, opts->gid)); in devpts_show_options()
414 seq_printf(seq, ",mode=%03o", opts->mode); in devpts_show_options()
415 seq_printf(seq, ",ptmxmode=%03o", opts->ptmxmode); in devpts_show_options()
416 if (opts->max < NR_UNIX98_PTY_MAX) in devpts_show_options()
417 seq_printf(seq, ",max=%d", opts->max); in devpts_show_options()
568 struct pts_mount_opts *opts; in devpts_pty_new() local
572 opts = &fsi->mount_opts; in devpts_pty_new()
579 inode->i_uid = opts->setuid ? opts->uid : current_fsuid(); in devpts_pty_new()
580 inode->i_gid = opts->setgid ? opts->gid : current_fsgid(); in devpts_pty_new()
582 init_special_inode(inode, S_IFCHR|opts->mode, MKDEV(UNIX98_PTY_SLAVE_MAJOR, index)); in devpts_pty_new()