On Thu, Jun 28, 2018 at 05:51:18PM +0100, Richard W.M. Jones wrote: > On Thu, Jun 28, 2018 at 05:06:20PM +0100, Daniel P. Berrangé wrote: > > On Thu, Jun 28, 2018 at 09:42:18AM -0500, Eric Blake wrote: > > > Does it make sense to forbid this operation on servers (since it only > > > makes > > > sense for clients)? > > > > We can't validate that here, because we can't guarantee that 'endpoint' > > is set before 'username' is set. > > > > > > We could enforce it in the setter for the "loaded" property as that is > > set only after every other property is set. > > As far as I can see we could only warn here, since the set_loaded > function returns void.
Welcome to qemu's unusual error reporting style. You just call error_setg(errp, ...) to report an error - return value is not relevant - the caller simply examines whether 'Error *' is set after the call finishes. 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 :|