On 04/10/14 05:41, Eric Blake wrote: > 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@xxxxxxxxxx> > --- > src/conf/domain_conf.c | 2 +- > src/libvirt_private.syms | 1 + > src/storage/storage_backend_fs.c | 2 +- > src/util/virstoragefile.c | 20 +++++++++++++------- > src/util/virstoragefile.h | 1 + > 5 files changed, 17 insertions(+), 9 deletions(-) > ACK, although we should switch to determining whether the file is local by inspecting other metadata than the backing string in the future. Peter
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list