Function report |
Source Code:lib\kstrtox.c |
Create Date:2022-07-28 06:26:23 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: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
Proto:int kstrtobool(const char *s, bool *res)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| const char * | s | |
| bool * | res |
| 338 | Case s[0] == 'y' |
| 339 | Case s[0] == 'Y' |
| 340 | Case s[0] == '1' |
| 341 | * res = true |
| 342 | Return 0 |
| 343 | Case s[0] == 'n' |
| 344 | Case s[0] == 'N' |
| 345 | Case s[0] == '0' |
| 346 | * res = false |
| 347 | Return 0 |
| 348 | Case s[0] == 'o' |
| 349 | Case s[0] == 'O' |
| 351 | Case s[1] == 'n' |
| 352 | Case s[1] == 'N' |
| 353 | * res = true |
| 354 | Return 0 |
| 355 | Case s[1] == 'f' |
| 356 | Case s[1] == 'F' |
| 357 | * res = false |
| 358 | Return 0 |
| 359 | Default |
| 360 | Break |
| 362 | Default |
| 363 | Break |
| 366 | Return -EINVAL |
| Name | Describe |
|---|---|
| kstrtobool_from_user | Since "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 |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |