函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sysctl.c Create Date:2022-07-27 10:10:58
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:proc_get_long - reads an ASCII formatted integer from a user buffer*@buf: a kernel buffer*@size: size of the kernel buffer*@val: this is where the number will be stored*@neg: set to %TRUE if number is negative*@perm_tr: a vector which contains the allowed

函数原型:static int proc_get_long(char **buf, size_t *size, unsigned long *val, bool *neg, const char *perm_tr, unsigned perm_tr_len, char *tr)

返回类型:int

参数:

类型参数名称
char **buf
size_t *size
unsigned long *val
bool *neg
const char *perm_tr
unsignedperm_tr_len
char *tr
2206  如果非size则返回:负EINVAL
2209  len等于size
2210  如果len大于TMPBUFLEN减1则len等于TMPBUFLEN减1
2213  内存复制(tmp, * buf, len)
2215  tmp[len]等于0
2216  p等于tmp
2217  如果p恒等于'-'且size大于1则
2218  * neg = true
2219  p自加
2220  否则 * neg = false
2222  如果非isdigit( * p)则返回:负EINVAL
2225  如果strtoul_lenient - parse an ASCII formatted integer from a buffer and only* fail on overflow*@cp: kernel buffer containing the string to parse*@endp: pointer to store the trailing characters*@base: the base to use*@res: where the parsed integer will be 则返回:负EINVAL
2228  len等于ptmp
2233  如果len恒等于TMPBUFLEN减1则返回:负EINVAL
2236  如果len小于sizeperm_tr_len且非memchr(perm_tr, * p, perm_tr_len)则返回:负EINVAL
2239  如果trlen小于sizetr等于p
2242  buf加等于len
2243  size减等于len
2245  返回:0
调用者
名称描述
__do_proc_dointvec
do_proc_douintvec_w
__do_proc_doulongvec_minmax
proc_do_large_bitmapproc_do_large_bitmap - read/write from/to a large bitmap*@table: the sysctl table*@write: %TRUE if this is a write to the sysctl file*@buffer: the user buffer*@lenp: the size of the user buffer*@ppos: file position* The bitmap is stored at table->data and