Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\devpts\inode.c Create Date:2022-07-28 20:34:19
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:parse_mount_options():* Set @opts to mount options specified in @data. If an option is not* specified in @data, set it to its default value.* Note: @data may be NULL (in which case all options are set to default).

Proto:static int parse_mount_options(char *data, int op, struct pts_mount_opts *opts)

Type:int

Parameter:

TypeParameterName
char *data
intop
struct pts_mount_opts *opts
252  setuid = 0
253  setgid = 0
254  uid = GLOBAL_ROOT_UID
255  gid = GLOBAL_ROOT_GID
256  mode = DEVPTS_DEFAULT_MODE
257  ptmxmode = ptmx is a new node in /dev/pts and will be unused in legacy (single-* instance) mode. To prevent surprises in user space, set permissions of* ptmx to 0. Use 'chmod' or remount with '-o ptmxmode' to set meaningful* permissions.
258  max = Absolute limit
263  If op == PARSE_MOUNT Then reserve = mnt_ns == mnt_ns
267  When ((p = strsep - Split a string into tokens*@s: The string to be searched*@ct: The characters to search for* strsep() updates @s to point after the token, ready for the next call.* It returns empty tokens, too, behaving exactly like the libc function) != NULL) cycle
272  If Not p Then Continue
275  token = match_token: - Find a token (and optional args) in a string*@s: the string to examine for token/argument pairs*@table: match_table_t describing the set of allowed option tokens and the* arguments that may be associated with them. Must be terminated with a
277  Case token == Opt_uid
281  If Not uid_valid(uid) Then Return -EINVAL
283  uid = uid
284  setuid = 1
285  Break
286  Case token == Opt_gid
290  If Not gid_valid(gid) Then Return -EINVAL
292  gid = gid
293  setgid = 1
294  Break
295  Case token == Opt_mode
298  mode = option & S_IALLUGO
299  Break
300  Case token == Opt_ptmxmode
304  Break
305  Case token == Opt_newinstance
306  Break
307  Case token == Opt_max
311  max = option
312  Break
313  Default
314  pr_err("called with bogus options\n")
315  Return -EINVAL
319  Return 0
Caller
NameDescribe
devpts_remount
devpts_fill_super