From owner-svn-src-head@FreeBSD.ORG Tue Nov 11 19:41:57 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0CB8CBB0; Tue, 11 Nov 2014 19:41:57 +0000 (UTC) Received: from d.mail.sonic.net (d.mail.sonic.net [64.142.111.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CCB251D9; Tue, 11 Nov 2014 19:41:56 +0000 (UTC) Received: from aurora.physics.berkeley.edu (aurora.Physics.Berkeley.EDU [128.32.117.67]) (authenticated bits=0) by d.mail.sonic.net (8.14.9/8.14.9) with ESMTP id sABJfnMq027537 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 11 Nov 2014 11:41:49 -0800 Message-ID: <5462667D.9020804@freebsd.org> Date: Tue, 11 Nov 2014 11:41:49 -0800 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Devin Teske , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r274394 - in head/usr.sbin: bsdconfig/timezone tzsetup References: <201411111937.sABJbHLl067878@svn.freebsd.org> In-Reply-To: <201411111937.sABJbHLl067878@svn.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-CAuth: UmFuZG9tSVb3g2bmxMCzAZ7ob4wduF+UKv5ZaLRhnDpqKCqPFheB9nSvNWC65KZadUY6il9NTgVy49l/9DaP4KgvBBOxdDjPDoY7RkKgh8M= X-Sonic-ID: C;gqsmx9pp5BGl4MqcqJ4NOg== M;Lu9ex9pp5BGl4MqcqJ4NOg== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2014 19:41:57 -0000 On 11/11/14 11:37, Devin Teske wrote: > Author: dteske > Date: Tue Nov 11 19:37:17 2014 > New Revision: 274394 > URL: https://svnweb.freebsd.org/changeset/base/274394 > > Log: > Default `bsdconfig timezone' and `tzsetup' to `-s' in a VM. > > Recommended by: cperciva > Reviewed by: cperciva > Relnotes: tzsetup and bsdconfig now assume that the "hardware" clock inside a VM is set to UTC > > Modified: > head/usr.sbin/bsdconfig/timezone/timezone > head/usr.sbin/tzsetup/tzsetup.c > > Modified: head/usr.sbin/bsdconfig/timezone/timezone > ============================================================================== > --- head/usr.sbin/bsdconfig/timezone/timezone Tue Nov 11 19:12:57 2014 (r274393) > +++ head/usr.sbin/bsdconfig/timezone/timezone Tue Nov 11 19:37:17 2014 (r274394) > @@ -62,7 +62,7 @@ _PATH_WALL_CMOS_CLOCK="/etc/wall_cmos_cl > REALLYDOIT=1 > REINSTALL= > USEDIALOG=1 > -SKIPUTC= > +SKIPUTC= # See MAIN > VERBOSE= > TZ_OR_FAIL= > CHROOTENV= > @@ -119,6 +119,9 @@ dialog_menu_main() > > ############################################################ MAIN > > +# Skip initial question regarding UTC v. Wall-Clock time if run in VM > +[ "$( sysctl -n kern.vm_guest 2> /dev/null )" = "none" ] || SKIPUTC=1 > + > # Incorporate rc-file if it exists > [ -f "$HOME/.bsdconfigrc" ] && f_include "$HOME/.bsdconfigrc" > > > Modified: head/usr.sbin/tzsetup/tzsetup.c > ============================================================================== > --- head/usr.sbin/tzsetup/tzsetup.c Tue Nov 11 19:12:57 2014 (r274393) > +++ head/usr.sbin/tzsetup/tzsetup.c Tue Nov 11 19:37:17 2014 (r274394) > @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > > #include > > @@ -910,8 +911,16 @@ main(int argc, char **argv) > { > char title[64], prompt[128]; > int c, fd, rv, skiputc; > + char vm_guest[16] = ""; > + size_t len = sizeof(vm_guest); > > skiputc = 0; > + > + /* 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:nrs")) != -1) { > switch(c) { > case 'C': > You've mixed tabs and spaces here. Could you fix it? -Nathan