Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\smack\smack_lsm.c Create Date:2022-07-28 19:19:55
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:smack_add_opt

Proto:static int smack_add_opt(int token, const char *s, void **mnt_opts)

Type:int

Parameter:

TypeParameterName
inttoken
const char *s
void **mnt_opts
588  opts = mnt_opts
590  If Not opts Then
591  opts = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
592  If Not opts Then Return -ENOMEM
594  mnt_opts = opts
596  If Not s Then Return -ENOMEM
600  Case token == Opt_fsdefault
601  If fsdefault Then Go to out_opt_err
603  fsdefault = s
604  Break
605  Case token == Opt_fsfloor
606  If fsfloor Then Go to out_opt_err
608  fsfloor = s
609  Break
610  Case token == Opt_fshat
611  If fshat Then Go to out_opt_err
613  fshat = s
614  Break
615  Case token == Opt_fsroot
616  If fsroot Then Go to out_opt_err
618  fsroot = s
619  Break
620  Case token == Opt_fstransmute
621  If fstransmute Then Go to out_opt_err
623  fstransmute = s
624  Break
626  Return 0
628  out_opt_err :
629  pr_warn("Smack: duplicate mount options\n")
630  Return -EINVAL
Caller
NameDescribe
smack_fs_context_parse_paramsmack_fs_context_parse_param - Parse a single mount parameter*@fc: The new filesystem context being constructed.*@param: The parameter.* Returns 0 on success, -ENOPARAM to pass the parameter on or anything else on* error.
smack_sb_eat_lsm_opts