xref: /openbsd-src/sbin/disklabel/extern.h (revision 2b0358df1d88d06ef4139321dd05bd5e05d91eaf)
1 /*	$OpenBSD: extern.h,v 1.11 2009/03/29 05:37:13 deraadt Exp $	*/
2 
3 /*
4  * Copyright (c) 2003 Theo de Raadt <deraadt@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 u_short	dkcksum(struct disklabel *);
20 int	checklabel(struct disklabel *);
21 double	scale(u_int64_t, char, struct disklabel *);
22 void	display(FILE *, struct disklabel *, char **, char, int);
23 void	display_partition(FILE *, struct disklabel *, char **, int, char);
24 
25 struct disklabel *readlabel(int);
26 struct disklabel *makebootarea(char *, struct disklabel *, int);
27 int	editor(struct disklabel *, int, char *, char *, int);
28 
29 int	writelabel(int, char *, struct disklabel *);
30 extern  char bootarea[], *specname;
31 extern  int donothing;
32 extern  int dflag;
33 
34 #ifdef DOSLABEL
35 extern  struct dos_partition *dosdp;    /* DOS partition, if found */
36 #endif
37 #ifdef DPMELABEL
38 extern	int dpme_label;			/* nonzero if DPME table */
39 extern	uint32_t dpme_obsd_start, dpme_obsd_size; /* OpenBSD DPME boundaries */
40 #endif
41