[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 15/20] fixup tools/migration: Formatting and style cleanup
Further cleanup. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- tools/libxc/include/xenguest.h | 37 ++++++++++++++++++++----------------- tools/libxc/xc_sr_save.c | 8 ++++---- 2 files changed, 24 insertions(+), 21 deletions(-) diff --git a/tools/libxc/include/xenguest.h b/tools/libxc/include/xenguest.h index 9ba09af743..d81baa6cc2 100644 --- a/tools/libxc/include/xenguest.h +++ b/tools/libxc/include/xenguest.h @@ -55,10 +55,11 @@ typedef int (*precopy_policy_t)(struct precopy_stats, void *); /* callbacks provided by xc_domain_save */ struct save_callbacks { - /* Called after expiration of checkpoint interval, + /* + * Called after expiration of checkpoint interval, * to suspend the guest. */ - int (*suspend)(void* data); + int (*suspend)(void *data); /* * Called before and after every batch of page data sent during @@ -82,7 +83,7 @@ struct save_callbacks { * xc_domain_save then flushes the output buffer, while the * guest continues to run. */ - int (*postcopy)(void* data); + int (*postcopy)(void *data); /* * Called after the memory checkpoint has been flushed @@ -97,7 +98,7 @@ struct save_callbacks { * 0: terminate checkpointing gracefully * 1: take another checkpoint */ - int (*checkpoint)(void* data); + int (*checkpoint)(void *data); /* * Called after the checkpoint callback. @@ -106,13 +107,13 @@ struct save_callbacks { * 0: terminate checkpointing gracefully * 1: take another checkpoint */ - int (*wait_checkpoint)(void* data); + int (*wait_checkpoint)(void *data); /* Enable qemu-dm logging dirty pages to xen */ int (*switch_qemu_logdirty)(uint32_t domid, unsigned enable, void *data); /* HVM only */ /* to be provided as the last argument to each callback function */ - void* data; + void *data; }; /* Type of stream. Plain, or using a continuous replication protocol? */ @@ -134,27 +135,29 @@ typedef enum { */ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t flags /* XCFLAGS_xxx */, - struct save_callbacks* callbacks, int hvm, + struct save_callbacks *callbacks, int hvm, xc_stream_type_t stream_type, int recv_fd); /* callbacks provided by xc_domain_restore */ struct restore_callbacks { - /* Called after a new checkpoint to suspend the guest. - */ - int (*suspend)(void* data); + /* Called after a new checkpoint to suspend the guest. */ + int (*suspend)(void *data); - /* Called after the secondary vm is ready to resume. + /* + * Called after the secondary vm is ready to resume. * Callback function resumes the guest & the device model, * returns to xc_domain_restore. */ - int (*postcopy)(void* data); + int (*postcopy)(void *data); - /* A checkpoint record has been found in the stream. - * returns: */ + /* + * A checkpoint record has been found in the stream. + * returns: + */ #define XGR_CHECKPOINT_ERROR 0 /* Terminate processing */ #define XGR_CHECKPOINT_SUCCESS 1 /* Continue reading more data from the stream */ #define XGR_CHECKPOINT_FAILOVER 2 /* Failover and resume VM */ - int (*checkpoint)(void* data); + int (*checkpoint)(void *data); /* * Called after the checkpoint callback. @@ -163,7 +166,7 @@ struct restore_callbacks { * 0: terminate checkpointing gracefully * 1: take another checkpoint */ - int (*wait_checkpoint)(void* data); + int (*wait_checkpoint)(void *data); /* * callback to send store gfn and console gfn to xl @@ -174,7 +177,7 @@ struct restore_callbacks { void *data); /* to be provided as the last argument to each callback function */ - void* data; + void *data; }; /** diff --git a/tools/libxc/xc_sr_save.c b/tools/libxc/xc_sr_save.c index f24dd0d00b..0e66f31aae 100644 --- a/tools/libxc/xc_sr_save.c +++ b/tools/libxc/xc_sr_save.c @@ -579,7 +579,7 @@ static int send_memory_live(struct xc_sr_context *ctx) static int colo_merge_secondary_dirty_bitmap(struct xc_sr_context *ctx) { xc_interface *xch = ctx->xch; - struct xc_sr_record rec = { 0, 0, NULL }; + struct xc_sr_record rec; uint64_t *pfns = NULL; uint64_t pfn; unsigned int count, i; @@ -593,14 +593,14 @@ static int colo_merge_secondary_dirty_bitmap(struct xc_sr_context *ctx) if ( rec.type != REC_TYPE_CHECKPOINT_DIRTY_PFN_LIST ) { - PERROR("Expect dirty bitmap record, but received %u", rec.type ); + PERROR("Expect dirty bitmap record, but received %u", rec.type); rc = -1; goto err; } if ( rec.length % sizeof(*pfns) ) { - PERROR("Invalid dirty pfn list record length %u", rec.length ); + PERROR("Invalid dirty pfn list record length %u", rec.length); rc = -1; goto err; } @@ -611,7 +611,7 @@ static int colo_merge_secondary_dirty_bitmap(struct xc_sr_context *ctx) for ( i = 0; i < count; i++ ) { pfn = pfns[i]; - if (pfn > ctx->save.p2m_size) + if ( pfn > ctx->save.p2m_size ) { PERROR("Invalid pfn 0x%" PRIx64, pfn); rc = -1; -- 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |