Lines Matching defs:opts
222 * Set @opts to mount options specified in @data. If an option is not
227 static int parse_mount_options(char *data, int op, struct pts_mount_opts *opts)
233 opts->setuid = 0;
234 opts->setgid = 0;
235 opts->uid = GLOBAL_ROOT_UID;
236 opts->gid = GLOBAL_ROOT_GID;
237 opts->mode = DEVPTS_DEFAULT_MODE;
238 opts->ptmxmode = DEVPTS_DEFAULT_PTMX_MODE;
239 opts->max = NR_UNIX98_PTY_MAX;
245 opts->reserve =
264 opts->uid = uid;
265 opts->setuid = 1;
273 opts->gid = gid;
274 opts->setgid = 1;
279 opts->mode = option & S_IALLUGO;
284 opts->ptmxmode = option & S_IALLUGO;
292 opts->max = option;
311 struct pts_mount_opts *opts = &fsi->mount_opts;
342 mode = S_IFCHR|opts->ptmxmode;
369 struct pts_mount_opts *opts = &fsi->mount_opts;
371 err = parse_mount_options(data, PARSE_REMOUNT, opts);
387 struct pts_mount_opts *opts = &fsi->mount_opts;
389 if (opts->setuid)
391 from_kuid_munged(&init_user_ns, opts->uid));
392 if (opts->setgid)
394 from_kgid_munged(&init_user_ns, opts->gid));
395 seq_printf(seq, ",mode=%03o", opts->mode);
396 seq_printf(seq, ",ptmxmode=%03o", opts->ptmxmode);
397 if (opts->max < NR_UNIX98_PTY_MAX)
398 seq_printf(seq, ",max=%d", opts->max);
549 struct pts_mount_opts *opts;
553 opts = &fsi->mount_opts;
560 inode->i_uid = opts->setuid ? opts->uid : current_fsuid();
561 inode->i_gid = opts->setgid ? opts->gid : current_fsgid();
563 init_special_inode(inode, S_IFCHR|opts->mode, MKDEV(UNIX98_PTY_SLAVE_MAJOR, index));