2 * gpt-part.h - Structure of gpt partition table
4 * Copyright (C) 2013 Dinar Valeev
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 #include <byteorder.h>
23 #define GPT_LINUX_NATIVE \
24 ((gpt_part_type_t){ cpu_to_le32(0x0FC63DAF), cpu_to_le16(0x8483), cpu_to_le16(0x4772),0x8E, 0x79, \
25 {0x3D, 0x69, 0xD8, 0x47, 0x7D, 0xE4}})
26 #define GPT_LINUX_RAID \
27 ((gpt_part_type_t){ cpu_to_le32(0xa19d880f), cpu_to_le16(0x05fc), cpu_to_le16(0x4d3b), 0xa0, 0x06, \
28 { 0x74, 0x3f, 0x0f, 0x84, 0x91, 0x1e }})
29 #define GPT_BASIC_DATA \
30 ((gpt_part_type_t){ cpu_to_le32 (0xebd0a0a2), cpu_to_le16 (0xb9e5), cpu_to_le16 (0x4433), 0x87, 0xc0, \
31 { 0x68, 0xb6, 0xb7, 0x26, 0x99, 0xC7 }})
34 #define GPT_HEADER_SIGNATURE 0x5452415020494645LL
46 struct gpt_partition {
47 gpt_part_type_t type; /* Partition type GUID */
48 u8 guid[16]; /* Unique partition GUID */
49 u64 start; /* First partition LBA */
50 u64 end; /* End LBA */
51 u64 flags; /* Attribute flags */
52 char name[72]; /* Partition name */
53 } __attribute__ ((packed));
70 } __attribute__ ((packed));