On Tue, Feb 16, 2021 at 09:08:39PM +0000, Peter Maydell wrote: > On Tue, 16 Feb 2021 at 19:10, Daniel P. Berrangé <berra...@redhat.com> wrote: > > > > The preferred syntax is to use "foo=on|off", rather than a bare > > "foo" or "nofoo". > > > > Signed-off-by: Daniel P. Berrangé <berra...@redhat.com> > > - "-chardev > > socket,id=id[,host=host],port=port[,to=to][,ipv4][,ipv6][,nodelay][,reconnect=seconds]\n" > > - " > > [,server][,nowait][,telnet][,websocket][,reconnect=seconds][,mux=on|off]\n" > > + "-chardev > > socket,id=id[,host=host],port=port[,to=to][,ipv4=on|off][,ipv6=on|off][,delay=on|off][,reconnect=seconds]\n" > > Watch out, 'nodelay' is a special case, where the option name itself > starts with 'no': > > { 'struct': 'ChardevSocket', > 'data': { 'addr': 'SocketAddressLegacy', > '*tls-creds': 'str', > '*tls-authz' : 'str', > '*server': 'bool', > '*wait': 'bool', > '*nodelay': 'bool', > '*telnet': 'bool', > '*tn3270': 'bool', > '*websocket': 'bool', > '*reconnect': 'int' }, > 'base': 'ChardevCommon' } > > (because it's setting the TCP_NODELAY option). > > This probably applies elsewhere, eg I suspect the 'nodelay' in > patch 1 also should remain.
For added fun that's not what we call it in QemuOpts though ! In qemu_chr_parse_socket we do: sock->has_nodelay = qemu_opt_get(opts, "delay"); sock->nodelay = !qemu_opt_get_bool(opts, "delay", true); So we really were relying on the "no$FOO" syntax here Arguably it would be saner if we really did call it "nodelay" at the QemuOpts level. I guess we trying to avoid having "nonodelay". Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|