ia64/xen-unstable

changeset 11473:25ece14b6234

Show the usage message if invalid arguments are given to xm sysrq.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
author Ewan Mellor <ewan@xensource.com>
date Thu Sep 14 07:55:27 2006 +0100 (2006-09-14)
parents 3e31c5e160cf
children 2b8dc69744e3
files tools/python/xen/xm/sysrq.py
line diff
     1.1 --- a/tools/python/xen/xm/sysrq.py	Wed Sep 13 15:59:14 2006 +0100
     1.2 +++ b/tools/python/xen/xm/sysrq.py	Thu Sep 14 07:55:27 2006 +0100
     1.3 @@ -24,8 +24,9 @@ def main(argv):
     1.4          return
     1.5          
     1.6      # no options for the moment
     1.7 -    if len(args) < 1: opts.err('Missing domain')
     1.8 -    if len(args) < 2: opts.err('Missing sysrq character')
     1.9 +    if len(args) != 2:
    1.10 +        opts.usage()
    1.11 +        sys.exit(1)
    1.12      dom = args[0]
    1.13      req = ord(args[1][0])
    1.14      server.xend.domain.send_sysrq(dom, req)