mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 22:03:49 +03:00
virsh: split out virsh-snapshot.c
Almost done with the splits. * tools/virsh-snapshot.h: New file. * tools/Makefile.am (virsh_SOURCES): Build it. * tools/virsh.c: Use new header. * tools/virsh-snapshot.c: Likewise.
This commit is contained in:
parent
9cbb0eda92
commit
c0dbd5f352
@ -115,8 +115,8 @@ virsh_SOURCES = \
|
||||
virsh-nwfilter.c virsh-nwfilter.h \
|
||||
virsh-pool.c virsh-pool.h \
|
||||
virsh-secret.c virsh-secret.h \
|
||||
virsh-snapshot.c virsh-snapshot.h \
|
||||
$(NULL)
|
||||
# virsh-snapshot.c virsh-snapshot.h \
|
||||
# virsh-volume.c virsh-volume.h \
|
||||
#
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* virsh-domain.c: Commands to manage domain snapshot
|
||||
* virsh-snapshot.c: Commands to manage domain snapshot
|
||||
*
|
||||
* Copyright (C) 2005, 2007-2012 Red Hat, Inc.
|
||||
*
|
||||
@ -23,6 +23,23 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include "virsh-snapshot.h"
|
||||
|
||||
#include <assert.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 "virsh-domain.h"
|
||||
#include "xml.h"
|
||||
|
||||
/* Helper for snapshot-create and snapshot-create-as */
|
||||
static bool
|
||||
vshSnapshotCreate(vshControl *ctl, virDomainPtr dom, const char *buffer,
|
||||
@ -1597,7 +1614,7 @@ cleanup:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const vshCmdDef snapshotCmds[] = {
|
||||
const vshCmdDef snapshotCmds[] = {
|
||||
{"snapshot-create", cmdSnapshotCreate, opts_snapshot_create,
|
||||
info_snapshot_create, 0},
|
||||
{"snapshot-create-as", cmdSnapshotCreateAs, opts_snapshot_create_as,
|
||||
|
33
tools/virsh-snapshot.h
Normal file
33
tools/virsh-snapshot.h
Normal file
@ -0,0 +1,33 @@
|
||||
/*
|
||||
* virsh-snapshot.h: Commands to manage domain snapshot
|
||||
*
|
||||
* 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_SNAPSHOT_H
|
||||
# define VIRSH_SNAPSHOT_H
|
||||
|
||||
# include "virsh.h"
|
||||
|
||||
extern const vshCmdDef snapshotCmds[];
|
||||
|
||||
#endif /* VIRSH_SNAPSHOT_H */
|
@ -83,6 +83,7 @@
|
||||
#include "virsh-nwfilter.h"
|
||||
#include "virsh-pool.h"
|
||||
#include "virsh-secret.h"
|
||||
#include "virsh-snapshot.h"
|
||||
|
||||
static char *progname;
|
||||
|
||||
@ -2817,7 +2818,6 @@ vshParseArgv(vshControl *ctl, int argc, char **argv)
|
||||
return true;
|
||||
}
|
||||
|
||||
#include "virsh-snapshot.c"
|
||||
#include "virsh-volume.c"
|
||||
|
||||
static const vshCmdDef virshCmds[] = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user