mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 06:50:22 +03:00
storage: Don't report OOM error on failure of glfs_new
OOM isn't the only failure glfs_new can encounter. Report an error which might give more insight. libgfapi seems to be setting errno but reporting a system error migt be misleading. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Laine Stump <laine@redhat.com>
This commit is contained in:
parent
0af84a81fc
commit
5591ba2889
@ -114,7 +114,8 @@ virStorageBackendGlusterOpen(virStoragePoolObjPtr pool)
|
||||
|
||||
/* Actually connect to glfs */
|
||||
if (!(ret->vol = glfs_new(ret->volname))) {
|
||||
virReportOOMError();
|
||||
virReportError(VIR_ERR_OPERATION_FAILED,
|
||||
_("failed to create glfs object for '%s'"), ret->volname);
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
@ -120,7 +120,8 @@ virStorageFileBackendGlusterInit(virStorageSourcePtr src)
|
||||
(unsigned int)drv->uid, (unsigned int)drv->gid);
|
||||
|
||||
if (!(priv->vol = glfs_new(src->volume))) {
|
||||
virReportOOMError();
|
||||
virReportError(VIR_ERR_OPERATION_FAILED,
|
||||
_("failed to create glfs object for '%s'"), src->volume);
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user