Function report |
Source Code:block\genhd.c |
Create Date:2022-07-28 17:17:41 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:gister_blkdev - register a new block device*@major: the requested major device number [1..BLKDEV_MAJOR_MAX-1]. If*@major = 0, try to allocate any unused major number.*@name: the name of the new block device as a zero terminated string
Proto:int register_blkdev(unsigned int major, const char *name)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| unsigned int | major | |
| const char * | name |
| 357 | ret = 0 |
| 359 | mutex_lock( & block_class_lock) |
| 362 | If major == 0 Then |
| 378 | If major >= BLKDEV_MAJOR_MAX Then |
| 379 | pr_err("%s: major requested (%u) is greater than the maximum (%u) for %s\n", __func__, major, BLKDEV_MAJOR_MAX - 1, name) |
| 383 | Go to out |
| 386 | p = Allocation memory |
| 387 | If (p == NULL) Then |
| 394 | next = NULL |
| 406 | If ret < 0 Then |
| 411 | out : |
| 413 | Return ret |
| Name | Describe |
|---|---|
| genhd_device_init |
| 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 |