Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:find_label

Proto:static int find_label(struct parsed_partitions *state, dasd_information2_t *info, struct hd_geometry *geo, int blocksize, sector_t *labelsect, char name[], char type[], union label_t *label)

Type:int

Parameter:

TypeParameterName
struct parsed_partitions *state
dasd_information2_t *info
struct hd_geometry *geo
intblocksize
sector_t *labelsect
charname
chartype
union label_t *label
77  found = 0
88  If info Then
89  If m SenseID == 0x6310 && m SenseID == 0x9336 || m SenseID == 0x3880 && m SenseID == 0x3370 Then testsect[0] = where to find the VOLSER
92  Else testsect[0] = where to find the VOLSER * (blocksize >> 9)
94  testcount = 1
95  Else
96  testsect[0] = 1
97  testsect[1] = blocksize >> 9
98  testsect[2] = 2 * (blocksize >> 9)
99  testcount = 3
101  When i < testcount cycle
102  data = read_part_sector(state, testsect[i], & sect)
103  If (data == NULL) Then Continue
105  memcpy(label, data, size of label )
106  memcpy(temp, data, 4)
107  temp[4] = 0
108  EBCASC(temp, 4)
109  put_dev_sector(sect)
110  If Not strcmp(temp, "VOL1") || Not strcmp(temp, "LNX1") || Not strcmp(temp, "CMS1") Then
113  If Not strcmp(temp, "VOL1") Then
116  Else
120  EBCASC(type, 4)
121  EBCASC(name, 6)
122  labelsect = testsect[i]
123  found = 1
124  Break
127  If Not found Then memset(label, 0, size of label )
130  Return found
Caller
NameDescribe
ibm_partitionThis is the main function, called by check.c