diff --git a/tools/Makefile.am b/tools/Makefile.am index b8858920cca226c4cd1045dde3a75b6d45ce671a..6b066f63bc082a9d2748f1f6630aba1df4006e93 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -107,8 +107,8 @@ virsh_SOURCES = \ console.c console.h \ virsh.c virsh.h \ virsh-domain.c virsh-domain.h \ + virsh-domain-monitor.c virsh-domain-monitor.h \ $(NULL) -# virsh-domain-monitor.c virsh-domain-monitor.h \ # virsh-host.c virsh-host.h \ # virsh-interface.c virsh-interface.h \ # virsh-network.c virsh-network.h \ diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c index 52e44c9275b64332a44fa57c8c8efae23762523e..4f00e658677ae528e910fc6abe88f9b54e63228d 100644 --- a/tools/virsh-domain-monitor.c +++ b/tools/virsh-domain-monitor.c @@ -23,7 +23,20 @@ * */ +#include +#include "virsh-domain-monitor.h" + +#include +#include +#include +#include + +#include "internal.h" +#include "conf/domain_conf.h" #include "intprops.h" +#include "memory.h" +#include "virmacaddr.h" +#include "xml.h" static const char * vshDomainIOErrorToString(int error) @@ -1683,7 +1696,7 @@ cleanup: } #undef FILTER -static const vshCmdDef domMonitoringCmds[] = { +const vshCmdDef domMonitoringCmds[] = { {"domblkerror", cmdDomBlkError, opts_domblkerror, info_domblkerror, 0}, {"domblkinfo", cmdDomblkinfo, opts_domblkinfo, info_domblkinfo, 0}, {"domblklist", cmdDomblklist, opts_domblklist, info_domblklist, 0}, diff --git a/tools/virsh-domain-monitor.h b/tools/virsh-domain-monitor.h new file mode 100644 index 0000000000000000000000000000000000000000..e322006c06d5b7a92f18661f2dd2d5177c1c9ef5 --- /dev/null +++ b/tools/virsh-domain-monitor.h @@ -0,0 +1,37 @@ +/* + * virsh-domain-monitor.h: Commands to monitor domain status + * + * 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 + * . + * + * Daniel Veillard + * Karel Zak + * Daniel P. Berrange + * + */ + +#ifndef VIRSH_DOMAIN_MONITOR_H +# define VIRSH_DOMAIN_MONITOR_H + +# include "virsh.h" + +char *vshGetDomainDescription(vshControl *ctl, virDomainPtr dom, + bool title, unsigned int flags) + ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK; + +extern const vshCmdDef domMonitoringCmds[]; + +#endif /* VIRSH_DOMAIN_MONITOR_H */ diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 94ac1aa886b9ba16c229291f275e271d41f90441..e949dcffabb77c07e6070a55c9cd35d0bbbedf0d 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -48,6 +48,7 @@ #include "virfile.h" #include "virkeycode.h" #include "virmacaddr.h" +#include "virsh-domain-monitor.h" #include "virterror_internal.h" #include "virtypedparam.h" #include "xml.h" diff --git a/tools/virsh.c b/tools/virsh.c index 904ff33ccb0923edad54fd450d20ff6169d27d89..fb1af42b9d75e8041882609323f4c5c618dcf479 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -75,6 +75,7 @@ #include "virtypedparam.h" #include "virsh-domain.h" +#include "virsh-domain-monitor.h" static char *progname; @@ -2861,7 +2862,6 @@ vshParseArgv(vshControl *ctl, int argc, char **argv) return true; } -#include "virsh-domain-monitor.c" #include "virsh-host.c" #include "virsh-interface.c" #include "virsh-network.c" diff --git a/tools/virsh.h b/tools/virsh.h index 764369e982542dc2a8abe54b2bc9a1e9155ff0f7..24d2020f415e89c91c108b004b8513f4521f87d0 100644 --- a/tools/virsh.h +++ b/tools/virsh.h @@ -286,9 +286,6 @@ int vshCommandOptScaledInt(const vshCmd *cmd, const char *name, bool vshCommandOptBool(const vshCmd *cmd, const char *name); const vshCmdOpt *vshCommandOptArgv(const vshCmd *cmd, const vshCmdOpt *opt); -char *vshGetDomainDescription(vshControl *ctl, virDomainPtr dom, - bool title, unsigned int flags) - ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK; # define VSH_BYID (1 << 1) # define VSH_BYUUID (1 << 2)