]> git.proxmox.com Git - pve-qemu.git/blob - debian/patches/pve/0026-PVE-Add-dummy-id-command-line-parameter.patch
bump version to 9.0.0-2
[pve-qemu.git] / debian / patches / pve / 0026-PVE-Add-dummy-id-command-line-parameter.patch
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 Date: Thu, 30 Aug 2018 14:52:56 +0200
4 Subject: [PATCH] PVE: Add dummy -id command line parameter
5
6 This used to be part of the qemu-side PVE authentication for
7 VNC. Now this does nothing.
8
9 Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
10 ---
11 qemu-options.hx | 3 +++
12 vl.c | 8 ++++++++
13 2 files changed, 11 insertions(+)
14
15 diff --git a/qemu-options.hx b/qemu-options.hx
16 index 31329e26e2..15df7e4fab 100644
17 --- a/qemu-options.hx
18 +++ b/qemu-options.hx
19 @@ -591,6 +591,9 @@ STEXI
20 @table @option
21 ETEXI
22
23 +DEF("id", HAS_ARG, QEMU_OPTION_id,
24 + "-id n set the VMID", QEMU_ARCH_ALL)
25 +
26 DEF("fda", HAS_ARG, QEMU_OPTION_fda,
27 "-fda/-fdb file use 'file' as floppy disk 0/1 image\n", QEMU_ARCH_ALL)
28 DEF("fdb", HAS_ARG, QEMU_OPTION_fdb, "", QEMU_ARCH_ALL)
29 diff --git a/vl.c b/vl.c
30 index 63107d82a3..e349797245 100644
31 --- a/vl.c
32 +++ b/vl.c
33 @@ -2915,6 +2915,7 @@ static void register_global_properties(MachineState *ms)
34 int main(int argc, char **argv, char **envp)
35 {
36 int i;
37 + long vm_id;
38 int snapshot, linux_boot;
39 const char *initrd_filename;
40 const char *kernel_filename, *kernel_cmdline;
41 @@ -3660,6 +3661,13 @@ int main(int argc, char **argv, char **envp)
42 exit(1);
43 }
44 break;
45 + case QEMU_OPTION_id:
46 + vm_id = strtol(optarg, (char **)&optarg, 10);
47 + if (*optarg != 0 || vm_id < 100 || vm_id > INT_MAX) {
48 + error_report("invalid -id argument %s", optarg);
49 + exit(1);
50 + }
51 + break;
52 case QEMU_OPTION_vnc:
53 vnc_parse(optarg, &error_fatal);
54 break;
55 --
56 2.11.0
57