Yoshinori Katase
2006-Jan-13 07:48 UTC
[Xen-devel] [PATCH] unifying error message of migrate and sysrq
This patch unifys error messag of migrate and sysrq. Signed-off-by: Yoshinori Katase <y_katase@soft.fujitsu.com> 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@lists.xensource.com http://lists.xensource.com/xen-devel
Akio Takebe
2006-Jan-13 16:49 UTC
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@soft.fujitsu.com> >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@lists.xensource.com >http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Yoshinori Katase
2006-Jan-16 00:03 UTC
RE: [Xen-devel] [PATCH] unifying error message of migrate and sysrq
Hi,Takebe Yes,you''re right.Please replace it this. # I have sent a reviced mail to myself !! (><) Best Regards, Yoshinori Katase -----Original Message----- From: Akio Takebe [mailto:takebe_akio@jp.fujitsu.com] Sent: Saturday, January 14, 2006 1:49 AM To: Yoshinori Katase; xen-devel@lists.xensource.com Subject: 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@soft.fujitsu.com> 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@lists.xensource.com >http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Possibly Parallel Threads
- [PATCH] symmetricalization of system info command xm info, top, dmesg and log
- [PATCH] Fix error(help) messages in main.py and shutdown.py
- bug report of xm list and xm vcpu-list
- [Patch] Enable "sysrq c" handler for domU coredump
- [PATCH] fix uncheck memory allocations