Re: [libvirt] [PATCH 4/7] Factor qemudMonitorSend() out of qemudMonitorCommandExtra()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/
daniel@xxxxxxxxxxxx  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]