[libvirt] [PATCH 2/2] qemu: Split out snapshot related functions to qemu_snapshot.c
Eric Blake
eblake at redhat.com
Thu Jan 3 17:51:09 UTC 2013
On 01/03/2013 09:45 AM, Peter Krempa wrote:
> ---
> po/POTFILES.in | 1 +
> src/Makefile.am | 1 +
> src/qemu/qemu_driver.c | 1699 +-------------------------------------------
> src/qemu/qemu_snapshot.c | 1752 ++++++++++++++++++++++++++++++++++++++++++++++
> src/qemu/qemu_snapshot.h | 38 +
> 5 files changed, 1793 insertions(+), 1698 deletions(-)
> create mode 100644 src/qemu/qemu_snapshot.c
> create mode 100644 src/qemu/qemu_snapshot.h
Now that I've seen Dan's arguments against 1/2, I tend to agree that
qemu_util.c doesn't make much sense. But qemu_snapshot.c still makes
sense, so I will still review this one.
> +++ b/src/qemu/qemu_snapshot.c
> @@ -0,0 +1,1752 @@
> +/*
> + * qemu_snapshot.c: QEMU snapshot handling
> + *
> + * Copyright (C) 2013 Red Hat, Inc.
Same comments as in 1/2 about copying over copyright years from the
original location.
> +
> +#include <config.h>
> +
> +#include <sys/types.h>
> +#include <sys/stat.h>
> +#include <fcntl.h>
> +#include <unistd.h>
> +
And same comment about sorting includes.
> +#ifndef __QEMU_SNAPSHOT_H__
> +# define __QEMU_SNAPSHOT_H__
> +
> +# include "qemu_domain.h"
> +
> +virDomainSnapshotPtr qemuDomainSnapshotCreateXML(virDomainPtr domain,
> + const char *xmlDesc,
> + unsigned int flags);
> +
> +int qemuDomainRevertToSnapshot(virDomainSnapshotPtr,
> + unsigned int flags);
> +
> +int qemuDomainSnapshotDelete(virDomainSnapshotPtr snapshot,
> + unsigned int flags);
> +
Interesting subset. Why not move any of these other snapshot-related
driver callbacks? qemuDomainSnapshotGetXMLDesc, qemuDomainSnapshotNum,
qemuDomainSnapshotListNames, qemuDomainListAllSnapshots,
qemuDomainSnapshotNumChildren, qemuDomainSnapshotListChildrenNames,
qemuDomainSnapshotListAllChildren, qemuDomainSnapshotLookupByName,
qemuDomainSnapshotGetParent, qemuDomainSnapshotCurrent,
qemuDomainSnapshotIsCurrent, qemuDomainSnapshotHasMetadata
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130103/5d15a579/attachment-0001.sig>
More information about the libvir-list
mailing list