Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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

Proto: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)

Type:int

Parameter:

TypeParameterName
char **buf
size_t *size
unsigned long *val
bool *neg
const char *perm_tr
unsignedperm_tr_len
char *tr
2206  If Not size Then Return -EINVAL
2209  len = size
2210  If len > TMPBUFLEN - 1 Then len = TMPBUFLEN - 1
2213  No 3D Now!(tmp, * buf, len)
2215  tmp[len] = 0
2216  p = tmp
2217  If p == '-' && size > 1 Then
2218  * neg = true
2219  p++
2220  Else * neg = false
2222  If Not isdigit( * p) Then Return -EINVAL
2225  If 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 Then Return -EINVAL
2228  len = p - tmp
2233  If len == TMPBUFLEN - 1 Then Return -EINVAL
2236  If len < size && perm_tr_len && Not memchr(perm_tr, * p, perm_tr_len) Then Return -EINVAL
2239  If tr && len < size Then tr = p
2242  buf += len
2243  size -= len
2245  Return 0
Caller
NameDescribe
__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