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

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

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] unifying error message of migrate and sysrq
From: "Yoshinori Katase" <y_katase@xxxxxxxxxxxxxxxx>
Date: Fri, 13 Jan 2006 16:48:34 +0900
Delivery-date: Fri, 13 Jan 2006 07:54:29 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcYYFcDkK5eM94r4RRGY4WES1+kjrQ==
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)

Attachment: migrate.sysrq.patch
Description: Binary data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>