函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:kstrtobool - convert common user inputs into boolean values*@s: input string*@res: result* This routine returns 0 iff the first character is one of 'Yy1Nn0', or* [oO][NnFf] for "on" and "off". Otherwise it will return -EINVAL. Value

函数原型:int kstrtobool(const char *s, bool *res)

返回类型:int

参数:

类型参数名称
const char *s
bool *res
334  如果非s则返回:负EINVAL
338  :s[0]恒等于'y'
339  :s[0]恒等于'Y'
340  :s[0]恒等于'1'
341  * res = true
342  返回:0
343  :s[0]恒等于'n'
344  :s[0]恒等于'N'
345  :s[0]恒等于'0'
346  * res = false
347  返回:0
348  :s[0]恒等于'o'
349  :s[0]恒等于'O'
351  :s[1]恒等于'n'
352  :s[1]恒等于'N'
353  * res = true
354  返回:0
355  :s[1]恒等于'f'
356  :s[1]恒等于'F'
357  * res = false
358  返回:0
359  默认
360  退出
362  默认
363  退出
366  返回:负EINVAL
调用者
名称描述
kstrtobool_from_userSince "base" would be a nonsense argument, this open-codes the* _from_user helper instead of using the helper macro below.
parse_gart_mem
enabled_store
force_store
early_init_on_free
enable_c02_store
setup_psi
early_init_on_alloc