Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\genhd.c Create Date:2022-07-28 17:19:14
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:blk_lookup_devt

Proto:dev_t blk_lookup_devt(const char *name, int partno)

Type:dev_t

Parameter:

TypeParameterName
const char *name
intpartno
1435  devt = MKDEV(0, 0)
1439  class_dev_iter_init( & iter, & block_class, NULL, & disk_type)
1440  When dev = class_dev_iter_next( & iter) cycle
1441  disk = dev_to_disk(dev)
1444  If strcmp(dev_name(dev), name) Then Continue
1453  Break
1455  part = disk_get_part - get partition*@disk: disk to look partition from*@partno: partition number* Look for partition @partno from @disk. If found, increment* reference count and return it.* CONTEXT:* Don't care.* RETURNS:
1456  If part Then
1457  devt = part_devt(part)
1459  Break
1461  disk_put_part(part)
1463  class_dev_iter_exit( & iter)
1464  Return devt
Caller
NameDescribe
name_to_dev_tConvert a name into device number