WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Show the usage message if invalid argumen

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Show the usage message if invalid arguments are given to xm sysrq.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 14 Sep 2006 08:40:14 +0000
Delivery-date: Thu, 14 Sep 2006 01:40:53 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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 <=