From: Keir Fraser Date: Wed, 26 May 2010 07:12:15 +0000 (+0100) Subject: xl: allow nameless domains to be named X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~12086 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=961652b3bd19c9417a87c54a883f5fa7e9805d0a;p=xen.git xl: allow nameless domains to be named At present, find_domain() will exit(2) if you specify a domain by number, but that domain doesn't have a corresponding name. However, nothing seem to critically depend on common_domname being set, and the test prevents dom0 or other nameless domains from being named. So just remove the check. Signed-off-by: Jeremy Fitzhardinge Acked-by: Yang Hongyang --- diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index a790401923..729d5c998b 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -138,10 +138,6 @@ static void find_domain(const char *p) exit(2); } common_domname = was_name ? p : libxl_domid_to_name(&ctx, domid); - if (!common_domname) { - fprintf(stderr, "%s is an invalid domain identifier.\n", p); - exit(2); - } } #define LOG(_f, _a...) dolog(__FILE__, __LINE__, __func__, _f "\n", ##_a)