From nobody Wed Nov 5 16:33:47 2025 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