From nobody Mon May 6 14:27:24 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 15353816723431017.2226746472663; Mon, 27 Aug 2018 07:54:32 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7C7443082144; Mon, 27 Aug 2018 14:54:30 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3C71E308BDA6; Mon, 27 Aug 2018 14:54:30 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id D96434A46C; Mon, 27 Aug 2018 14:54:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w7REsMZo022122 for ; Mon, 27 Aug 2018 10:54:22 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0917C2027EA2; Mon, 27 Aug 2018 14:54:22 +0000 (UTC) Received: from thuth.com (ovpn-117-11.ams2.redhat.com [10.36.117.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2AD112026D6B; Mon, 27 Aug 2018 14:54:19 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Date: Mon, 27 Aug 2018 16:54:09 +0200 Message-Id: <1535381652-19870-2-git-send-email-thuth@redhat.com> In-Reply-To: <1535381652-19870-1-git-send-email-thuth@redhat.com> References: <1535381652-19870-1-git-send-email-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Cc: libvir-list@redhat.com, Jason Wang , Samuel Thibault , Paolo Bonzini Subject: [libvirt] [PATCH 1/4] Remove the deprecated -balloon option X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Mon, 27 Aug 2018 14:54:31 +0000 (UTC) X-ZohoMail: RDMRC_0 RSF_0 Z_629925259 SPT_0 The "-balloon" option has been replaced by "-device virtio-balloon". It's been marked as deprecated since two releases, and nobody complained, so let's remove it now. Acked-by: Paolo Bonzini Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Cornelia Huck Reviewed-by: Michael S. Tsirkin Reviewed-by: David Hildenbrand Signed-off-by: Thomas Huth --- docs/virtio-balloon-stats.txt | 6 +++--- qemu-deprecated.texi | 5 ----- qemu-options.hx | 10 ---------- vl.c | 36 ------------------------------------ 4 files changed, 3 insertions(+), 54 deletions(-) diff --git a/docs/virtio-balloon-stats.txt b/docs/virtio-balloon-stats.txt index 9985e1d..1732cc8 100644 --- a/docs/virtio-balloon-stats.txt +++ b/docs/virtio-balloon-stats.txt @@ -61,9 +61,9 @@ It's also important to note the following: respond to the request the timer will never be re-armed, which has the same effect as disabling polling =20 -Here are a few examples. QEMU is started with '-balloon virtio', which -generates '/machine/peripheral-anon/device[1]' as the QOM path for the -balloon device. +Here are a few examples. QEMU is started with '-device virtio-balloon', +which generates '/machine/peripheral-anon/device[1]' as the QOM path for +the balloon device. =20 Enable polling with 2 seconds interval: =20 diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi index 1b9c007..98f5062 100644 --- a/qemu-deprecated.texi +++ b/qemu-deprecated.texi @@ -86,11 +86,6 @@ enabled via the ``-machine usb=3Don'' argument. =20 The ``-nodefconfig`` argument is a synonym for ``-no-user-config``. =20 -@subsection -balloon (since 2.12.0) - -The @option{--balloon virtio} argument has been superseded by -@option{--device virtio-balloon}. - @subsection -fsdev handle (since 2.12.0) =20 The ``handle'' fsdev backend does not support symlinks and causes the 9p diff --git a/qemu-options.hx b/qemu-options.hx index 654ef48..ccf7155 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -454,16 +454,6 @@ modprobe i810_audio clocking=3D48000 @end example ETEXI =20 -DEF("balloon", HAS_ARG, QEMU_OPTION_balloon, - "-balloon virtio[,addr=3Dstr]\n" - " enable virtio balloon device (deprecated)\n", QEMU_AR= CH_ALL) -STEXI -@item -balloon virtio[,addr=3D@var{addr}] -@findex -balloon -Enable virtio balloon device, optionally with PCI address @var{addr}. This -option is deprecated, use @option{-device virtio-balloon} instead. -ETEXI - DEF("device", HAS_ARG, QEMU_OPTION_device, "-device driver[,prop[=3Dvalue][,...]]\n" " add device (based on driver)\n" diff --git a/vl.c b/vl.c index 5ba06ad..674c42f 100644 --- a/vl.c +++ b/vl.c @@ -2127,36 +2127,6 @@ static void parse_display(const char *p) } } =20 -static int balloon_parse(const char *arg) -{ - QemuOpts *opts; - - warn_report("This option is deprecated. " - "Use '--device virtio-balloon' to enable the balloon devic= e."); - - if (strcmp(arg, "none") =3D=3D 0) { - return 0; - } - - if (!strncmp(arg, "virtio", 6)) { - if (arg[6] =3D=3D ',') { - /* have params -> parse them */ - opts =3D qemu_opts_parse_noisily(qemu_find_opts("device"), arg= + 7, - false); - if (!opts) - return -1; - } else { - /* create empty opts */ - opts =3D qemu_opts_create(qemu_find_opts("device"), NULL, 0, - &error_abort); - } - qemu_opt_set(opts, "driver", "virtio-balloon", &error_abort); - return 0; - } - - return -1; -} - char *qemu_find_file(int type, const char *name) { int i; @@ -3660,12 +3630,6 @@ int main(int argc, char **argv, char **envp) case QEMU_OPTION_no_hpet: no_hpet =3D 1; break; - case QEMU_OPTION_balloon: - if (balloon_parse(optarg) < 0) { - error_report("unknown -balloon argument %s", optarg); - exit(1); - } - break; case QEMU_OPTION_no_reboot: no_reboot =3D 1; break; --=20 1.8.3.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Mon May 6 14:27:24 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 153538177983857.668441071333746; Mon, 27 Aug 2018 07:56:19 -0700 (PDT) Received: from localhost ([::1]:53645 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fuIwE-0002Jo-NS for importer@patchew.org; Mon, 27 Aug 2018 10:56:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51949) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fuIuP-000811-O8 for qemu-devel@nongnu.org; Mon, 27 Aug 2018 10:54:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fuIuO-0001q6-Mw for qemu-devel@nongnu.org; Mon, 27 Aug 2018 10:54:25 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:36870 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fuIuO-0001pw-GJ for qemu-devel@nongnu.org; Mon, 27 Aug 2018 10:54:24 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2BCB87DAC9; Mon, 27 Aug 2018 14:54:24 +0000 (UTC) Received: from thuth.com (ovpn-117-11.ams2.redhat.com [10.36.117.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id 68AD92026D6B; Mon, 27 Aug 2018 14:54:22 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Date: Mon, 27 Aug 2018 16:54:10 +0200 Message-Id: <1535381652-19870-3-git-send-email-thuth@redhat.com> In-Reply-To: <1535381652-19870-1-git-send-email-thuth@redhat.com> References: <1535381652-19870-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Mon, 27 Aug 2018 14:54:24 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Mon, 27 Aug 2018 14:54:24 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'thuth@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH 2/4] Remove the deprecated -nodefconfig option X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: libvir-list@redhat.com, Jason Wang , Markus Armbruster , Samuel Thibault , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RDMRC_1 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" It's the same as -no-user-config and marked as deprecated since three releases already. Time to remove it now. Signed-off-by: Thomas Huth --- docs/interop/live-block-operations.rst | 4 ++-- qemu-deprecated.texi | 4 ---- qemu-options.hx | 4 ++-- vl.c | 2 -- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/docs/interop/live-block-operations.rst b/docs/interop/live-blo= ck-operations.rst index 734252b..48afdc7 100644 --- a/docs/interop/live-block-operations.rst +++ b/docs/interop/live-block-operations.rst @@ -129,7 +129,7 @@ To show some example invocations of command-line, we wi= ll use the following invocation of QEMU, with a QMP server running over UNIX socket:: =20 - $ ./x86_64-softmmu/qemu-system-x86_64 -display none -nodefconfig \ + $ ./x86_64-softmmu/qemu-system-x86_64 -display none -no-user-config \ -M q35 -nodefaults -m 512 \ -blockdev node-name=3Dnode-A,driver=3Dqcow2,file.driver=3Dfile,fil= e.node-name=3Dfile,file.filename=3D./a.qcow2 \ -device virtio-blk,drive=3Dnode-A,id=3Dvirtio0 \ @@ -694,7 +694,7 @@ instance, with the following invocation. (As noted ear= lier, for simplicity's sake, the destination QEMU is started on the same host, but it could be located elsewhere):: =20 - $ ./x86_64-softmmu/qemu-system-x86_64 -display none -nodefconfig \ + $ ./x86_64-softmmu/qemu-system-x86_64 -display none -no-user-config \ -M q35 -nodefaults -m 512 \ -blockdev node-name=3Dnode-TargetDisk,driver=3Dqcow2,file.driver= =3Dfile,file.node-name=3Dfile,file.filename=3D./target-disk.qcow2 \ -device virtio-blk,drive=3Dnode-TargetDisk,id=3Dvirtio0 \ diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi index 98f5062..19c8ae2 100644 --- a/qemu-deprecated.texi +++ b/qemu-deprecated.texi @@ -82,10 +82,6 @@ would automatically enable USB support on the machine ty= pe. If using the new syntax, USB support must be explicitly enabled via the ``-machine usb=3Don'' argument. =20 -@subsection -nodefconfig (since 2.11.0) - -The ``-nodefconfig`` argument is a synonym for ``-no-user-config``. - @subsection -fsdev handle (since 2.12.0) =20 The ``handle'' fsdev backend does not support symlinks and causes the 9p diff --git a/qemu-options.hx b/qemu-options.hx index ccf7155..d9be20b 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -3833,8 +3833,7 @@ Write device configuration to @var{file}. The @var{fi= le} can be either filename command line and device configuration into file or dash @code{-}) characte= r to print the output to stdout. This can be later used as input file for @code{-readconf= ig} option. ETEXI -HXCOMM Deprecated, same as -no-user-config -DEF("nodefconfig", 0, QEMU_OPTION_nodefconfig, "", QEMU_ARCH_ALL) + DEF("no-user-config", 0, QEMU_OPTION_nouserconfig, "-no-user-config\n" " do not load default user-provided config files at sta= rtup\n", @@ -3845,6 +3844,7 @@ STEXI The @code{-no-user-config} option makes QEMU not load any of the user-prov= ided config files on @var{sysconfdir}. ETEXI + DEF("trace", HAS_ARG, QEMU_OPTION_trace, "-trace [[enable=3D]][,events=3D][,file=3D]\n" " specify tracing options\n", diff --git a/vl.c b/vl.c index 674c42f..386c71d 100644 --- a/vl.c +++ b/vl.c @@ -2999,7 +2999,6 @@ int main(int argc, char **argv, char **envp) =20 popt =3D lookup_opt(argc, argv, &optarg, &optind); switch (popt->index) { - case QEMU_OPTION_nodefconfig: case QEMU_OPTION_nouserconfig: userconfig =3D false; break; @@ -3927,7 +3926,6 @@ int main(int argc, char **argv, char **envp) case QEMU_OPTION_enable_sync_profile: qsp_enable(); break; - case QEMU_OPTION_nodefconfig: case QEMU_OPTION_nouserconfig: /* Nothing to be parsed here. Especially, do not error out= below. */ break; --=20 1.8.3.1 From nobody Mon May 6 14:27:24 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1535381671078467.17891923674085; Mon, 27 Aug 2018 07:54:31 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id ADF557F6A0; Mon, 27 Aug 2018 14:54:28 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 77DC02010CF1; Mon, 27 Aug 2018 14:54:28 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 2B6FC4A465; Mon, 27 Aug 2018 14:54:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w7REsQIG022167 for ; Mon, 27 Aug 2018 10:54:26 -0400 Received: by smtp.corp.redhat.com (Postfix) id 524FD2027EA0; Mon, 27 Aug 2018 14:54:26 +0000 (UTC) Received: from thuth.com (ovpn-117-11.ams2.redhat.com [10.36.117.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id 746732026D6B; Mon, 27 Aug 2018 14:54:24 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Date: Mon, 27 Aug 2018 16:54:11 +0200 Message-Id: <1535381652-19870-4-git-send-email-thuth@redhat.com> In-Reply-To: <1535381652-19870-1-git-send-email-thuth@redhat.com> References: <1535381652-19870-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Cc: libvir-list@redhat.com, Jason Wang , Samuel Thibault , Paolo Bonzini Subject: [libvirt] [PATCH 3/4] Remove the deprecated options -startdate, -localtime and -rtc-td-hack X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.25 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 27 Aug 2018 14:54:29 +0000 (UTC) X-ZohoMail: RDMRC_0 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Deprecated since two releases, nobody complained, thus it's time to remove them now. Signed-off-by: Thomas Huth --- qemu-deprecated.texi | 13 --------- qemu-options.hx | 7 ----- vl.c | 76 +++++++++++++++---------------------------------= ---- 3 files changed, 22 insertions(+), 74 deletions(-) diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi index 19c8ae2..ca52e83 100644 --- a/qemu-deprecated.texi +++ b/qemu-deprecated.texi @@ -96,19 +96,6 @@ The @code{--no-frame} argument works with SDL 1.2 only. = The other user interfaces never implemented this in the first place. So this will be removed together with SDL 1.2 support. =20 -@subsection -rtc-td-hack (since 2.12.0) - -The @code{-rtc-td-hack} option has been replaced by -@code{-rtc driftfix=3Dslew}. - -@subsection -localtime (since 2.12.0) - -The @code{-localtime} option has been replaced by @code{-rtc base=3Dlocalt= ime}. - -@subsection -startdate (since 2.12.0) - -The @code{-startdate} option has been replaced by @code{-rtc base=3D@var{d= ate}}. - @subsection -virtioconsole (since 3.0.0) =20 Option @option{-virtioconsole} has been replaced by diff --git a/qemu-options.hx b/qemu-options.hx index d9be20b..7ca539a 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -1711,9 +1711,6 @@ Windows 2000 is installed, you no longer need this op= tion (this option slows down the IDE transfers). ETEXI =20 -HXCOMM Deprecated by -rtc -DEF("rtc-td-hack", 0, QEMU_OPTION_rtc_td_hack, "", QEMU_ARCH_I386) - DEF("no-fd-bootchk", 0, QEMU_OPTION_no_fd_bootchk, "-no-fd-bootchk disable boot signature checking for floppy disks\n", QEMU_ARCH_I386) @@ -3471,10 +3468,6 @@ ETEXI HXCOMM Silently ignored for compatibility DEF("clock", HAS_ARG, QEMU_OPTION_clock, "", QEMU_ARCH_ALL) =20 -HXCOMM Options deprecated by -rtc -DEF("localtime", 0, QEMU_OPTION_localtime, "", QEMU_ARCH_ALL) -DEF("startdate", HAS_ARG, QEMU_OPTION_startdate, "", QEMU_ARCH_ALL) - DEF("rtc", HAS_ARG, QEMU_OPTION_rtc, \ "-rtc [base=3Dutc|localtime|date][,clock=3Dhost|rt|vm][,driftfix=3Dnon= e|slew]\n" \ " set the RTC base and clock, enable drift fix for cloc= k ticks (x86 only)\n", diff --git a/vl.c b/vl.c index 386c71d..cfeee0d 100644 --- a/vl.c +++ b/vl.c @@ -823,44 +823,33 @@ int qemu_timedate_diff(struct tm *tm) return seconds - qemu_time(); } =20 -static void configure_rtc_date_offset(const char *startdate, int legacy) +static void configure_rtc_date_offset(const char *startdate) { time_t rtc_start_date; struct tm tm; =20 - if (!strcmp(startdate, "now") && legacy) { - rtc_date_offset =3D -1; + if (sscanf(startdate, "%d-%d-%dT%d:%d:%d", &tm.tm_year, &tm.tm_mon, + &tm.tm_mday, &tm.tm_hour, &tm.tm_min, &tm.tm_sec) =3D=3D 6)= { + /* OK */ + } else if (sscanf(startdate, "%d-%d-%d", + &tm.tm_year, &tm.tm_mon, &tm.tm_mday) =3D=3D 3) { + tm.tm_hour =3D 0; + tm.tm_min =3D 0; + tm.tm_sec =3D 0; } else { - if (sscanf(startdate, "%d-%d-%dT%d:%d:%d", - &tm.tm_year, - &tm.tm_mon, - &tm.tm_mday, - &tm.tm_hour, - &tm.tm_min, - &tm.tm_sec) =3D=3D 6) { - /* OK */ - } else if (sscanf(startdate, "%d-%d-%d", - &tm.tm_year, - &tm.tm_mon, - &tm.tm_mday) =3D=3D 3) { - tm.tm_hour =3D 0; - tm.tm_min =3D 0; - tm.tm_sec =3D 0; - } else { - goto date_fail; - } - tm.tm_year -=3D 1900; - tm.tm_mon--; - rtc_start_date =3D mktimegm(&tm); - if (rtc_start_date =3D=3D -1) { - date_fail: - error_report("invalid date format"); - error_printf("valid formats: " - "'2006-06-17T16:01:21' or '2006-06-17'\n"); - exit(1); - } - rtc_date_offset =3D qemu_time() - rtc_start_date; + goto date_fail; + } + tm.tm_year -=3D 1900; + tm.tm_mon--; + rtc_start_date =3D mktimegm(&tm); + if (rtc_start_date =3D=3D -1) { + date_fail: + error_report("invalid date format"); + error_printf("valid formats: " + "'2006-06-17T16:01:21' or '2006-06-17'\n"); + exit(1); } + rtc_date_offset =3D qemu_time() - rtc_start_date; } =20 static void configure_rtc(QemuOpts *opts) @@ -878,7 +867,7 @@ static void configure_rtc(QemuOpts *opts) "-rtc base=3Dlocaltime"); replay_add_blocker(blocker); } else { - configure_rtc_date_offset(value, 0); + configure_rtc_date_offset(value); } } value =3D qemu_opt_get(opts, "clock"); @@ -3269,11 +3258,6 @@ int main(int argc, char **argv, char **envp) case QEMU_OPTION_k: keyboard_layout =3D optarg; break; - case QEMU_OPTION_localtime: - rtc_utc =3D 0; - warn_report("This option is deprecated, " - "use '-rtc base=3Dlocaltime' instead."); - break; case QEMU_OPTION_vga: vga_model =3D optarg; default_vga =3D 0; @@ -3526,18 +3510,6 @@ int main(int argc, char **argv, char **envp) case QEMU_OPTION_win2k_hack: win2k_install_hack =3D 1; break; - case QEMU_OPTION_rtc_td_hack: { - static GlobalProperty slew_lost_ticks =3D { - .driver =3D "mc146818rtc", - .property =3D "lost_tick_policy", - .value =3D "slew", - }; - - qdev_prop_register_global(&slew_lost_ticks); - warn_report("This option is deprecated, " - "use '-rtc driftfix=3Dslew' instead."); - break; - } case QEMU_OPTION_acpitable: opts =3D qemu_opts_parse_noisily(qemu_find_opts("acpi"), optarg, true); @@ -3723,10 +3695,6 @@ int main(int argc, char **argv, char **envp) */ warn_report("This option is ignored and will be removed so= on"); break; - case QEMU_OPTION_startdate: - warn_report("This option is deprecated, use '-rtc base=3D'= instead."); - configure_rtc_date_offset(optarg, 1); - break; case QEMU_OPTION_rtc: opts =3D qemu_opts_parse_noisily(qemu_find_opts("rtc"), op= targ, false); --=20 1.8.3.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Mon May 6 14:27:24 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1535381675470866.844418550947; Mon, 27 Aug 2018 07:54:35 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5B037307C940; Mon, 27 Aug 2018 14:54:33 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 251ADA5DC0; Mon, 27 Aug 2018 14:54:33 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id CE2124A46D; Mon, 27 Aug 2018 14:54:32 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w7REsSTl022177 for ; Mon, 27 Aug 2018 10:54:28 -0400 Received: by smtp.corp.redhat.com (Postfix) id A8BDA2027EA3; Mon, 27 Aug 2018 14:54:28 +0000 (UTC) Received: from thuth.com (ovpn-117-11.ams2.redhat.com [10.36.117.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id B25682026D6B; Mon, 27 Aug 2018 14:54:26 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Date: Mon, 27 Aug 2018 16:54:12 +0200 Message-Id: <1535381652-19870-5-git-send-email-thuth@redhat.com> In-Reply-To: <1535381652-19870-1-git-send-email-thuth@redhat.com> References: <1535381652-19870-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Cc: libvir-list@redhat.com, Jason Wang , Samuel Thibault , Paolo Bonzini Subject: [libvirt] [PATCH 4/4] net: Remove the deprecated -tftp, -bootp, -redir and -smb options X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Mon, 27 Aug 2018 14:54:34 +0000 (UTC) X-ZohoMail: RDMRC_0 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" These options likely do not work as expected as soon as the user tries to use more than one network interface at once. The parameters have been marked as deprecated since QEMU v2.6, so users had plenty of time to move their scripts to the new syntax. Time to remove the old parameters now. Signed-off-by: Thomas Huth Reviewed-by: Samuel Thibault --- include/net/net.h | 3 -- include/net/slirp.h | 4 -- net/slirp.c | 132 +++++++++++------------------------------------= ---- os-posix.c | 8 ---- qemu-deprecated.texi | 34 ------------- qemu-options.hx | 15 ------ vl.c | 18 ------- 7 files changed, 29 insertions(+), 185 deletions(-) diff --git a/include/net/net.h b/include/net/net.h index 1425960..7936d53 100644 --- a/include/net/net.h +++ b/include/net/net.h @@ -201,9 +201,6 @@ extern NICInfo nd_table[MAX_NICS]; extern const char *host_net_devices[]; =20 /* from net.c */ -extern const char *legacy_tftp_prefix; -extern const char *legacy_bootp_filename; - int net_client_parse(QemuOptsList *opts_list, const char *str); int net_init_clients(Error **errp); void net_check_clients(void); diff --git a/include/net/slirp.h b/include/net/slirp.h index 4d63d74..bad3e1e 100644 --- a/include/net/slirp.h +++ b/include/net/slirp.h @@ -30,10 +30,6 @@ void hmp_hostfwd_add(Monitor *mon, const QDict *qdict); void hmp_hostfwd_remove(Monitor *mon, const QDict *qdict); =20 -int net_slirp_redir(const char *redir_str); - -int net_slirp_smb(const char *exported_dir); - void hmp_info_usernet(Monitor *mon, const QDict *qdict); =20 #endif diff --git a/net/slirp.c b/net/slirp.c index 1e14318..c18060f 100644 --- a/net/slirp.c +++ b/net/slirp.c @@ -67,13 +67,11 @@ static int get_str_sep(char *buf, int buf_size, const c= har **pp, int sep) /* slirp network adapter */ =20 #define SLIRP_CFG_HOSTFWD 1 -#define SLIRP_CFG_LEGACY 2 =20 struct slirp_config_str { struct slirp_config_str *next; int flags; char str[1024]; - int legacy_format; }; =20 typedef struct SlirpState { @@ -87,19 +85,13 @@ typedef struct SlirpState { } SlirpState; =20 static struct slirp_config_str *slirp_configs; -const char *legacy_tftp_prefix; -const char *legacy_bootp_filename; static QTAILQ_HEAD(slirp_stacks, SlirpState) slirp_stacks =3D QTAILQ_HEAD_INITIALIZER(slirp_stacks); =20 -static int slirp_hostfwd(SlirpState *s, const char *redir_str, - int legacy_format, Error **errp); -static int slirp_guestfwd(SlirpState *s, const char *config_str, - int legacy_format, Error **errp); +static int slirp_hostfwd(SlirpState *s, const char *redir_str, Error **err= p); +static int slirp_guestfwd(SlirpState *s, const char *config_str, Error **e= rrp); =20 #ifndef _WIN32 -static const char *legacy_smb_export; - static int slirp_smb(SlirpState *s, const char *exported_dir, struct in_addr vserver_addr, Error **errp); static void slirp_smb_cleanup(SlirpState *s); @@ -196,13 +188,6 @@ static int net_slirp_init(NetClientState *peer, const = char *model, return -1; } =20 - if (!tftp_export) { - tftp_export =3D legacy_tftp_prefix; - } - if (!bootfile) { - bootfile =3D legacy_bootp_filename; - } - if (vnetwork) { if (get_str_sep(buf, sizeof(buf), &vnetwork, '/') < 0) { if (!inet_aton(vnetwork, &net)) { @@ -382,21 +367,16 @@ static int net_slirp_init(NetClientState *peer, const= char *model, =20 for (config =3D slirp_configs; config; config =3D config->next) { if (config->flags & SLIRP_CFG_HOSTFWD) { - if (slirp_hostfwd(s, config->str, - config->flags & SLIRP_CFG_LEGACY, errp) < 0)= { + if (slirp_hostfwd(s, config->str, errp) < 0) { goto error; } } else { - if (slirp_guestfwd(s, config->str, - config->flags & SLIRP_CFG_LEGACY, errp) < 0= ) { + if (slirp_guestfwd(s, config->str, errp) < 0) { goto error; } } } #ifndef _WIN32 - if (!smb_export) { - smb_export =3D legacy_smb_export; - } if (smb_export) { if (slirp_smb(s, smb_export, smbsrv, errp) < 0) { goto error; @@ -506,8 +486,7 @@ void hmp_hostfwd_remove(Monitor *mon, const QDict *qdic= t) monitor_printf(mon, "invalid format\n"); } =20 -static int slirp_hostfwd(SlirpState *s, const char *redir_str, - int legacy_format, Error **errp) +static int slirp_hostfwd(SlirpState *s, const char *redir_str, Error **err= p) { struct in_addr host_addr =3D { .s_addr =3D INADDR_ANY }; struct in_addr guest_addr =3D { .s_addr =3D 0 }; @@ -532,18 +511,16 @@ static int slirp_hostfwd(SlirpState *s, const char *r= edir_str, goto fail_syntax; } =20 - if (!legacy_format) { - if (get_str_sep(buf, sizeof(buf), &p, ':') < 0) { - fail_reason =3D "Missing : separator"; - goto fail_syntax; - } - if (buf[0] !=3D '\0' && !inet_aton(buf, &host_addr)) { - fail_reason =3D "Bad host address"; - goto fail_syntax; - } + if (get_str_sep(buf, sizeof(buf), &p, ':') < 0) { + fail_reason =3D "Missing : separator"; + goto fail_syntax; + } + if (buf[0] !=3D '\0' && !inet_aton(buf, &host_addr)) { + fail_reason =3D "Bad host address"; + goto fail_syntax; } =20 - if (get_str_sep(buf, sizeof(buf), &p, legacy_format ? ':' : '-') < 0) { + if (get_str_sep(buf, sizeof(buf), &p, '-') < 0) { fail_reason =3D "Bad host port separator"; goto fail_syntax; } @@ -602,35 +579,13 @@ void hmp_hostfwd_add(Monitor *mon, const QDict *qdict) } if (s) { Error *err =3D NULL; - if (slirp_hostfwd(s, redir_str, 0, &err) < 0) { + if (slirp_hostfwd(s, redir_str, &err) < 0) { error_report_err(err); } } =20 } =20 -int net_slirp_redir(const char *redir_str) -{ - struct slirp_config_str *config; - Error *err =3D NULL; - int res; - - if (QTAILQ_EMPTY(&slirp_stacks)) { - config =3D g_malloc(sizeof(*config)); - pstrcpy(config->str, sizeof(config->str), redir_str); - config->flags =3D SLIRP_CFG_HOSTFWD | SLIRP_CFG_LEGACY; - config->next =3D slirp_configs; - slirp_configs =3D config; - return 0; - } - - res =3D slirp_hostfwd(QTAILQ_FIRST(&slirp_stacks), redir_str, 1, &err); - if (res < 0) { - error_report_err(err); - } - return res; -} - #ifndef _WIN32 =20 /* automatic user mode samba server configuration */ @@ -746,28 +701,6 @@ static int slirp_smb(SlirpState* s, const char *export= ed_dir, return 0; } =20 -/* automatic user mode samba server configuration (legacy interface) */ -int net_slirp_smb(const char *exported_dir) -{ - struct in_addr vserver_addr =3D { .s_addr =3D 0 }; - - if (legacy_smb_export) { - fprintf(stderr, "-smb given twice\n"); - return -1; - } - legacy_smb_export =3D exported_dir; - if (!QTAILQ_EMPTY(&slirp_stacks)) { - Error *err =3D NULL; - int res =3D slirp_smb(QTAILQ_FIRST(&slirp_stacks), exported_dir, - vserver_addr, &err); - if (res < 0) { - error_report_err(err); - } - return res; - } - return 0; -} - #endif /* !defined(_WIN32) */ =20 struct GuestFwd { @@ -789,8 +722,7 @@ static void guestfwd_read(void *opaque, const uint8_t *= buf, int size) slirp_socket_recv(fwd->slirp, fwd->server, fwd->port, buf, size); } =20 -static int slirp_guestfwd(SlirpState *s, const char *config_str, - int legacy_format, Error **errp) +static int slirp_guestfwd(SlirpState *s, const char *config_str, Error **e= rrp) { struct in_addr server =3D { .s_addr =3D 0 }; struct GuestFwd *fwd; @@ -800,26 +732,20 @@ static int slirp_guestfwd(SlirpState *s, const char *= config_str, int port; =20 p =3D config_str; - if (legacy_format) { - if (get_str_sep(buf, sizeof(buf), &p, ':') < 0) { - goto fail_syntax; - } - } else { - if (get_str_sep(buf, sizeof(buf), &p, ':') < 0) { - goto fail_syntax; - } - if (strcmp(buf, "tcp") && buf[0] !=3D '\0') { - goto fail_syntax; - } - if (get_str_sep(buf, sizeof(buf), &p, ':') < 0) { - goto fail_syntax; - } - if (buf[0] !=3D '\0' && !inet_aton(buf, &server)) { - goto fail_syntax; - } - if (get_str_sep(buf, sizeof(buf), &p, '-') < 0) { - goto fail_syntax; - } + if (get_str_sep(buf, sizeof(buf), &p, ':') < 0) { + goto fail_syntax; + } + if (strcmp(buf, "tcp") && buf[0] !=3D '\0') { + goto fail_syntax; + } + if (get_str_sep(buf, sizeof(buf), &p, ':') < 0) { + goto fail_syntax; + } + if (buf[0] !=3D '\0' && !inet_aton(buf, &server)) { + goto fail_syntax; + } + if (get_str_sep(buf, sizeof(buf), &p, '-') < 0) { + goto fail_syntax; } port =3D strtol(buf, &end, 10); if (*end !=3D '\0' || port < 1 || port > 65535) { diff --git a/os-posix.c b/os-posix.c index 9ce6f74..8f39447 100644 --- a/os-posix.c +++ b/os-posix.c @@ -168,14 +168,6 @@ static bool os_parse_runas_uid_gid(const char *optarg) int os_parse_cmd_args(int index, const char *optarg) { switch (index) { -#ifdef CONFIG_SLIRP - case QEMU_OPTION_smb: - error_report("The -smb option is deprecated. " - "Please use '-netdev user,smb=3D...' instead."); - if (net_slirp_smb(optarg) < 0) - exit(1); - break; -#endif case QEMU_OPTION_runas: user_pwd =3D getpwnam(optarg); if (user_pwd) { diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi index ca52e83..8a2e399 100644 --- a/qemu-deprecated.texi +++ b/qemu-deprecated.texi @@ -40,40 +40,6 @@ which is the default. The ``-no-kvm'' argument is now a synonym for setting ``-machine accel=3Dtcg''. =20 -@subsection -tftp (since 2.6.0) - -The ``-tftp /some/dir'' argument is replaced by either -``-netdev user,id=3Dx,tftp=3D/some/dir '' (for pluggable NICs, accompanied -with ``-device ...,netdev=3Dx''), or ``-nic user,tftp=3D/some/dir'' -(for embedded NICs). The new syntax allows different settings to be -provided per NIC. - -@subsection -bootp (since 2.6.0) - -The ``-bootp /some/file'' argument is replaced by either -``-netdev user,id=3Dx,bootp=3D/some/file '' (for pluggable NICs, accompani= ed -with ``-device ...,netdev=3Dx''), or ``-nic user,bootp=3D/some/file'' -(for embedded NICs). The new syntax allows different settings to be -provided per NIC. - -@subsection -redir (since 2.6.0) - -The ``-redir [tcp|udp]:hostport:[guestaddr]:guestport'' argument is -replaced by either -``-netdev user,id=3Dx,hostfwd=3D[tcp|udp]:[hostaddr]:hostport-[guestaddr]:= guestport'' -(for pluggable NICs, accompanied with ``-device ...,netdev=3Dx'') or -``-nic user,hostfwd=3D[tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport'' -(for embedded NICs). The new syntax allows different settings to be -provided per NIC. - -@subsection -smb (since 2.6.0) - -The ``-smb /some/dir'' argument is replaced by either -``-netdev user,id=3Dx,smb=3D/some/dir '' (for pluggable NICs, accompanied -with ``-device ...,netdev=3Dx''), or ``-nic user,smb=3D/some/dir'' -(for embedded NICs). The new syntax allows different settings to be -provided per NIC. - @subsection -usbdevice (since 2.10.0) =20 The ``-usbdevice DEV'' argument is now a synonym for setting diff --git a/qemu-options.hx b/qemu-options.hx index 7ca539a..a642ad2 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -1813,16 +1813,6 @@ STEXI @table @option ETEXI =20 -HXCOMM Legacy slirp options (now moved to -net user): -#ifdef CONFIG_SLIRP -DEF("tftp", HAS_ARG, QEMU_OPTION_tftp, "", QEMU_ARCH_ALL) -DEF("bootp", HAS_ARG, QEMU_OPTION_bootp, "", QEMU_ARCH_ALL) -DEF("redir", HAS_ARG, QEMU_OPTION_redir, "", QEMU_ARCH_ALL) -#ifndef _WIN32 -DEF("smb", HAS_ARG, QEMU_OPTION_smb, "", QEMU_ARCH_ALL) -#endif -#endif - DEF("netdev", HAS_ARG, QEMU_OPTION_netdev, #ifdef CONFIG_SLIRP "-netdev user,id=3Dstr[,ipv4[=3Don|off]][,net=3Daddr[/mask]][,host=3Da= ddr]\n" @@ -2150,11 +2140,6 @@ qemu-system-i386 -nic 'user,id=3Dn1,guestfwd=3Dtcp:= 10.0.2.100:1234-cmd:netcat 10.10 =20 @end table =20 -Note: Legacy stand-alone options -tftp, -bootp, -smb and -redir are still -processed and applied to -net user. Mixing them with the new configuration -syntax gives undefined results. Their use for new applications is discoura= ged -as they will be removed from future versions. - @item -netdev tap,id=3D@var{id}[,fd=3D@var{h}][,ifname=3D@var{name}][,scri= pt=3D@var{file}][,downscript=3D@var{dfile}][,br=3D@var{bridge}][,helper=3D@= var{helper}] Configure a host TAP network backend with ID @var{id}. =20 diff --git a/vl.c b/vl.c index cfeee0d..1b8ff85 100644 --- a/vl.c +++ b/vl.c @@ -3168,24 +3168,6 @@ int main(int argc, char **argv, char **envp) } break; #endif -#ifdef CONFIG_SLIRP - case QEMU_OPTION_tftp: - error_report("The -tftp option is deprecated. " - "Please use '-netdev user,tftp=3D...' instead= ."); - legacy_tftp_prefix =3D optarg; - break; - case QEMU_OPTION_bootp: - error_report("The -bootp option is deprecated. " - "Please use '-netdev user,bootfile=3D...' ins= tead."); - legacy_bootp_filename =3D optarg; - break; - case QEMU_OPTION_redir: - error_report("The -redir option is deprecated. " - "Please use '-netdev user,hostfwd=3D...' inst= ead."); - if (net_slirp_redir(optarg) < 0) - exit(1); - break; -#endif case QEMU_OPTION_bt: add_device_config(DEV_BT, optarg); break; --=20 1.8.3.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list