1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-25 01:34:11 +03:00

Fix error messages in virStorageFileGetMetadataFromFD

Do not use relPath, it has not been filled by virStorageFileMetadataNew.
This commit is contained in:
Ján Tomko 2015-02-19 13:32:41 +01:00
parent 3e4b783e1e
commit 6784acc7b0

View File

@ -1030,12 +1030,12 @@ virStorageFileGetMetadataFromFD(const char *path,
}
if (lseek(fd, 0, SEEK_SET) == (off_t)-1) {
virReportSystemError(errno, _("cannot seek to start of '%s'"), meta->relPath);
virReportSystemError(errno, _("cannot seek to start of '%s'"), meta->path);
goto cleanup;
}
if ((len = virFileReadHeaderFD(fd, len, &buf)) < 0) {
virReportSystemError(errno, _("cannot read header '%s'"), meta->relPath);
virReportSystemError(errno, _("cannot read header '%s'"), meta->path);
goto cleanup;
}