mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00:00
virsh: split out virsh-host.c
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.
This commit is contained in:
parent
99ae57f841
commit
ae8e89fb12
@ -108,8 +108,8 @@ virsh_SOURCES = \
|
|||||||
virsh.c virsh.h \
|
virsh.c virsh.h \
|
||||||
virsh-domain.c virsh-domain.h \
|
virsh-domain.c virsh-domain.h \
|
||||||
virsh-domain-monitor.c virsh-domain-monitor.h \
|
virsh-domain-monitor.c virsh-domain-monitor.h \
|
||||||
|
virsh-host.c virsh-host.h \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
# virsh-host.c virsh-host.h \
|
|
||||||
# virsh-interface.c virsh-interface.h \
|
# virsh-interface.c virsh-interface.h \
|
||||||
# virsh-network.c virsh-network.h \
|
# virsh-network.c virsh-network.h \
|
||||||
# virsh-nodedev.c virsh-nodedev.h \
|
# virsh-nodedev.c virsh-nodedev.h \
|
||||||
|
@ -23,6 +23,20 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#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
|
* "capabilities" command
|
||||||
*/
|
*/
|
||||||
@ -819,7 +833,7 @@ cmdVersion(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const vshCmdDef hostAndHypervisorCmds[] = {
|
const vshCmdDef hostAndHypervisorCmds[] = {
|
||||||
{"capabilities", cmdCapabilities, NULL, info_capabilities, 0},
|
{"capabilities", cmdCapabilities, NULL, info_capabilities, 0},
|
||||||
{"connect", cmdConnect, opts_connect, info_connect,
|
{"connect", cmdConnect, opts_connect, info_connect,
|
||||||
VSH_CMD_FLAG_NOCONNECT},
|
VSH_CMD_FLAG_NOCONNECT},
|
||||||
|
33
tools/virsh-host.h
Normal file
33
tools/virsh-host.h
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
/*
|
||||||
|
* 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 */
|
@ -76,6 +76,7 @@
|
|||||||
|
|
||||||
#include "virsh-domain.h"
|
#include "virsh-domain.h"
|
||||||
#include "virsh-domain-monitor.h"
|
#include "virsh-domain-monitor.h"
|
||||||
|
#include "virsh-host.h"
|
||||||
|
|
||||||
static char *progname;
|
static char *progname;
|
||||||
|
|
||||||
@ -2862,7 +2863,6 @@ vshParseArgv(vshControl *ctl, int argc, char **argv)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "virsh-host.c"
|
|
||||||
#include "virsh-interface.c"
|
#include "virsh-interface.c"
|
||||||
#include "virsh-network.c"
|
#include "virsh-network.c"
|
||||||
#include "virsh-nodedev.c"
|
#include "virsh-nodedev.c"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user