xref: /openbsd-src/sbin/fdisk/cmd.h (revision 46035553bfdd96e63c94e32da0210227ec2e3cf1)
1 /*	$OpenBSD: cmd.h,v 1.19 2015/12/01 06:25:43 krw Exp $	*/
2 
3 /*
4  * Copyright (c) 1997 Tobias Weingartner
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 #ifndef _CMD_H
20 #define _CMD_H
21 
22 #define CMD_EXIT	0x0000
23 #define CMD_SAVE	0x0001
24 #define CMD_CONT	0x0002
25 #define CMD_CLEAN	0x0003
26 #define CMD_DIRTY	0x0004
27 
28 struct cmd {
29 	char *cmd;
30 	int  gpt;
31 	int (*fcn)(char *, struct mbr *);
32 	char *help;
33 };
34 extern struct cmd cmd_table[];
35 
36 extern int reinited;
37 
38 int Xreinit(char *, struct mbr *);
39 int Xdisk(char *, struct mbr *);
40 int Xmanual(char *, struct mbr *);
41 int Xedit(char *, struct mbr *);
42 int Xsetpid(char *, struct mbr *);
43 int Xselect(char *, struct mbr *);
44 int Xswap(char *, struct mbr *);
45 int Xprint(char *, struct mbr *);
46 int Xwrite(char *, struct mbr *);
47 int Xexit(char *, struct mbr *);
48 int Xquit(char *, struct mbr *);
49 int Xabort(char *, struct mbr *);
50 int Xhelp(char *, struct mbr *);
51 int Xflag(char *, struct mbr *);
52 int Xupdate(char *, struct mbr *);
53 
54 #endif /* _CMD_H */
55