Skip to contentSkip to conversation

Fix stack dump on improper use of domid and domname

PATCH New Dan Smith 1 participant 1 message Nov 3, 2005

lore
Share & tools
lore

Dan Smith

author
#0 lore raw

PATCH 1/1 Fix stack dump on improper use of domid and domname

This is another patch that adds an arg_check() to domid and domname so that we don't dump stack if a user runs either without an argument.

tools/python/xen/xm/main.py +4 -0
diff -r 289b73a5ace7 tools/python/xen/xm/main.py
@@ -464,6 +464,8 @@
     server.xend_domain_set_vcpus(args[0], int(args[1]))
 
 def xm_domid(args):
+    arg_check(args, 1, "domid")
+
     name = args[0]
 
     from xen.xend.XendClient import server
@@ -471,6 +473,8 @@
     print sxp.child_value(dom, 'domid')
     
 def xm_domname(args):
+    arg_check(args, 1, "domname")
+
     name = args[0]
 
     from xen.xend.XendClient import server
Signature · 5 lines
-- 
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: [email protected]

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel