1 /* $OpenBSD: cmd.h,v 1.13 2014/03/31 22:03:29 krw Exp $ */ 2 3 /* 4 * Copyright (c) 1997 Tobias Weingartner 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 1. Redistributions of source code must retain the above copyright 11 * notice, this list of conditions and the following disclaimer. 12 * 2. Redistributions in binary form must reproduce the above copyright 13 * notice, this list of conditions and the following disclaimer in the 14 * documentation and/or other materials provided with the distribution. 15 * 16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 */ 27 28 #ifndef _CMD_H 29 #define _CMD_H 30 31 #define CMD_EXIT 0x0000 32 #define CMD_SAVE 0x0001 33 #define CMD_CONT 0x0002 34 #define CMD_CLEAN 0x0003 35 #define CMD_DIRTY 0x0004 36 37 struct cmd { 38 char *cmd; 39 int (*fcn)(char *, struct disk *, struct mbr *, struct mbr *, 40 int); 41 char *help; 42 }; 43 extern struct cmd cmd_table[]; 44 45 int Xreinit(char *, struct disk *, struct mbr *, struct mbr *, int); 46 int Xdisk(char *, struct disk *, struct mbr *, struct mbr *, int); 47 int Xmanual(char *, struct disk *, struct mbr *, struct mbr *, int); 48 int Xedit(char *, struct disk *, struct mbr *, struct mbr *, int); 49 int Xsetpid(char *, struct disk *, struct mbr *, struct mbr *, int); 50 int Xselect(char *, struct disk *, struct mbr *, struct mbr *, int); 51 int Xswap(char *, struct disk *, struct mbr *, struct mbr *, int); 52 int Xprint(char *, struct disk *, struct mbr *, struct mbr *, int); 53 int Xwrite(char *, struct disk *, struct mbr *, struct mbr *, int); 54 int Xexit(char *, struct disk *, struct mbr *, struct mbr *, int); 55 int Xquit(char *, struct disk *, struct mbr *, struct mbr *, int); 56 int Xabort(char *, struct disk *, struct mbr *, struct mbr *, int); 57 int Xhelp(char *, struct disk *, struct mbr *, struct mbr *, int); 58 int Xflag(char *, struct disk *, struct mbr *, struct mbr *, int); 59 int Xupdate(char *, struct disk *, struct mbr *, struct mbr *, int); 60 61 #endif /* _CMD_H */ 62