[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4] tools: set migration constraints from cmdline
On Mon, Feb 04, Ian Campbell wrote: > It just occurred to me, instead of adding lots of individual arguments > perhaps packing them into a (e.g.) libxl_save_properties and adding a > pointer would be a nicer and more extensible (in the future) interface? Something like this (copy&paste from hg diff)? I did not find a way to put also libxl_asyncop_how into libxl_save_properties, the checker complains about missing LIBXL_EXTERNAL_CALLERS_ONLY. Olaf diff -r 6087ff7a1aea tools/libxl/libxl.h --- a/tools/libxl/libxl.h +++ b/tools/libxl/libxl.h @@ -500,18 +500,24 @@ int libxl_domain_create_restore(libxl_ct void libxl_domain_config_init(libxl_domain_config *d_config); void libxl_domain_config_dispose(libxl_domain_config *d_config); +typedef struct { + uint32_t domid; + int fd; + int flags; /* LIBXL_SUSPEND_* */ + int max_iters; + int max_factor; +} libxl_save_properties; + int libxl_domain_suspend_0x040200(libxl_ctx *ctx, uint32_t domid, int fd, - int flags, /* LIBXL_SUSPEND_* */ - const libxl_asyncop_how *ao_how) - LIBXL_EXTERNAL_CALLERS_ONLY; + int flags, /* LIBXL_SUSPEND_* */ + const libxl_asyncop_how *ao_how) + LIBXL_EXTERNAL_CALLERS_ONLY; #ifdef LIBXL_API_VERSION #if LIBXL_API_VERSION == 0x040200 #define libxl_domain_suspend libxl_domain_suspend_0x040200 #endif #else -int libxl_domain_suspend(libxl_ctx *ctx, uint32_t domid, int fd, - int flags, /* LIBXL_SUSPEND_* */ - int max_iters, int max_factor, +int libxl_domain_suspend(libxl_ctx *ctx, const libxl_save_properties *props, const libxl_asyncop_how *ao_how) LIBXL_EXTERNAL_CALLERS_ONLY; #endif _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |