lihuanshuai
11/27/2016 - 3:32 AM

usage example from https://github.com/docker/hyperkit/blob/master/src/hyperkit.c

__attribute__ ((noreturn)) static void
usage(int code)
{

        fprintf(stderr,
                "Usage: %s [-behuwxMACHPWY] [-c vcpus] [-F <pidfile>] [-g <gdb port>] [-l <lpc>]\n"
		"       %*s [-m mem] [-p vcpu:hostcpu] [-s <pci>] [-U uuid] -f <fw>\n"
		"       -A: create ACPI tables\n"
		"       -c: # cpus (default 1)\n"
		"       -C: include guest memory in core file\n"
		"       -e: exit on unhandled I/O access\n"
		"       -f: firmware\n"
		"       -F: pidfile\n"
		"       -g: gdb port\n"
		"       -h: help\n"
		"       -H: vmexit from the guest on hlt\n"
		"       -l: LPC device configuration. Ex: -l com1,stdio -l com2,autopty -l com2,/dev/myownpty\n"
		"       -m: memory size in MB, may be suffixed with one of K, M, G or T\n"
		"       -M: print MAC address and exit if using vmnet\n"
		"       -P: vmexit from the guest on pause\n"
		"       -s: <slot,driver,configinfo> PCI slot config\n"
		"       -u: RTC keeps UTC time\n"
		"       -U: uuid\n"
		"       -v: show build version\n"
		"       -w: ignore unimplemented MSRs\n"
		"       -W: force virtio to use single-vector MSI\n"
		"       -x: local apic is in x2APIC mode\n"
		"       -Y: disable MPtable generation\n",
		progname, (int)strlen(progname), "");

	exit(code);
}