Lines Matching refs:p
41 static inline sector_t nr_sects(struct msdos_partition *p) in nr_sects() argument
43 return (sector_t)get_unaligned_le32(&p->nr_sects); in nr_sects()
46 static inline sector_t start_sect(struct msdos_partition *p) in start_sect() argument
48 return (sector_t)get_unaligned_le32(&p->start_sect); in start_sect()
51 static inline int is_extended_partition(struct msdos_partition *p) in is_extended_partition() argument
53 return (p->sys_ind == DOS_EXTENDED_PARTITION || in is_extended_partition()
54 p->sys_ind == WIN98_EXTENDED_PARTITION || in is_extended_partition()
55 p->sys_ind == LINUX_EXTENDED_PARTITION); in is_extended_partition()
62 msdos_magic_present(unsigned char *p) in msdos_magic_present() argument
64 return (p[0] == MSDOS_LABEL_MAGIC1 && p[1] == MSDOS_LABEL_MAGIC2); in msdos_magic_present()
72 static int aix_magic_present(struct parsed_partitions *state, unsigned char *p) in aix_magic_present() argument
74 struct msdos_partition *pt = (struct msdos_partition *) (p + 0x1be); in aix_magic_present()
79 if (!(p[0] == AIX_LABEL_MAGIC1 && in aix_magic_present()
80 p[1] == AIX_LABEL_MAGIC2 && in aix_magic_present()
81 p[2] == AIX_LABEL_MAGIC3 && in aix_magic_present()
82 p[3] == AIX_LABEL_MAGIC4)) in aix_magic_present()
134 struct msdos_partition *p; in parse_extended() local
159 p = (struct msdos_partition *) (data + 0x1be); in parse_extended()
173 for (i = 0; i < 4; i++, p++) { in parse_extended()
176 if (!nr_sects(p) || is_extended_partition(p)) in parse_extended()
181 offs = start_sect(p)*sector_size; in parse_extended()
182 size = nr_sects(p)*sector_size; in parse_extended()
195 if (p->sys_ind == LINUX_RAID_PARTITION) in parse_extended()
208 p -= 4; in parse_extended()
209 for (i = 0; i < 4; i++, p++) in parse_extended()
210 if (nr_sects(p) && is_extended_partition(p)) in parse_extended()
215 this_sector = first_sector + start_sect(p) * sector_size; in parse_extended()
216 this_size = nr_sects(p) * sector_size; in parse_extended()
361 struct bsd_partition *p; in parse_bsd() local
377 for (p = l->d_partitions; p - l->d_partitions < max_partitions; p++) { in parse_bsd()
382 if (p->p_fstype == BSD_FS_UNUSED) in parse_bsd()
384 bsd_start = le32_to_cpu(p->p_offset); in parse_bsd()
385 bsd_size = le32_to_cpu(p->p_size); in parse_bsd()
489 struct unixware_slice *p; in parse_unixware() local
505 p = &l->vtoc.v_slice[1]; in parse_unixware()
507 while (p - &l->vtoc.v_slice[0] < UNIXWARE_NUMSLICE) { in parse_unixware()
511 if (p->s_label != UNIXWARE_FS_UNUSED) in parse_unixware()
513 le32_to_cpu(p->start_sect), in parse_unixware()
514 le32_to_cpu(p->nr_sects)); in parse_unixware()
515 p++; in parse_unixware()
535 struct msdos_partition *p; in parse_minix() local
542 p = (struct msdos_partition *)(data + 0x1be); in parse_minix()
548 p->sys_ind == MINIX_PARTITION) { /* subpartition table present */ in parse_minix()
553 for (i = 0; i < MINIX_NR_SUBPARTITIONS; i++, p++) { in parse_minix()
557 if (p->sys_ind == MINIX_PARTITION) in parse_minix()
559 start_sect(p), nr_sects(p)); in parse_minix()
586 struct msdos_partition *p; in msdos_partition() local
621 p = (struct msdos_partition *) (data + 0x1be); in msdos_partition()
622 for (slot = 1; slot <= 4; slot++, p++) { in msdos_partition()
623 if (p->boot_ind != 0 && p->boot_ind != 0x80) { in msdos_partition()
643 p = (struct msdos_partition *) (data + 0x1be); in msdos_partition()
644 for (slot = 1 ; slot <= 4 ; slot++, p++) { in msdos_partition()
646 if (p->sys_ind == EFI_PMBR_OSTYPE_EFI_GPT) { in msdos_partition()
652 p = (struct msdos_partition *) (data + 0x1be); in msdos_partition()
663 for (slot = 1 ; slot <= 4 ; slot++, p++) { in msdos_partition()
664 sector_t start = start_sect(p)*sector_size; in msdos_partition()
665 sector_t size = nr_sects(p)*sector_size; in msdos_partition()
669 if (is_extended_partition(p)) { in msdos_partition()
688 if (p->sys_ind == LINUX_RAID_PARTITION) in msdos_partition()
690 if (p->sys_ind == DM6_PARTITION) in msdos_partition()
692 if (p->sys_ind == EZD_PARTITION) in msdos_partition()
699 p = (struct msdos_partition *) (0x1be + data); in msdos_partition()
700 for (slot = 1 ; slot <= 4 ; slot++, p++) { in msdos_partition()
701 unsigned char id = p->sys_ind; in msdos_partition()
704 if (!nr_sects(p)) in msdos_partition()
712 subtypes[n].parse(state, start_sect(p) * sector_size, in msdos_partition()
713 nr_sects(p) * sector_size, slot); in msdos_partition()