Lines Matching +full:partition +full:-
4 * Copyright (C) 1996-1997 Paul H. Hargrove
8 * Original code to handle the new style Mac partition table based on
12 * a structure means that the pointer is non-NULL and the structure it
22 #define HFS_PMAP_BLK 1 /* First block of partition map */
23 #define HFS_MDB_BLK 2 /* Block (w/i partition) of MDB */
27 #define HFS_OLD_PMAP_MAGIC 0x5453 /* "TS": old-type partition map */
28 #define HFS_NEW_PMAP_MAGIC 0x504D /* "PM": new-type partition map */
33 * The new style Mac partition map
35 * For each partition on the media there is a physical block (512-byte
42 __be32 pmMapBlkCnt; /* partition blocks count */
43 __be32 pmPyPartStart; /* physical block start of partition */
44 __be32 pmPartBlkCnt; /* physical block count of partition */
47 partition */
50 partition */
55 * The old style Mac partition map
57 * The partition map consists for a 2-byte signature followed by an
58 * array of these structures. The map is terminated with an all-zero
77 struct old_pmap_entry *p = &pm->pdEntry[i]; in hfs_parse_old_pmap()
79 if (p->pdStart && p->pdSize && in hfs_parse_old_pmap()
80 p->pdFSID == cpu_to_be32(0x54465331)/*"TFS1"*/ && in hfs_parse_old_pmap()
81 (sbi->part < 0 || sbi->part == i)) { in hfs_parse_old_pmap()
82 *part_start += be32_to_cpu(p->pdStart); in hfs_parse_old_pmap()
83 *part_size = be32_to_cpu(p->pdSize); in hfs_parse_old_pmap()
88 return -ENOENT; in hfs_parse_old_pmap()
95 int size = be32_to_cpu(pm->pmMapBlkCnt); in hfs_parse_new_pmap()
101 if (!memcmp(pm->pmPartType, "Apple_HFS", 9) && in hfs_parse_new_pmap()
102 (sbi->part < 0 || sbi->part == i)) { in hfs_parse_new_pmap()
103 *part_start += be32_to_cpu(pm->pmPyPartStart); in hfs_parse_new_pmap()
104 *part_size = be32_to_cpu(pm->pmPartBlkCnt); in hfs_parse_new_pmap()
109 return -ENOENT; in hfs_parse_new_pmap()
112 if ((u8 *)pm - (u8 *)buf >= buf_size) { in hfs_parse_new_pmap()
119 } while (pm->pmSig == cpu_to_be16(HFS_NEW_PMAP_MAGIC)); in hfs_parse_new_pmap()
121 return -ENOENT; in hfs_parse_new_pmap()
125 * Parse the partition map looking for the start and length of a
126 * HFS/HFS+ partition.
136 return -ENOMEM; in hfs_part_find()
151 res = -ENOENT; in hfs_part_find()