Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\cgroup\cgroup-v1.c Create Date:2022-07-28 11:13:18
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:cgroup1_parse_param

Proto:int cgroup1_parse_param(struct fs_context *fc, struct fs_parameter *param)

Type:int

Parameter:

TypeParameterName
struct fs_context *fc
struct fs_parameter *param
909  ctx = cgroup_fc2context(fc)
914  opt = fs_parse(fc, & cgroup1_fs_parameters, param, & result)
915  If opt == -Parameter not supported Then
916  If strcmp(Parameter name , "source") == 0 Then
917  source = string
918  string = NULL
919  Return 0
924  Selected subsystems |= 1 << i
925  Return 0
927  Return cg_invalf(fc, "cgroup1: Unknown subsys name '%s'", Parameter name )
929  If opt < 0 Then Return opt
933  Case opt == Opt_none
935  User explicitly requested empty subsystem = true
936  Break
937  Case opt == Opt_all
938  Seen 'all' option = true
939  Break
940  Case opt == Opt_noprefix
941  CGRP_ROOT_* flags |= CGRP_ROOT_NOPREFIX
942  Break
943  Case opt == Opt_clone_children
944  cgroup1 bits = true
945  Break
946  Case opt == Opt_cpuset_v2_mode
947  CGRP_ROOT_* flags |= CGRP_ROOT_CPUSET_V2_MODE
948  Break
949  Case opt == Opt_xattr
950  CGRP_ROOT_* flags |= CGRP_ROOT_XATTR
951  Break
952  Case opt == Opt_release_agent
954  If Path for release notifications Then Return cg_invalf(fc, "cgroup1: release_agent respecified")
956  Path for release notifications = string
957  string = NULL
958  Break
959  Case opt == Opt_name
961  If disable named v1 mounts Then Return -ENOENT
964  If Not size Then Return cg_invalf(fc, "cgroup1: Empty name")
966  If size > MAX_CGROUP_ROOT_NAMELEN - 1 Then Return cg_invalf(fc, "cgroup1: Name too long")
969  When i < size cycle
970  c = string[i]
971  If isalnum(c) Then Continue
973  If c == '.' || c == '-' || c == '_' Then Continue
975  Return cg_invalf(fc, "cgroup1: Invalid name")
978  If Hierarchy name Then Return cg_invalf(fc, "cgroup1: name respecified")
980  Hierarchy name = string
981  string = NULL
982  Break
984  Return 0