函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:blk_add_partition

函数原型:static bool blk_add_partition(struct gendisk *disk, struct block_device *bdev, struct parsed_partitions *state, int p)

返回类型:bool

参数:

类型参数名称
struct gendisk *disk
struct block_device *bdev
struct parsed_partitions *state
intp
488  size等于size
489  from等于from
492  如果非size则返回:true
495  如果from大于等于get_capacity(disk)则
496  printk - print a kernel message*@fmt: format string* This is printk(). It can be called from any context. We want it to work.* We try to grab the console_lock. If we succeed, it's easy - we log the* output and call the console drivers
499  如果disk_unlock_native_capacity(disk)则返回:false
501  返回:true
504  如果fromsize大于get_capacity(disk)则
505  printk - print a kernel message*@fmt: format string* This is printk(). It can be called from any context. We want it to work.* We try to grab the console_lock. If we succeed, it's easy - we log the* output and call the console drivers
509  如果disk_unlock_native_capacity(disk)则返回:false
517  size等于get_capacity(disk)减from
520  part等于Must be called either with bd_mutex held, before a disk can be opened or* after all disk users are gone.
522  如果是错误错误不等于负ENXIO
523  printk - print a kernel message*@fmt: format string* This is printk(). It can be called from any context. We want it to work.* We try to grab the console_lock. If we succeed, it's easy - we log the* output and call the console drivers
525  返回:true
532  返回:true
调用者
名称描述
blk_add_partitions