Date: Thu, 27 Apr 2017 22:48:08 -0700 From: Gleb Smirnoff <glebius@FreeBSD.org> To: Ngie Cooper <yaneurabeya@gmail.com> 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> In-Reply-To: <D484C95F-7418-478E-A396-0F220AB2E516@gmail.com> References: <201704280513.v3S5DRYU067517@repo.freebsd.org> <D484C95F-7418-478E-A396-0F220AB2E516@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170428054808.GV56922>