]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: expose probe for non-local storage
authorEric Blake <eblake@redhat.com>
Wed, 9 Apr 2014 22:08:42 +0000 (16:08 -0600)
committerEric Blake <eblake@redhat.com>
Thu, 10 Apr 2014 22:37:01 +0000 (16:37 -0600)
commit86f71e0a87b9d3d6d4f74389a456cdb3f1309066
tree9871a7471a76bd75f4bf612a3968e952c2c2b62a
parent7010768c5e9d023a7908a649e69b5627e9eba24c
conf: expose probe for non-local storage

Deciding if a user string represents a local file instead of a
network path is an operation worth exposing directly, particularly
since the next patch will be removing a redundant variable that
was caching the information.

* src/util/virstoragefile.h (virStorageIsFile): New declaration.
* src/util/virstoragefile.c (virBackingStoreIsFile): Rename...
(virStorageIsFile): ...export, and allow NULL input.
(virStorageFileGetMetadataInternal)
(virStorageFileGetMetadataRecurse, virStorageFileGetMetadata):
Update callers.
* src/conf/domain_conf.c (virDomainDiskDefForeachPath): Use it.
* src/storage/storage_backend_fs.c (virStorageBackendProbeTarget):
Likewise.
* src/libvirt_private.syms (virstoragefile.h): Export function.

Signed-off-by: Eric Blake <eblake@redhat.com>
src/conf/domain_conf.c
src/libvirt_private.syms
src/storage/storage_backend_fs.c
src/util/virstoragefile.c
src/util/virstoragefile.h