diff options
author | reyk <reyk@openbsd.org> | 2018-10-01 09:31:15 +0000 |
---|---|---|
committer | reyk <reyk@openbsd.org> | 2018-10-01 09:31:15 +0000 |
commit | e2ceadc1b70491be24b7592802db75c3c9f29ed8 (patch) | |
tree | 5fb8783787fede8446fce99a9c3fc52fe6f9756b /usr.sbin/vmd/vmd.h | |
parent | Add missing URI encoding when writing HTTP redirects, (diff) | |
download | wireguard-openbsd-e2ceadc1b70491be24b7592802db75c3c9f29ed8.tar.xz wireguard-openbsd-e2ceadc1b70491be24b7592802db75c3c9f29ed8.zip |
Try to derive the qcow2 file format from an image file automatically.
This makes the "-d qcow2:" and "format qcow" arguments optional as vmctl
and vmd will read the magic bytes at the beginning of a file to guess if
it is a raw or a qcow image file.
The "vmctl create" command has been changed by removing the -f qcow2 option
and replacing it with the same syntax as -d: "vmctl create qcow2:foo.img".
In a slightly ununixy but intended way, the create command now also
considers the file extension for the format as "vmctl create foo.qcow2"
creates a qcow2 disk and not a raw image file.
Ok mlarkin@ (and ccardenas@ on an earlier version of the diff)
Diffstat (limited to 'usr.sbin/vmd/vmd.h')
-rw-r--r-- | usr.sbin/vmd/vmd.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/vmd/vmd.h b/usr.sbin/vmd/vmd.h index 4cf0295d946..b348d12c757 100644 --- a/usr.sbin/vmd/vmd.h +++ b/usr.sbin/vmd/vmd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vmd.h,v 1.80 2018/09/28 12:35:32 reyk Exp $ */ +/* $OpenBSD: vmd.h,v 1.81 2018/10/01 09:31:15 reyk Exp $ */ /* * Copyright (c) 2015 Mike Larkin <mlarkin@openbsd.org> @@ -67,6 +67,9 @@ #define VMD_CDROM_MISSING 1005 #define VMD_CDROM_INVALID 1006 +/* Image file signatures */ +#define VM_MAGIC_QCOW "QFI\xfb" + /* 100.64.0.0/10 from rfc6598 (IPv4 Prefix for Shared Address Space) */ #define VMD_DHCP_PREFIX "100.64.0.0/10" |