函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\nfs_common\nfsacl.c Create Date:2022-07-29 11:05:11
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:sacl_encode - Encode an NFSv3 ACL*@buf: destination xdr_buf to contain XDR encoded ACL*@base: byte offset in xdr_buf where XDR'd ACL begins*@inode: inode of file whose ACL this is*@acl: posix_acl to encode*@encode_entries: whether to encode ACEs as

函数原型:int nfsacl_encode(struct xdr_buf *buf, unsigned int base, struct inode *inode, struct posix_acl *acl, int encode_entries, int typeflag)

返回类型:int

参数:

类型参数名称
struct xdr_buf *buf
unsigned intbase
struct inode *inode
struct posix_acl *acl
intencode_entries
inttypeflag
95  entries等于如果acla_countmax_t - return maximum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(int, a_count, 4)否则0
96  struct nfsacl_encode_desc nfsacl_desc = {desc = {elem_size = 12, array_len = encode_entries ? entries : 0, xcode = xdr_nfsace_encode, }, acl = acl, typeflag = typeflag, uid = i_uid, gid = i_gid, }
110  如果entries大于Maximum number of ACL entries over NFS xdr_encode_word(buf, base, entries)则返回:负EINVAL
113  如果encode_entriesacla_count恒等于3则
114  acl2等于acl
120  Init a fresh posix_acl
124  a_entries[0]等于a_entries[0]
125  a_entries[1]等于a_entries[1]
126  a_entries[2]等于a_entries[1]
127  e_tag等于ACL_MASK
128  a_entries[3]等于a_entries[2]
129  acl等于acl2
131  err等于xdr_encode_array2(buf, base + 4, & desc)
132  如果非errerr等于8加elem_sizearray_len
135  返回:err