mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-12 15:52:55 +00:00
conf: use typedefs for enums in "src/conf/snapshot_conf.h"
In "src/conf/" there are many enumeration (enum) declarations. Similar to the recent cleanup to "src/util" directory, it's better to use a typedef for variable types, function types and other usages. Other enumeration and folders will be changed to typedef's in the future. Most of the files changed in this commit are related to snapshot (snapshot_conf) enums. Signed-off-by: Julio Faracco <jcfaracco@gmail.com> Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
1ce86e62e1
commit
660d661e85
@ -635,7 +635,7 @@ struct _virDomainDiskDef {
|
||||
int ioeventfd; /* enum virDomainIoEventFd */
|
||||
int event_idx; /* enum virDomainVirtioEventIdx */
|
||||
int copy_on_read; /* enum virDomainDiskCopyOnRead */
|
||||
int snapshot; /* enum virDomainSnapshotLocation, snapshot_conf.h */
|
||||
int snapshot; /* virDomainSnapshotLocation, snapshot_conf.h */
|
||||
int startupPolicy; /* enum virDomainStartupPolicy */
|
||||
bool readonly;
|
||||
bool shared;
|
||||
|
@ -29,20 +29,20 @@
|
||||
|
||||
/* Items related to snapshot state */
|
||||
|
||||
enum virDomainSnapshotLocation {
|
||||
typedef enum {
|
||||
VIR_DOMAIN_SNAPSHOT_LOCATION_DEFAULT = 0,
|
||||
VIR_DOMAIN_SNAPSHOT_LOCATION_NONE,
|
||||
VIR_DOMAIN_SNAPSHOT_LOCATION_INTERNAL,
|
||||
VIR_DOMAIN_SNAPSHOT_LOCATION_EXTERNAL,
|
||||
|
||||
VIR_DOMAIN_SNAPSHOT_LOCATION_LAST
|
||||
};
|
||||
} virDomainSnapshotLocation;
|
||||
|
||||
enum virDomainSnapshotState {
|
||||
typedef enum {
|
||||
/* Inherit the VIR_DOMAIN_* states from virDomainState. */
|
||||
VIR_DOMAIN_DISK_SNAPSHOT = VIR_DOMAIN_LAST,
|
||||
VIR_DOMAIN_SNAPSHOT_STATE_LAST
|
||||
};
|
||||
} virDomainSnapshotState;
|
||||
|
||||
/* Stores disk-snapshot information */
|
||||
typedef struct _virDomainSnapshotDiskDef virDomainSnapshotDiskDef;
|
||||
@ -50,7 +50,7 @@ typedef virDomainSnapshotDiskDef *virDomainSnapshotDiskDefPtr;
|
||||
struct _virDomainSnapshotDiskDef {
|
||||
char *name; /* name matching the <target dev='...' of the domain */
|
||||
int index; /* index within snapshot->dom->disks that matches name */
|
||||
int snapshot; /* enum virDomainSnapshotLocation */
|
||||
int snapshot; /* virDomainSnapshotLocation */
|
||||
|
||||
virStorageSource src; /* new wrapper file when snapshot is external */
|
||||
};
|
||||
@ -64,9 +64,9 @@ struct _virDomainSnapshotDef {
|
||||
char *description;
|
||||
char *parent;
|
||||
long long creationTime; /* in seconds */
|
||||
int state; /* enum virDomainSnapshotState */
|
||||
int state; /* virDomainSnapshotState */
|
||||
|
||||
int memory; /* enum virDomainMemorySnapshot */
|
||||
int memory; /* virDomainMemorySnapshot */
|
||||
char *file; /* memory state file when snapshot is external */
|
||||
|
||||
size_t ndisks; /* should not exceed dom->ndisks */
|
||||
|
Loading…
x
Reference in New Issue
Block a user