Function report |
Source Code:block\partitions\msdos.c |
Create Date:2022-07-28 17:29:32 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:msdos_partition
Proto:int msdos_partition(struct parsed_partitions *state)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct parsed_partitions * | state |
454 | sector_size = bdev_logical_block_size(bdev) / 512 |
462 | data = read_part_sector(state, 0, & sect) |
463 | If Not data Then Return -1 |
470 | If aix_magic_present(state, data) Then |
471 | put_dev_sector(sect) |
473 | Return aix_partition(state) |
480 | If Not msdos_magic_present(data + 510) Then |
481 | put_dev_sector(sect) |
482 | Return 0 |
493 | If 0x80 - active != 0 && 0x80 - active != 0x80 Then |
500 | If slot == 1 && reserved sectors && number of FATs && media of boot sector Then |
503 | put_dev_sector(sect) |
504 | Return 1 |
505 | Else |
506 | put_dev_sector(sect) |
507 | Return 0 |
516 | If SYS_IND(p) == EFI_PMBR_OSTYPE_EFI_GPT Then |
517 | put_dev_sector(sect) |
518 | Return 0 |
524 | disksig = le32_to_cpup((__le32 * )(data + 0x1b8)) |
532 | next = 5 |
534 | start = start_sect(p) * sector_size |
535 | size = nr_sects(p) * sector_size |
537 | If Not size Then Continue |
539 | If is_extended_partition(p) Then |
546 | n = 2 |
549 | put_partition(state, slot, start, n) |
554 | Continue |
556 | put_partition(state, slot, start, size) |
558 | If SYS_IND(p) == LINUX_RAID_PARTITION Then flags = ADDPART_FLAG_RAID |
581 | Continue |
582 | parse(state, start_sect(p) * sector_size, nr_sects(p) * sector_size, slot) |
585 | put_dev_sector(sect) |
586 | Return 1 |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |