Message ID | 20200221112049.3077-3-pdurrant@amazon.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | xl/libxl: domid allocation/preservation changes | expand |
On Fri, Feb 21, 2020 at 11:20:45AM +0000, Paul Durrant wrote: > Some code-paths use values other than INVALID_DOMID to indicate an invalid > domain id. Specifically, xl will pass a value of 0 when creating/restoring > a domain. Therefore modify libxl__logv() to use libxl_domid_valid_guest() > as a validity test. > > Signed-off-by: Paul Durrant <pdurrant@amazon.com> > Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> This patch is now in staging. Wei.
diff --git a/tools/libxl/libxl_internal.c b/tools/libxl/libxl_internal.c index bbd4c6cba9..d93a75533f 100644 --- a/tools/libxl/libxl_internal.c +++ b/tools/libxl/libxl_internal.c @@ -234,7 +234,7 @@ void libxl__logv(libxl_ctx *ctx, xentoollog_level msglevel, int errnoval, fileline[sizeof(fileline)-1] = 0; domain[0] = 0; - if (domid != INVALID_DOMID) + if (libxl_domid_valid_guest(domid)) snprintf(domain, sizeof(domain), "Domain %"PRIu32":", domid); x: xtl_log(ctx->lg, msglevel, errnoval, "libxl",