On 05/13/2010 02:36 AM, Yang Hongyang wrote:
> If domain id is invalid, find_domain should return error because
> the specified domain does not exist.
>
I think this patch is causing some regressions. For example, I can no
longer rename dom0:
sh-4.0# xl list 0
Name ID Mem VCPUs State Time(s)
(null) 0 3321 4 r-- 741.7
sh-4.0# xl rename 0 dom0
0 is an invalid domain identifier.
I haven't specifically worked out what's failing here...
J
> Signed-off-by: Yang Hongyang <yanghy@xxxxxxxxxxxxxx>
>
> diff -r a49dfaa986b0 tools/libxl/xl_cmdimpl.c
> --- a/tools/libxl/xl_cmdimpl.c Fri May 14 01:27:26 2010 +0800
> +++ b/tools/libxl/xl_cmdimpl.c Fri May 14 01:29:36 2010 +0800
> @@ -137,7 +137,11 @@
> fprintf(stderr, "%s is an invalid domain identifier (rc=%d)\n", p,
> rc);
> exit(2);
> }
> - common_domname = was_name ? p : 0;
> + 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
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|