Lines Matching +full:partitions +full:- +full:table +full:- +full:offset
1 // SPDX-License-Identifier: GPL-2.0
3 * fs/partitions/sun.c
7 * Copyright (C) 1991-1998 Linus Torvalds
8 * Re-organised Feb 1998 Russell King
33 __be16 nparts; /* Number of partitions */ in sun_partition()
57 __be16 obs3; /* bhead - Label head offset */ in sun_partition()
58 __be16 obs4; /* ppart - Physical Partition */ in sun_partition()
62 } partitions[8]; in sun_partition() member
73 return -1; in sun_partition()
75 p = label->partitions; in sun_partition()
76 if (be16_to_cpu(label->magic) != SUN_LABEL_MAGIC) { in sun_partition()
78 state->disk->disk_name, be16_to_cpu(label->magic)); */ in sun_partition()
83 ush = ((__be16 *) (label+1)) - 1; in sun_partition()
85 csum ^= *ush--; in sun_partition()
88 state->disk->disk_name); in sun_partition()
93 /* Check to see if we can use the VTOC table */ in sun_partition()
94 use_vtoc = ((be32_to_cpu(label->vtoc.sanity) == SUN_VTOC_SANITY) && in sun_partition()
95 (be32_to_cpu(label->vtoc.version) == 1) && in sun_partition()
96 (be16_to_cpu(label->vtoc.nparts) <= 8)); in sun_partition()
99 nparts = (use_vtoc) ? be16_to_cpu(label->vtoc.nparts) : 8; in sun_partition()
102 * So that old Linux-Sun partitions continue to work, in sun_partition()
105 use_vtoc = use_vtoc || !(label->vtoc.sanity || in sun_partition()
106 label->vtoc.version || label->vtoc.nparts); in sun_partition()
107 spc = be16_to_cpu(label->ntrks) * be16_to_cpu(label->nsect); in sun_partition()
112 st_sector = be32_to_cpu(p->start_cylinder) * spc; in sun_partition()
113 num_sectors = be32_to_cpu(p->num_sectors); in sun_partition()
116 state->parts[slot].flags = 0; in sun_partition()
118 if (be16_to_cpu(label->vtoc.infos[i].id) == LINUX_RAID_PARTITION) in sun_partition()
119 state->parts[slot].flags |= ADDPART_FLAG_RAID; in sun_partition()
120 else if (be16_to_cpu(label->vtoc.infos[i].id) == SUN_WHOLE_DISK) in sun_partition()
121 state->parts[slot].flags |= ADDPART_FLAG_WHOLEDISK; in sun_partition()
126 strlcat(state->pp_buf, "\n", PAGE_SIZE); in sun_partition()