WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] unifying error message of migrate and sysrq

To: "Yoshinori Katase" <y_katase@xxxxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] [PATCH] unifying error message of migrate and sysrq
From: Akio Takebe <takebe_akio@xxxxxxxxxxxxxx>
Date: Sat, 14 Jan 2006 01:49:28 +0900
Delivery-date: Fri, 13 Jan 2006 17:01:31 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20060113074740.80D3D1C004@xxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20060113074740.80D3D1C004@xxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi, Katase

I found mistake in your patch.
>diff -r bfcdf4099d23 tools/python/xen/xm/sysrq.py
>--- a/tools/python/xen/xm/sysrq.py      Thu Jan 12 13:27:55 2006
>+++ b/tools/python/xen/xm/sysrq.py      Fri Jan 13 15:26:14 2006
>@@ -24,8 +24,9 @@
>         return
>
>     # no options for the moment
>-    if len(args) < 1: opts.err('Missing domain')
>-    if len(args) < 2: opts.err('Missing sysrq character')
>+    from xen.xm.main import arg_check
>+    arg_check(args, "migrate", 2)
>+
I think this is arg_check(args, "sysrq", 2).
Am I correct?

Best Regards,

Akio Takebe

>This patch unifys error messag of migrate and sysrq.
>
>Signed-off-by: Yoshinori Katase <y_katase@xxxxxxxxxxxxxxxx>
>Best Regards,
>Yoshinori Katase
>
>diff -r bfcdf4099d23 tools/python/xen/xm/migrate.py
>--- a/tools/python/xen/xm/migrate.py    Thu Jan 12 13:27:55 2006
>+++ b/tools/python/xen/xm/migrate.py    Fri Jan 13 15:26:14 2006
>@@ -56,8 +56,8 @@
>     if opts.vals.help:
>         opts.usage()
>         return
>-    if len(args) != 2:
>-        opts.err('Invalid arguments: ' + str(args))
>+    from xen.xm.main import arg_check
>+    arg_check(args, "migrate", 2)
>     dom = args[0]
>     dst = args[1]
>     server.xend_domain_migrate(dom, dst, opts.vals.live,
>opts.vals.resource, opts.vals.port)
>diff -r bfcdf4099d23 tools/python/xen/xm/sysrq.py
>--- a/tools/python/xen/xm/sysrq.py      Thu Jan 12 13:27:55 2006
>+++ b/tools/python/xen/xm/sysrq.py      Fri Jan 13 15:26:14 2006
>@@ -24,8 +24,9 @@
>         return
>
>     # no options for the moment
>-    if len(args) < 1: opts.err('Missing domain')
>-    if len(args) < 2: opts.err('Missing sysrq character')
>+    from xen.xm.main import arg_check
>+    arg_check(args, "migrate", 2)
>+
>     dom = args[0]
>     req = ord(args[1][0])
>     server.xend_domain_sysrq(dom, req)
>_______________________________________________
>Xen-devel mailing list
>Xen-devel@xxxxxxxxxxxxxxxxxxx
>http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>