extern.h revision 1.28
1/* $OpenBSD: extern.h,v 1.28 2016/06/19 13:42:56 tb 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#define MEG(x) ((x) * 1024LL * (1024 / DEV_BSIZE)) 20#define GIG(x) (MEG(x) * 1024LL) 21 22u_short dkcksum(struct disklabel *); 23int checklabel(struct disklabel *); 24char canonical_unit(struct disklabel *, char); 25double scale(u_int64_t, char, struct disklabel *); 26void display(FILE *, struct disklabel *, char, int); 27void display_partition(FILE *, struct disklabel *, int, char); 28int duid_parse(struct disklabel *, char *); 29 30void readlabel(int); 31void parselabel(void); 32struct disklabel *makebootarea(char *, struct disklabel *); 33int editor(int); 34void editor_allocspace(struct disklabel *); 35void mpsave(struct disklabel *); 36void mpcopy(char **, char **); 37void mpfree(char **); 38void parse_autotable(char *); 39 40int writelabel(int, struct disklabel *); 41extern char *specname, *fstabfile; 42extern char *mountpoints[MAXPARTITIONS]; 43extern int aflag, dflag, uidflag; 44extern int donothing; 45extern int verbose; 46extern char print_unit; 47extern struct disklabel lab; 48