1 /* $OpenBSD: gpt.h,v 1.18 2021/07/21 12:22:54 krw Exp $ */ 2 /* 3 * Copyright (c) 2015 Markus Muller <mmu@grummel.net> 4 * Copyright (c) 2015 Kenneth R Westerback <krw@openbsd.org> 5 * 6 * Permission to use, copy, modify, and distribute this software for any 7 * purpose with or without fee is hereby granted, provided that the above 8 * copyright notice and this permission notice appear in all copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 */ 18 19 int GPT_read(const int); 20 int GPT_get_lba_start(const unsigned int); 21 int GPT_get_lba_end(const unsigned int); 22 23 int GPT_init(const int); 24 int GPT_write(void); 25 void GPT_zap_headers(void); 26 void GPT_print(const char *, const int); 27 void GPT_print_part(const int, const char *, const int); 28 void GPT_print_parthdr(const int); 29 30 extern struct mbr gmbr; 31 extern struct gpt_header gh; 32 extern struct gpt_partition gp[NGPTPARTITIONS]; 33 34 #define ANYGPT 0 35 #define PRIMARYGPT 1 36 #define SECONDARYGPT 2 37 38 #define TERSE 0 39 #define VERBOSE 1 40 41 #define GHANDGP 0 42 #define GPONLY 1 43