mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-08 22:15:21 +00:00
Fix error squashing when refreshing file volumes
This commit is contained in:
parent
37ede4d5f5
commit
52c5f7adc8
@ -1,3 +1,8 @@
|
|||||||
|
Tue May 12 15:58:28 EDT 2009 Cole Robinson <crobinso@redhat.com>
|
||||||
|
|
||||||
|
* src/storage_backend.c: Document a function
|
||||||
|
* src/storage_backend_fs.c: Don't squash file probe errors.
|
||||||
|
|
||||||
Tue May 12 17:45:22 BST 2009 Daniel P. Berrange <berrange@redhat.com>
|
Tue May 12 17:45:22 BST 2009 Daniel P. Berrange <berrange@redhat.com>
|
||||||
|
|
||||||
* .hgignore, tests/.cvsignore, tests/.gitignore: Ignore
|
* .hgignore, tests/.cvsignore, tests/.gitignore: Ignore
|
||||||
|
@ -156,6 +156,17 @@ virStorageBackendUpdateVolInfo(virConnectPtr conn,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* virStorageBackendUpdateVolTargetInfoFD:
|
||||||
|
* @conn: connection to report errors on
|
||||||
|
* @target: target definition ptr of volume to update
|
||||||
|
* @fd: fd of storage volume to update
|
||||||
|
* @allocation: If not NULL, updated allocation information will be stored
|
||||||
|
* @capacity: If not NULL, updated capacity info will be stored
|
||||||
|
*
|
||||||
|
* Returns 0 for success-1 on a legitimate error condition,
|
||||||
|
* -2 if passed FD isn't a regular, char, or block file.
|
||||||
|
*/
|
||||||
int
|
int
|
||||||
virStorageBackendUpdateVolTargetInfoFD(virConnectPtr conn,
|
virStorageBackendUpdateVolTargetInfoFD(virConnectPtr conn,
|
||||||
virStorageVolTargetPtr target,
|
virStorageVolTargetPtr target,
|
||||||
|
@ -843,7 +843,7 @@ virStorageBackendFileSystemRefresh(virConnectPtr conn,
|
|||||||
&vol->allocation,
|
&vol->allocation,
|
||||||
&vol->capacity) < 0)) {
|
&vol->capacity) < 0)) {
|
||||||
if (ret == -1)
|
if (ret == -1)
|
||||||
goto no_memory;
|
goto cleanup;
|
||||||
else {
|
else {
|
||||||
/* Silently ignore non-regular files,
|
/* Silently ignore non-regular files,
|
||||||
* eg '.' '..', 'lost+found' */
|
* eg '.' '..', 'lost+found' */
|
||||||
@ -883,7 +883,7 @@ virStorageBackendFileSystemRefresh(virConnectPtr conn,
|
|||||||
&vol->backingStore,
|
&vol->backingStore,
|
||||||
NULL, NULL, NULL)) < 0) {
|
NULL, NULL, NULL)) < 0) {
|
||||||
if (ret == -1)
|
if (ret == -1)
|
||||||
goto no_memory;
|
goto cleanup;
|
||||||
else {
|
else {
|
||||||
/* Silently ignore non-regular files,
|
/* Silently ignore non-regular files,
|
||||||
* eg '.' '..', 'lost+found' */
|
* eg '.' '..', 'lost+found' */
|
||||||
|
Loading…
Reference in New Issue
Block a user