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

Re: [libvirt] [PATCH v2] storage: Allow to delete device mapper disk partition



On 02/08/2011 03:30 AM, Osier Yang wrote:
> +bool
> +virIsDevMapperDevice(const char *devname)
> +{
> +    struct stat buf;
> +
> +    if (devname &&
> +        !stat(devname, &buf) &&

One other thing - the check for devname being non-NULL is not necessary...

> +bool virIsDevMapperDevice(const char *devname);

if you add ATTRIBUTE_NONNULL(1) to this declaration.  Given that the
only use of this new function to date doesn't pass a NULL pointer, we
might as well make that part of the API.

-- 
Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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