Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:This is the main function, called by check.c

Proto:int ibm_partition(struct parsed_partitions *state)

Type:int

Parameter:

TypeParameterName
struct parsed_partitions *state
292  bdev = bdev
297  char type[5] = {0, }
298  char name[7] = {0, }
302  res = 0
303  blocksize = bdev_logical_block_size(bdev)
304  If blocksize <= 0 Then Go to out_exit
306  i_size = NOTE: in a 32bit arch with a preemptable kernel and* an UP compile the i_size_read/write must be atomic* with respect to the local cpu (unlike with preempt disabled),* but they don't need to be atomic with respect to other cpus like in* true SMP (so they
307  If i_size == 0 Then Go to out_exit
309  info = Allocation memory
310  If (info == NULL) Then Go to out_exit
312  geo = Allocation memory
313  If (geo == NULL) Then Go to out_nogeo
315  label = Allocation memory
316  If (label == NULL) Then Go to out_nolab
318  If ioctl_by_bdev(bdev, get device geometry , (unsignedlong)geo) != 0 Then Go to out_freeall
320  If ioctl_by_bdev(bdev, Get information on a dasd device (enhanced) , (unsignedlong)info) != 0 Then
321  kfree(info)
322  info = NULL
325  If find_label(state, info, geo, blocksize, & labelsect, name, type, label) Then
327  If Not strncmp(type, "VOL1", 4) Then
330  Else if Not strncmp(type, "LNX1", 4) Then
334  Else if Not strncmp(type, "CMS1", 4) Then
338  Else if info Then
346  res = 1
349  size = i_size >> 9
354  Else res = 0
357  out_freeall :
358  kfree(label)
359  out_nolab :
360  kfree(geo)
361  out_nogeo :
362  kfree(info)
363  out_exit :
364  Return res