ia64/xen-unstable

changeset 18516:79459028af39

xm list: Return unique exit code for non-existent domain

This patch will make xm return a exit code of 3 if `xm list
<non_existant_domain>` is done rather than the generic code of 1. I
used 3 because XendClient had a macro setup pointing
ERROR_INVALID_DOMAIN to 3.

From: "Shaun R." <mailinglists@unix-scripts.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Sep 18 10:41:41 2008 +0100 (2008-09-18)
parents 104ceb3de263
children 2e8ad0c35792
files tools/python/xen/xm/main.py
line diff
     1.1 --- a/tools/python/xen/xm/main.py	Thu Sep 18 10:39:53 2008 +0100
     1.2 +++ b/tools/python/xen/xm/main.py	Thu Sep 18 10:41:41 2008 +0100
     1.3 @@ -2926,6 +2926,7 @@ def _run_cmd(cmd, cmd_name, args):
     1.4      except xmlrpclib.Fault, ex:
     1.5          if ex.faultCode == XendClient.ERROR_INVALID_DOMAIN:
     1.6              err("Domain '%s' does not exist." % ex.faultString)
     1.7 +            return False, ex.faultCode
     1.8          else:
     1.9              err(ex.faultString)
    1.10              _usage(cmd_name)