From owner-svn-src-head@freebsd.org Fri Apr 28 05:48:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 616F6D54AFA; Fri, 28 Apr 2017 05:48:10 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B83F175D; Fri, 28 Apr 2017 05:48:09 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id v3S5m8Jv071697 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 27 Apr 2017 22:48:08 -0700 (PDT) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id v3S5m8Ti071696; Thu, 27 Apr 2017 22:48:08 -0700 (PDT) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 27 Apr 2017 22:48:08 -0700 From: Gleb Smirnoff To: Ngie Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r317543 - head/usr.sbin/bhyve Message-ID: <20170428054808.GV56922@FreeBSD.org> References: <201704280513.v3S5DRYU067517@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.0 (2017-02-23) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 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: Fri, 28 Apr 2017 05:48:10 -0000 On Thu, Apr 27, 2017 at 10:26:28PM -0700, Ngie Cooper wrote: N> > Author: glebius N> > Date: Fri Apr 28 05:13:27 2017 N> > New Revision: 317543 N> > URL: https://svnweb.freebsd.org/changeset/base/317543 N> > N> > Log: N> > When no "rfb" configuration specified bind to the default VNC N> > port instead of binding to a random one. N> > N> > Modified: N> > head/usr.sbin/bhyve/pci_fbuf.c N> > N> > Modified: head/usr.sbin/bhyve/pci_fbuf.c N> > ============================================================================== N> > --- head/usr.sbin/bhyve/pci_fbuf.c Fri Apr 28 05:09:51 2017 (r317542) N> > +++ head/usr.sbin/bhyve/pci_fbuf.c Fri Apr 28 05:13:27 2017 (r317543) N> > @@ -365,6 +365,8 @@ pci_fbuf_init(struct vmctx *ctx, struct N> > N> > sc->fsc_pi = pi; N> > N> > + sc->rfb_port = 5900; N> > + N> N> Wouldn't it be better to use getservbyname? I decided to follow the KISS principle here. We are going to resolve only one constant name always, so running all the machinery around getservbyname seems overkill to me. If we had ability to specify non-default ports by name in the bhyve command line, then it would make sense to run getservbyname. On the other hand there is no good point in adding such ability to bhyve. -- Totus tuus, Glebius.