3 * Author: Christian Borntraeger <cborntra@de.ibm.com>
5 * Copyright IBM Corp. 2005, 2006.
7 * Definitions used by vmcp.
15 #include <sys/ioctl.h>
16 #include "../include/zt_common.h"
18 #define DEVICE_NODE "/dev/vmcp"
20 #define VMCP_GETCODE _IOR(0x10, 1, int)
21 #define VMCP_SETBUF _IOW(0x10, 2, int)
22 #define VMCP_GETSIZE _IOR(0x10, 3, int)
24 #define MAXBUFFER 1048576
25 #define MINBUFFER 4096
34 static struct option options
[] = {
35 {"help", no_argument
, NULL
, 'h'},
36 {"version", no_argument
, NULL
, 'v'},
37 {"keepcase", no_argument
, NULL
, 'k'},
38 {"buffer", required_argument
, NULL
, 'b'},
42 static const char opt_string
[] = "+hvkb:";
44 static const char help_text
[] =
46 "vmcp [-k] [-b <size>] command\n"
49 "-h or --help :Print usage information, then exit\n"
50 "-v or --version :Print version information, then exit\n"
51 "-k or --keepcase :Using this option, vmcp does not convert the command\n"
52 " to uppercase. The default is to translate the command\n"
54 "-b <size> or :defines the buffer size for the response\n"
55 "--buffer=<size> valid values are from 4096 to 1048576 bytes\n"
56 " the k and M suffixes are also supported\n";