storage: backend: Log uid/gid when initializing storage file backend

To ease debugging permission problems add uid/gid values to the debug
message when initializing a storage file backend.
This commit is contained in:
Peter Krempa 2014-10-14 15:55:09 +02:00
parent abef016496
commit 3b31cbc558
2 changed files with 6 additions and 4 deletions

View File

@ -1370,9 +1370,10 @@ virStorageFileBackendFileInit(virStorageSourcePtr src)
{
virStorageFileBackendFsPrivPtr priv = NULL;
VIR_DEBUG("initializing FS storage file %p (%s:%s)", src,
VIR_DEBUG("initializing FS storage file %p (%s:%s)[%u:%u]", src,
virStorageTypeToString(virStorageSourceGetActualType(src)),
src->path);
src->path,
(unsigned int)src->drv->uid, (unsigned int)src->drv->gid);
if (VIR_ALLOC(priv) < 0)
return -1;

View File

@ -582,9 +582,10 @@ virStorageFileBackendGlusterInit(virStorageSourcePtr src)
hostname = host->name;
VIR_DEBUG("initializing gluster storage file %p (gluster://%s:%s/%s%s)",
VIR_DEBUG("initializing gluster storage file %p (gluster://%s:%s/%s%s)[%u:%u]",
src, hostname, host->port ? host->port : "0",
NULLSTR(src->volume), src->path);
NULLSTR(src->volume), src->path,
(unsigned int)src->drv->uid, (unsigned int)src->drv->gid);
if (!src->volume) {
virReportError(VIR_ERR_INTERNAL_ERROR,