direct-io.hg
changeset 7067:fa4cc3f53c64
This patch adds a quick check to 'xm restore' that checks the
existence and readability of the file given.
This fixes the issue detected in xm-tests 03_restore_badparm_neg and
04_restore_badfilename_neg.
Signed-off-by: Dan Smith <danms@us.ibm.com>
Signed-off-by: Ewan Mellor <ewan@xensource.com>
existence and readability of the file given.
This fixes the issue detected in xm-tests 03_restore_badparm_neg and
04_restore_badfilename_neg.
Signed-off-by: Dan Smith <danms@us.ibm.com>
Signed-off-by: Ewan Mellor <ewan@xensource.com>
author | emellor@ewan |
---|---|
date | Tue Sep 27 15:10:38 2005 +0100 (2005-09-27) |
parents | c9d690c52afc |
children | a172340ae3f3 |
files | tools/python/xen/xm/main.py |
line diff
1.1 --- a/tools/python/xen/xm/main.py Tue Sep 27 15:06:40 2005 +0100 1.2 +++ b/tools/python/xen/xm/main.py Tue Sep 27 15:10:38 2005 +0100 1.3 @@ -188,6 +188,10 @@ def xm_restore(args): 1.4 1.5 savefile = os.path.abspath(args[0]) 1.6 1.7 + if not os.access(savefile, os.R_OK): 1.8 + err("xm restore: Unable to read file %s" % savefile) 1.9 + sys.exit(1) 1.10 + 1.11 from xen.xend.XendClient import server 1.12 info = server.xend_domain_restore(savefile) 1.13 PrettyPrint.prettyprint(info)