The splits are getting easier, with fewer cleanups needed in virsh.h.
* tools/virsh-host.h: New file.
* tools/Makefile.am (virsh_SOURCES): Build it.
* tools/virsh-host.c: Use new header.
* tools/virsh.c: Likewise.
virsh.c virsh.h \
virsh-domain.c virsh-domain.h \
virsh-domain-monitor.c virsh-domain-monitor.h \
+ virsh-host.c virsh-host.h \
$(NULL)
-# virsh-host.c virsh-host.h \
# virsh-interface.c virsh-interface.h \
# virsh-network.c virsh-network.h \
# virsh-nodedev.c virsh-nodedev.h \
*
*/
+#include <config.h>
+#include "virsh-host.h"
+
+#include <libxml/parser.h>
+#include <libxml/tree.h>
+#include <libxml/xpath.h>
+#include <libxml/xmlsave.h>
+
+#include "internal.h"
+#include "buf.h"
+#include "memory.h"
+#include "util.h"
+#include "xml.h"
+
/*
* "capabilities" command
*/
return true;
}
-static const vshCmdDef hostAndHypervisorCmds[] = {
+const vshCmdDef hostAndHypervisorCmds[] = {
{"capabilities", cmdCapabilities, NULL, info_capabilities, 0},
{"connect", cmdConnect, opts_connect, info_connect,
VSH_CMD_FLAG_NOCONNECT},
--- /dev/null
+/*
+ * virsh-host.h: Commands in "Host and Hypervisor" group.
+ *
+ * Copyright (C) 2005, 2007-2012 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ * Daniel Veillard <veillard@redhat.com>
+ * Karel Zak <kzak@redhat.com>
+ * Daniel P. Berrange <berrange@redhat.com>
+ *
+ */
+
+#ifndef VIRSH_HOST_H
+# define VIRSH_HOST_H
+
+# include "virsh.h"
+
+extern const vshCmdDef hostAndHypervisorCmds[];
+
+#endif /* VIRSH_HOST_H */
#include "virsh-domain.h"
#include "virsh-domain-monitor.h"
+#include "virsh-host.h"
static char *progname;
return true;
}
-#include "virsh-host.c"
#include "virsh-interface.c"
#include "virsh-network.c"
#include "virsh-nodedev.c"