函数逻辑报告 |
Source Code:block\genhd.c |
Create Date:2022-07-27 18:53:38 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:get_gendisk - get partitioning information for a given device*@devt: device to get partitioning information for*@partno: returned partition index* This function gets the structure containing partitioning* information for the given device @devt.
函数原型:struct gendisk *get_gendisk(dev_t devt, int *partno)
返回类型:struct gendisk
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| dev_t | devt | |
| int * | partno |
| 875 | 如果MAJOR(devt)不等于BLOCK_EXT_MAJOR则 |
| 878 | kobj等于kobj_lookup(bdev_map, devt, partno) |
| 879 | 如果kobj则disk等于dev_to_disk(kobj_to_dev(kobj)) |
| 881 | 否则 |
| 884 | spin_lock_bh( & For extended devt allocation. ext_devt_lock prevents look up* results from going away underneath its user.) |
| 886 | 如果part且get_disk_and_module(part_to_disk(part))则 |
| 888 | disk等于part_to_disk(part) |
| 893 | 如果非disk则返回:NULL |
| 900 | lock for reading |
| 901 | 如果此条件成立可能性小(为编译器优化)((flags & GENHD_FL_HIDDEN) || !(flags & GENHD_FL_UP))则 |
| 905 | disk = NULL |
| 906 | 否则 |
| 909 | 返回:disk |
| 名称 | 描述 |
|---|---|
| blkcg_conf_get_disk | lkg_conf_prep - parse and prepare for per-blkg config update*@inputp: input string pointer* Parse the device node prefix part, MAJ:MIN, of per-blkg config update* from @input and get and return the matching gendisk. *@inputp is |
| software_resume | software_resume - Resume from a saved hibernation image.* This routine is called as a late initcall, when all devices have been* discovered and initialized already.* The image reading code is called to see if there is a hibernation image |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |