]> git.proxmox.com Git - pve-qemu.git/blob - debian/patches/pve/0020-PVE-Add-dummy-id-command-line-parameter.patch
Update to QEMU 5.2
[pve-qemu.git] / debian / patches / pve / 0020-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: Mon, 6 Apr 2020 12:16:48 +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 Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 ---
12 qemu-options.hx | 3 +++
13 softmmu/vl.c | 8 ++++++++
14 2 files changed, 11 insertions(+)
15
16 diff --git a/qemu-options.hx b/qemu-options.hx
17 index c1352312c2..9a0cb6780e 100644
18 --- a/qemu-options.hx
19 +++ b/qemu-options.hx
20 @@ -906,6 +906,9 @@ DEFHEADING()
21
22 DEFHEADING(Block device options:)
23
24 +DEF("id", HAS_ARG, QEMU_OPTION_id,
25 + "-id n set the VMID", QEMU_ARCH_ALL)
26 +
27 DEF("fda", HAS_ARG, QEMU_OPTION_fda,
28 "-fda/-fdb file use 'file' as floppy disk 0/1 image\n", QEMU_ARCH_ALL)
29 DEF("fdb", HAS_ARG, QEMU_OPTION_fdb, "", QEMU_ARCH_ALL)
30 diff --git a/softmmu/vl.c b/softmmu/vl.c
31 index 03152c816c..da204d24f0 100644
32 --- a/softmmu/vl.c
33 +++ b/softmmu/vl.c
34 @@ -2866,6 +2866,7 @@ static char *find_datadir(void)
35 void qemu_init(int argc, char **argv, char **envp)
36 {
37 int i;
38 + long vm_id;
39 int snapshot, linux_boot;
40 const char *initrd_filename;
41 const char *kernel_filename, *kernel_cmdline;
42 @@ -3557,6 +3558,13 @@ void qemu_init(int argc, char **argv, char **envp)
43 exit(1);
44 }
45 break;
46 + case QEMU_OPTION_id:
47 + vm_id = strtol(optarg, (char **)&optarg, 10);
48 + if (*optarg != 0 || vm_id < 100 || vm_id > INT_MAX) {
49 + error_report("invalid -id argument %s", optarg);
50 + exit(1);
51 + }
52 + break;
53 case QEMU_OPTION_vnc:
54 vnc_parse(optarg, &error_fatal);
55 break;