Import version 1.8.3
[s390-tools.git] / vmcp / vmcp.h
blob3fd7574a5f7cae942d1d8784225c2fc7a3051bb1
1 /*
2 * vmcp
3 * Author: Christian Borntraeger <cborntra@de.ibm.com>
5 * Copyright IBM Corp. 2005, 2006.
7 * Definitions used by vmcp.
8 */
11 #ifndef __vmcp_h__
12 #define __vmcp_h__
14 #include <getopt.h>
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
26 #define MAXCMDLEN 240
28 #define VMCP_OK 0
29 #define VMCP_CP 1
30 #define VMCP_BUF 2
31 #define VMCP_LIN 3
32 #define VMCP_OPT 4
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'},
39 {NULL, 0, NULL, 0}
42 static const char opt_string[] = "+hvkb:";
44 static const char help_text[] =
45 "Usage:\n"
46 "vmcp [-k] [-b <size>] command\n"
47 "vmcp [-h|-v]\n\n"
48 "Options:\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"
53 " string.\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";
57 #endif