]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
conf: track user vs. canonical name through full chain lookup
authorEric Blake <eblake@redhat.com>
Tue, 8 Apr 2014 20:26:02 +0000 (14:26 -0600)
committerEric Blake <eblake@redhat.com>
Wed, 9 Apr 2014 13:01:26 +0000 (07:01 -0600)
commit79f11b35c77b3c286c84312dc9737c2ccbf67ed5
tree9ebdd109e7770e68f46a0389131cd9d552c09660
parent90dbdff2ac1888abe177aea9383dbb655a50c4e9
conf: track user vs. canonical name through full chain lookup

The previous patch started a separation of error messages
reported against the user-specified name, vs. tracking the
canonical path that was actually opened.  This patch extends
that notion, by hoisting directory detection up front, passing
the canonical path through the entire call chain, and
simplifying lower-level functions that can now assume that
a canonical path and directory have been supplied.

* src/util/virstoragefile.c
(virStorageFileGetMetadataFromFDInternal)
(virStorageFileGetMetadataInternal): Add parameter, require
directory.
(virFindBackingFile): Require directory.
(virStorageFileGetMetadataFromFD): Pass canonical path.
(virStorageFileGetMetadataFromBuf): Likewise.
(virStorageFileGetMetadata): Determine initial directory.

Signed-off-by: Eric Blake <eblake@redhat.com>
src/util/virstoragefile.c