[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.