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

Re: [Xen-devel] [PATCH 1/4] libxc: prefer using privcmd character device



Doug Goldstein writes ("[PATCH 1/4] libxc: prefer using privcmd character 
device"):
> Prefer using the character device over the proc file if the character
> device exists. This follows similar conversions of xenbus to avoid
> issues with FMODE_ATOMIC_POS added in Linux 3.14 and newer.

This is a fine change, but

> -    int fd = open("/proc/xen/privcmd", O_RDWR);
> +    int fd = open("/dev/xen/privcmd", O_RDWR); /* prefer this newer 
> interface */
> +
> +    if ( fd == -1 )
> +    {

I think this should check the errno value.  I expect that any of
ENOENT, ENXIO and ENODEV should be tolerated - but others should
probaby be a fatal error.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.