]> xenbits.xensource.com Git - libvirt.git/commit
conf: drop extra storage probe
authorEric Blake <eblake@redhat.com>
Tue, 29 Apr 2014 03:40:22 +0000 (21:40 -0600)
committerEric Blake <eblake@redhat.com>
Mon, 5 May 2014 16:46:05 +0000 (10:46 -0600)
commitfff74b275e52c37b4c86ba5c42892fd07ca627a4
tree8c5e97a7b7f7c635b53ee00ef390617df7b78a99
parent0541727cf7b188023509d30764bfc782c1e3c99c
conf: drop extra storage probe

All callers of virStorageFileGetMetadataFromBuf were first calling
virStorageFileProbeFormatFromBuf, to learn what format to pass in.
But this function is already wired to do the exact same probe if
the incoming format is VIR_STORAGE_FILE_AUTO, so it's simpler to
just refactor the probing into the central function.

* src/util/virstoragefile.h (virStorageFileGetMetadataFromBuf):
Drop parameter.
(virStorageFileProbeFormatFromBuf): Drop declaration.
* src/util/virstoragefile.c (virStorageFileGetMetadataFromBuf):
Do probe here instead of in callers.
(virStorageFileProbeFormatFromBuf): Make static.
* src/libvirt_private.syms (virstoragefile.h): Drop function.
* src/storage/storage_backend_fs.c (virStorageBackendProbeTarget):
Update caller.
* src/storage/storage_backend_gluster.c
(virStorageBackendGlusterRefreshVol): Likewise.

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