|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] Show the usage message if invalid argumen
# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Node ID 25ece14b6234eda0e32ef0105654ed82380cbafa
# Parent 3e31c5e160cfd01493e3e89256c733dda7efc922
Show the usage message if invalid arguments are given to xm sysrq.
Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
---
tools/python/xen/xm/sysrq.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff -r 3e31c5e160cf -r 25ece14b6234 tools/python/xen/xm/sysrq.py
--- a/tools/python/xen/xm/sysrq.py Wed Sep 13 15:59:14 2006 +0100
+++ b/tools/python/xen/xm/sysrq.py Thu Sep 14 07:55:27 2006 +0100
@@ -24,8 +24,9 @@ def main(argv):
return
# no options for the moment
- if len(args) < 1: opts.err('Missing domain')
- if len(args) < 2: opts.err('Missing sysrq character')
+ if len(args) != 2:
+ opts.usage()
+ sys.exit(1)
dom = args[0]
req = ord(args[1][0])
server.xend.domain.send_sysrq(dom, req)
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] Show the usage message if invalid arguments are given to xm sysrq.,
Xen patchbot-unstable <=
|
|
|
|
|