
On 04/23/14 09:56, Peter Krempa wrote:
On 04/22/14 22:53, Eric Blake wrote:
On 04/22/2014 07:34 AM, Eric Blake wrote:
On 04/20/2014 04:13 PM, Peter Krempa wrote:
Avoid breaking gluster volumes that don't have local representation. Use the provided name when canonicalization fails. Broken by commit 79f11b35
...
diff --git i/src/util/virstoragefile.c w/src/util/virstoragefile.c index c707200..6ea45a4 100644 --- i/src/util/virstoragefile.c +++ w/src/util/virstoragefile.c @@ -1012,9 +1012,12 @@ virStorageFileGetMetadataFromBuf(const char *path, virStorageFileMetadataPtr ret = NULL; char *canonPath;
- if (!(canonPath = canonicalize_file_name(path)) && - VIR_STRDUP(canonPath, path) < 0) { - virReportSystemError(errno, _("unable to resolve '%s'"), path); + if (virStorageIsFile(path)) {
You are suggesting this same change in patch 6/18 ... as that patch actually removes this code I'll leave this patch as-is and fix the code in the new helper introduced in 6/18.
Or I can squash those two commits together (effectively just mention the fix in the commit message).
+ if (!(canonPath = canonicalize_file_name(path))) { + virReportSystemError(errno, _("unable to resolve '%s'"), path); + return NULL; + } + } else if (VIR_STRDUP(canonPath, path) < 0) { return NULL; }
Peter