Statistics
| Branch: | Revision:

root / include / qemu-io.h @ 34b5d2c6

History | View | Annotate | Download (1.3 kB)

1 e3aff4f6 aliguori
/*
2 e3aff4f6 aliguori
 * Copyright (c) 2000-2005 Silicon Graphics, Inc.
3 e3aff4f6 aliguori
 * All Rights Reserved.
4 e3aff4f6 aliguori
 *
5 e3aff4f6 aliguori
 * This program is free software; you can redistribute it and/or
6 e3aff4f6 aliguori
 * modify it under the terms of the GNU General Public License as
7 e3aff4f6 aliguori
 * published by the Free Software Foundation.
8 e3aff4f6 aliguori
 *
9 e3aff4f6 aliguori
 * This program is distributed in the hope that it would be useful,
10 e3aff4f6 aliguori
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 e3aff4f6 aliguori
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 e3aff4f6 aliguori
 * GNU General Public License for more details.
13 e3aff4f6 aliguori
 *
14 e3aff4f6 aliguori
 * You should have received a copy of the GNU General Public License
15 8167ee88 Blue Swirl
 * along with this program; if not, see <http://www.gnu.org/licenses/>.
16 e3aff4f6 aliguori
 */
17 e3aff4f6 aliguori
18 3d21994f Kevin Wolf
#ifndef QEMU_IO_H
19 3d21994f Kevin Wolf
#define QEMU_IO_H
20 734c3b85 Kevin Wolf
21 3d21994f Kevin Wolf
#include "qemu-common.h"
22 e3aff4f6 aliguori
23 3d21994f Kevin Wolf
#define CMD_FLAG_GLOBAL ((int)0x80000000) /* don't iterate "args" */
24 734c3b85 Kevin Wolf
25 734c3b85 Kevin Wolf
typedef int (*cfunc_t)(BlockDriverState *bs, int argc, char **argv);
26 e3aff4f6 aliguori
typedef void (*helpfunc_t)(void);
27 e3aff4f6 aliguori
28 e3aff4f6 aliguori
typedef struct cmdinfo {
29 3d21994f Kevin Wolf
    const char* name;
30 3d21994f Kevin Wolf
    const char* altname;
31 3d21994f Kevin Wolf
    cfunc_t     cfunc;
32 3d21994f Kevin Wolf
    int         argmin;
33 3d21994f Kevin Wolf
    int         argmax;
34 3d21994f Kevin Wolf
    int         canpush;
35 3d21994f Kevin Wolf
    int         flags;
36 3d21994f Kevin Wolf
    const char  *args;
37 3d21994f Kevin Wolf
    const char  *oneline;
38 3d21994f Kevin Wolf
    helpfunc_t  help;
39 e3aff4f6 aliguori
} cmdinfo_t;
40 e3aff4f6 aliguori
41 3d21994f Kevin Wolf
bool qemuio_command(BlockDriverState *bs, const char *cmd);
42 e3aff4f6 aliguori
43 3d21994f Kevin Wolf
void qemuio_add_command(const cmdinfo_t *ci);
44 c2cdf5c5 Kevin Wolf
int qemuio_command_usage(const cmdinfo_t *ci);
45 e3aff4f6 aliguori
46 3d21994f Kevin Wolf
#endif /* QEMU_IO_H */