[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v5 RFC 09/14] tools/libxc: x86 PV restore code
On 11/06/14 19:14, Andrew Cooper wrote: > --- /dev/null > +++ b/tools/libxc/saverestore/restore_x86_pv.c ... > +static int x86_pv_process_record(struct context *ctx, struct record *rec) > +{ > + xc_interface *xch = ctx->xch; > + > + switch ( rec->type ) > + { > + case REC_TYPE_X86_PV_INFO: > + return handle_x86_pv_info(ctx, rec); > + ... > + > + case REC_TYPE_X86_PV_VCPU_MSRS: > + return handle_x86_pv_vcpu_msrs(ctx, rec); > + > + default: > + if ( rec->type & REC_TYPE_OPTIONAL ) > + { > + IPRINTF("Ignoring optional record (0x%"PRIx32", %s)", > + rec->type, rec_type_to_str(rec->type)); > + return 0; > + } > + > + ERROR("Invalid record type (0x%"PRIx32", %s) for x86_pv domains", > + rec->type, rec_type_to_str(rec->type)); > + return -1; > + } I think this default case can be moved to common code. Perhaps return XC_SR_RECORD_UNHANDLED (== 1) to indicate the record wasn't handled. David _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |