[libvirt] [PATCH] [v3] storage: Ignore dangling symbolic link for filesystem pool

Eric Blake eblake at redhat.com
Tue Dec 21 14:51:50 UTC 2010


On 12/20/2010 11:45 PM, Osier Yang wrote:
> If there is a dangling symbolic link in filesystem pool, the pool
> will fail to start or refresh, this patch is to fix it by ignoring
> it with a warning log.

>      if ((fd = open(path, O_RDONLY|O_NONBLOCK|O_NOCTTY)) < 0) {
> +        if (stat(path, &sb) < 0 &&
> +            (errno == ENOENT || errno == ELOOP)) {
> +            VIR_WARN(_("cannot open volume '%s' :%s"), path,

Oh, and 'make syntax-check' didn't like _() marking inside VIR_WARN.

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20101221/c6deeded/attachment-0001.sig>


More information about the libvir-list mailing list