From dbf1be7595d6b8d3816c997669eb8fc20719cb10 Mon Sep 17 00:00:00 2001 Message-Id: From: Peter Krempa Date: Fri, 16 Aug 2019 14:36:53 +0200 Subject: [PATCH] util: Export virStorageFileSupportsBackingChainTraversal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The function will be reused in the qemu snapshot code. The argument is turned into const similarly to the other virStorageFileSupports* functions. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko (cherry picked from commit 68639829c69ba3ed369413771bf0abceb33c3668) https: //bugzilla.redhat.com/show_bug.cgi?id=1724808 Message-Id: <3c6996022aa58404d1c977e0e3468acdf9f7f1a5.1565958905.git.pkrempa@redhat.com> Reviewed-by: Ján Tomko --- src/libvirt_private.syms | 1 + src/util/virstoragefile.c | 4 ++-- src/util/virstoragefile.h | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index e696fa512c..9b5e1350f0 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -2845,6 +2845,7 @@ virStorageFileReportBrokenChain; virStorageFileResize; virStorageFileStat; virStorageFileSupportsAccess; +virStorageFileSupportsBackingChainTraversal; virStorageFileSupportsCreate; virStorageFileSupportsSecurityDriver; virStorageFileUnlink; diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index faf21db567..099ff62f75 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -4389,8 +4389,8 @@ virStorageFileGetBackendForSupportCheck(const virStorageSource *src, } -static int -virStorageFileSupportsBackingChainTraversal(virStorageSourcePtr src) +int +virStorageFileSupportsBackingChainTraversal(const virStorageSource *src) { virStorageFileBackendPtr backend; int rv; diff --git a/src/util/virstoragefile.h b/src/util/virstoragefile.h index b99afee437..dcc48ad0b9 100644 --- a/src/util/virstoragefile.h +++ b/src/util/virstoragefile.h @@ -506,6 +506,7 @@ int virStorageFileChown(const virStorageSource *src, uid_t uid, gid_t gid); int virStorageFileSupportsSecurityDriver(const virStorageSource *src); int virStorageFileSupportsAccess(const virStorageSource *src); int virStorageFileSupportsCreate(const virStorageSource *src); +int virStorageFileSupportsBackingChainTraversal(const virStorageSource *src); int virStorageFileGetMetadata(virStorageSourcePtr src, uid_t uid, gid_t gid, -- 2.22.1