* especially during the virStoragePoolSourceClear method */
def->ns = options->ns;
if (def->ns.parse) {
+ if (virXMLNamespaceRegister(ctxt, &def->ns) < 0)
+ return NULL;
if ((def->ns.parse)(ctxt, &def->namespaceData) < 0)
return NULL;
}
#if WITH_STORAGE_FS
-# include <libxml/xpathInternals.h>
# include <mntent.h>
struct _virNetfsDiscoverState {
int ret = -1;
VIR_AUTOFREE(xmlNodePtr *)nodes = NULL;
- if (xmlXPathRegisterNs(ctxt, BAD_CAST "fs",
- BAD_CAST STORAGE_POOL_FS_NAMESPACE_HREF) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Failed to register xml namespace '%s'"),
- STORAGE_POOL_FS_NAMESPACE_HREF);
- return -1;
- }
-
nnodes = virXPathNodeSet("./fs:mount_opts/fs:option", ctxt, &nodes);
if (nnodes < 0)
return -1;
#include "rbd/librbd.h"
#include "secret_util.h"
#include "storage_util.h"
-#include <libxml/xpathInternals.h>
#define VIR_FROM_THIS VIR_FROM_STORAGE
int ret = -1;
VIR_AUTOFREE(xmlNodePtr *)nodes = NULL;
- if (xmlXPathRegisterNs(ctxt, BAD_CAST "rbd",
- BAD_CAST STORAGE_POOL_RBD_NAMESPACE_HREF) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Failed to register xml namespace '%s'"),
- STORAGE_POOL_RBD_NAMESPACE_HREF);
- return -1;
- }
-
nnodes = virXPathNodeSet("./rbd:config_opts/rbd:option", ctxt, &nodes);
if (nnodes < 0)
return -1;