mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
Show the usage message if invalid arguments are given to xm sysrq.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
This commit is contained in:
1 parent
c7d036be92
commit
9a6d1bcab3
1 file changed
+3
-2
@@ -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)
|
||||