Skip to contentSkip to conversation

xl: allow nameless domains to be named

PATCH In review Jeremy Fitzhardinge 2 participants 2 messages May 25, 2010 – May 26, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

tools/libxl/xl_cmdimpl.c +0 -4
diff -r ba7fdd53f44c tools/libxl/xl_cmdimpl.c
@@ -138,10 +138,6 @@
         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)
Acked-by on v1 1/1
#1 lore raw

Hi jeremy,

Quoted 5 lines · Jeremy Fitzhardinge

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.

Thank you, for now, remove the check seems to be the solution.

Quoted 2 lines
Quoted 24 lines

diff -r ba7fdd53f44c tools/libxl/xl_cmdimpl.c

tools/libxl/xl_cmdimpl.c +0 -4
@@ -138,10 +138,6 @@
         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)

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Signature · 2 lines
Regards
Yang Hongyang