On Wed, Jul 22, 2009 at 10:57:33PM +0100, Mark McLoughlin wrote:
> Add a little helper function to write the monitor command followed by
> carriage return in a single write.
>
> This doesn't make any real difference, but allows us to more easily
> switch to using sendmsg() when using the monitor over a unix socket.
[...]
> +static int
> +qemudMonitorSend(const virDomainObjPtr vm,
> + const char *cmd)
> +{
> + char *full;
> + size_t len;
> + int ret = -1;
> +
> + if (virAsprintf(&full, "%s\r", cmd) < 0)
> + return -1;
Hum, we introduce an allocation here, and if it fails we really
should call the OOM errror centralized routine
Once done looks fine to me, ACK,
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
[email protected] | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
--
Libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list