1 /* $OpenBSD: extern.h,v 1.34 2022/02/18 17:45:43 krw 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 22 u_short dkcksum(struct disklabel *); 23 char canonical_unit(struct disklabel *, char); 24 double scale(u_int64_t, char, struct disklabel *); 25 void display(FILE *, struct disklabel *, char, int); 26 void display_partition(FILE *, struct disklabel *, int, char); 27 int duid_parse(struct disklabel *, char *); 28 29 int editor(int); 30 int editor_allocspace(struct disklabel *); 31 void mpsave(struct disklabel *); 32 void mpcopy(char **, char **); 33 void mpfree(char **); 34 void parse_autotable(char *); 35 36 int writelabel(int, struct disklabel *); 37 extern char *dkname, *specname, *fstabfile; 38 extern char *mountpoints[MAXPARTITIONS]; 39 extern int aflag, dflag, uidflag; 40 extern int donothing; 41 extern int verbose; 42 extern int quiet; 43 extern struct disklabel lab; 44