Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:disk_name() is used by partition check code and the genhd driver.* It formats the devicename of the indicated disk into* the supplied buffer (of size at least 32), and returns* a pointer to that same buffer (for convenience).

Proto:char *disk_name(struct gendisk *hd, int partno, char *buf)

Type:char

Parameter:

TypeParameterName
struct gendisk *hd
intpartno
char *buf
37  If Not partno Then snprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
39  Else if isdigit( name of major driver [strlen( name of major driver ) - 1]) Then snprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
41  Else snprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
44  Return buf
Caller
NameDescribe
printk_all_partitionsprint a full list of all partitions - intended for places where the root* filesystem can't be mounted and thus to give the victim some idea of what* went wrong
show_partition
diskstats_showaggregate disk stat collector. Uses the same stats that the sysfs* entries do, above, but makes them available through one seq_file.* The output looks suspiciously like /proc/partitions with a bunch of* extra fields.
bdevname
bio_devname
check_partition