函数逻辑报告 |
Source Code:block\genhd.c |
Create Date:2022-07-27 18:53:28 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:__device_add_disk - add disk information to kernel list*@parent: parent device for the disk*@disk: per-device partitioning information*@groups: Additional per-device sysfs groups*@register_queue: register the queue if set to true* This function registers
函数原型:static void __device_add_disk(struct device *parent, struct gendisk *disk, const struct attribute_group **groups, bool register_queue)
返回类型:void
参数:
类型 | 参数 | 名称 |
---|---|---|
struct device * | parent | |
struct gendisk * | disk | |
const struct attribute_group ** | groups | |
bool | register_queue |
711 | WARN_ON( maximum number of minors, =1 for * disks that can't be partitioned. && !( major number of driver || first_minor)) |
712 | WARN_ON(! maximum number of minors, =1 for * disks that can't be partitioned. && !(flags & (allow extended devt | GENHD_FL_HIDDEN))) |
715 | flags或等于GENHD_FL_UP |
717 | retval等于lk_alloc_devt - allocate a dev_t for a partition*@part: partition to allocate dev_t for*@devt: out parameter for resulting dev_t* Allocate a dev_t for block device |
718 | 如果retval则 |
719 | WARN_ON(1) |
720 | 返回 |
722 | major number of driver 等于MAJOR(devt) |
723 | first_minor等于MINOR(devt) |
725 | disk_alloc_events(disk) |
727 | 如果flags按位与GENHD_FL_HIDDEN则 |
734 | 否则 |
745 | register_disk(parent, disk, groups) |
746 | 如果register_queue则lk_register_queue - register a block layer queue with sysfs*@disk: Disk of which the request queue should be registered with sysfs. |
753 | WARN_ON_ONCE(!blk_get_queue(queue)) |
755 | disk_add_events(disk) |
756 | blk_integrity_add(disk) |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |