]> git.ipfire.org Git - thirdparty/libvirt.git/commit
storage: Report error from VolOpen by default
authorCole Robinson <crobinso@redhat.com>
Wed, 2 Apr 2014 15:51:45 +0000 (11:51 -0400)
committerCole Robinson <crobinso@redhat.com>
Wed, 2 Apr 2014 16:44:16 +0000 (12:44 -0400)
commit138e65c3bea86fd5f51d9133bdcd0b36bff143b7
tree61bdf6b1954f9fa52c711480f2428d8240b6eb82
parent66050f0f892c2a62e56136d25886f8416d7881ea
storage: Report error from VolOpen by default

Currently VolOpen notifies the user of a potentially non-fatal failure by
returning -2 and logging a VIR_WARN or VIR_INFO. Unfortunately most
callers treat -2 as fatal but don't actually report any message with
the error APIs.

Rename the VOL_OPEN_ERROR flag to VOL_OPEN_NOERROR. If NOERROR is specified,
we preserve the current behavior of returning -2 (there's only one caller
that wants this).

However in the default case, only return -1, and actually use the error
APIs. Fix up a couple callers as a result.
src/storage/storage_backend.c
src/storage/storage_backend.h
src/storage/storage_backend_fs.c
src/storage/storage_backend_scsi.c