diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index b4b72c073417dc28172924f87c95ca8d79798a53..d5c3b9abb54e29ce5f470194fda7d98aa4bbe16c 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -2734,6 +2734,8 @@ virStorageSourceParseRBDColonString; virStorageSourcePoolDefFree; virStorageSourcePoolModeTypeFromString; virStorageSourcePoolModeTypeToString; +virStorageSourcePrivateDataFormatRelPath; +virStorageSourcePrivateDataParseRelPath; virStorageSourceUpdateBackingSizes; virStorageSourceUpdateCapacity; virStorageSourceUpdatePhysicalSize; diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 6594715e5e56ce3dbbf41b121e32037cf93b4d68..5780180a94ef5180c83bb7cb20bc9a3807daaefe 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -4086,3 +4086,23 @@ virStorageSourceNetworkAssignDefaultPorts(virStorageSourcePtr src) src->hosts[i].port = virStorageSourceNetworkDefaultPort(src->protocol); } } + + +int +virStorageSourcePrivateDataParseRelPath(xmlXPathContextPtr ctxt, + virStorageSourcePtr src) +{ + src->relPath = virXPathString("string(./relPath)", ctxt); + return 0; +} + + +int +virStorageSourcePrivateDataFormatRelPath(virStorageSourcePtr src, + virBufferPtr buf) +{ + if (src->relPath) + virBufferEscapeString(buf, "%s\n", src->relPath); + + return 0; +} diff --git a/src/util/virstoragefile.h b/src/util/virstoragefile.h index 24382a0a6b3cf03c8fbec0b8ad32dea583649963..ecd806c93f842150baea4676cb5611fd2a7e7438 100644 --- a/src/util/virstoragefile.h +++ b/src/util/virstoragefile.h @@ -441,4 +441,12 @@ bool virStorageSourceHasBacking(const virStorageSource *src); +int +virStorageSourcePrivateDataParseRelPath(xmlXPathContextPtr ctxt, + virStorageSourcePtr src); +int +virStorageSourcePrivateDataFormatRelPath(virStorageSourcePtr src, + virBufferPtr buf); + + #endif /* __VIR_STORAGE_FILE_H__ */