From nobody Mon Jun 17 17:06:30 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2x9z2DGPz5PG4W; Mon, 17 Jun 2024 17:06:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2x9z1XvDz42Fy; Mon, 17 Jun 2024 17:06:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718643991; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QeCHIIShtl79ZL7F0iaCpyUMcDboY2+nDph8EUkkDns=; b=mcydnQI+wQUastQ8Bf3Pc0k5ZsWC/eMIU04rJ7Jdy6Yl2NM7YQ8acrrS3JOOaGHQ/cP6HX 9fdN4nSIeCCMmYXzjNWioWmZRHcdFw3pG2yRVVUrOxFvV8OwR9L+S32g26UI1loDD54TxK h/znG9XPyMJbhlAXK4FyHK6Abc7gSicZJIK6dn0vbesGXbIATv2Y59NICS8ZdhoncUk2wE elt9mMdgkY72Kro0rBDq7k1XLfEoGTQ8n7EJfFVS78Eou6xWDqajUKBceSoiwPGw2Lo6OA h1dp9ZTwdT2EATqDvjTUhXwRDcV+BYEvcStVxN3KVtapeKj7mfyIMkD/WrT6yQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718643991; a=rsa-sha256; cv=none; b=rmMr3CXnFglHy0a+bp/G+zQ8dms2qTfGcF5T3iVPTzirt/NRUHdH2raP5OIXxoTrjEtAKB a+b+2+O3Esj2V3QELBns+f0//8rcoVEzGwccUJAPu5lp/Ck3R9i59tnJ/c1Jvv9U0saETP nEc0PGw8rQ2lbt3Pv8AAqeAgS3GO2cc9SFTL4ojdRFW7de49oT97JN6wItrqdDjryYosK2 hP7FYFfwal5jK8fpA0DkKctVdiL3LnicE9XHj4PWIYJGpZiQvRaZw8pWA03dxgc15GvqVu af976yDuK3P08jxtWOaou0cO4/IFrvgTAzEkF68UsbDXUcct82wloJkudvEv1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718643991; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QeCHIIShtl79ZL7F0iaCpyUMcDboY2+nDph8EUkkDns=; b=ZtUbOE5FT+W2kF5SL6o+6bW3JwtzdMBRQ7emH58y7B+Vdp1v4l6I7pQ+QdrKW2geOmouKB 3X1T4wDwYiqbLeuipuUD2aZU0FmAFsWj9TXbsfoIgM+TiLiM/Ow78OZj5ciy8qRVWqkWoA W4sRNBTu/oyXUcCggASWarGLDXWW9WAWoSHqZbc0EITTfh2RhZziMNNiQmy7k4V1OGiiDP vGZRJdMU2dqpnNmt1Sap7mEy4Rn7UIvtxCOqFdszCE5E1/XT+slc9Hxuf468K7tzawjOhJ vATpQks21m7PvAtwzpFZApzWPE5jj2kIdhP7m/hnU96y75AyO6exSPqML+Hv9g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W2x9z0kJ2zNbX; Mon, 17 Jun 2024 17:06:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45HH6UoG057760; Mon, 17 Jun 2024 17:06:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45HH6UZG057758; Mon, 17 Jun 2024 17:06:30 GMT (envelope-from git) Date: Mon, 17 Jun 2024 17:06:30 GMT Message-Id: <202406171706.45HH6UZG057758@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: c6030b380469 - main - Revert "tzsetup: ask local/UTC question only on x86" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c6030b380469f928c8cae87ed53bcb234cb3486f Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c6030b380469f928c8cae87ed53bcb234cb3486f commit c6030b380469f928c8cae87ed53bcb234cb3486f Author: Ed Maste AuthorDate: 2024-06-17 17:03:44 +0000 Commit: Ed Maste CommitDate: 2024-06-17 17:04:40 +0000 Revert "tzsetup: ask local/UTC question only on x86" I am unsure if AArch64 Windows systems keep UTC or local time in the RTC by default, so keep tzsetup consistent across architectures for now. This reverts commit aa6fb1d277be47c51abc309ac9305def0fce7f9d. Reported by: Mark Millard --- usr.sbin/tzsetup/tzsetup.8 | 1 - usr.sbin/tzsetup/tzsetup.c | 25 ++++++++++--------------- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/usr.sbin/tzsetup/tzsetup.8 b/usr.sbin/tzsetup/tzsetup.8 index 4e70875ec74b..3fd463c31ee5 100644 --- a/usr.sbin/tzsetup/tzsetup.8 +++ b/usr.sbin/tzsetup/tzsetup.8 @@ -63,7 +63,6 @@ Skip the initial question about adjusting the clock if not set to UTC. will neither create nor delete .Pa /etc/wall_cmos_clock . On a newly installed system, the hardware clock will keep UTC. -This option is enabled automatically on non-x86 hardware. .El .Pp It is possible to short-circuit the menu system by specifying the diff --git a/usr.sbin/tzsetup/tzsetup.c b/usr.sbin/tzsetup/tzsetup.c index 6629dd81f250..617de4efb765 100644 --- a/usr.sbin/tzsetup/tzsetup.c +++ b/usr.sbin/tzsetup/tzsetup.c @@ -826,28 +826,23 @@ main(int argc, char **argv) char prompt[128]; int fd; #endif - int c, rv; - bool skiputc; - char *dztpath; -#if defined(__i386__) || defined(__amd64__) + int c, rv, skiputc; char vm_guest[16] = ""; size_t len = sizeof(vm_guest); + char *dztpath; - skiputc = false; - - /* Default skiputc to true for VM guests */ - if (sysctlbyname("kern.vm_guest", vm_guest, &len, NULL, 0) == 0 && - strcmp(vm_guest, "none") != 0) - skiputc = true; -#else - skiputc = true; -#endif dztpath = NULL; + skiputc = 0; #ifdef HAVE_BSDDIALOG setlocale(LC_ALL, ""); #endif + /* Default skiputc to 1 for VM guests */ + if (sysctlbyname("kern.vm_guest", vm_guest, &len, NULL, 0) == 0 && + strcmp(vm_guest, "none") != 0) + skiputc = 1; + while ((c = getopt(argc, argv, "C:d:nrs")) != -1) { switch (c) { case 'C': @@ -866,7 +861,7 @@ main(int argc, char **argv) #endif break; case 's': - skiputc = true; + skiputc = 1; break; default: usage(); @@ -956,7 +951,7 @@ main(int argc, char **argv) if (bsddialog_init() == BSDDIALOG_ERROR) errx(1, "Error bsddialog: %s\n", bsddialog_geterror()); - if (!skiputc) { + if (skiputc == 0) { snprintf(prompt, sizeof(prompt), "Is this machine's CMOS clock set to UTC? " "If it is set to local time,\n"