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.
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to