debuggers.hg

view tools/libxl/libxl_paths.c @ 22855:1d1eec7e1fb4

xl: Perform minimal validation of virtual disk file while parsing config file

This patch performs some very basic validation on the virtual disk
file passed through the config file. This validation ensures that we
don't go too far with the initialization like spawn qemu and more
while there could be some potentially fundamental issues.

[ Patch fixed up to work with PHYSTYPE_EMPTY 22808:6ec61438713a -iwj ]

Signed-off-by: Kamala Narasimhan <kamala.narasimhan@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
author Kamala Narasimhan <kamala.narasimhan@gmail.com>
date Tue Jan 25 18:09:49 2011 +0000 (2011-01-25)
parents 0afdfb8b460f
children
line source
1 /*
2 * Copyright (C) 2010 Citrix Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; version 2.1 only. with the special
7 * exception on linking described in file LICENSE.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
13 */
15 #include "libxl.h"
16 #include "_libxl_paths.h"
18 const char *libxl_sbindir_path(void)
19 {
20 return SBINDIR;
21 }
23 const char *libxl_bindir_path(void)
24 {
25 return BINDIR;
26 }
28 const char *libxl_libexec_path(void)
29 {
30 return LIBEXEC;
31 }
33 const char *libxl_libdir_path(void)
34 {
35 return LIBDIR;
36 }
38 const char *libxl_sharedir_path(void)
39 {
40 return SHAREDIR;
41 }
43 const char *libxl_private_bindir_path(void)
44 {
45 return PRIVATE_BINDIR;
46 }
48 const char *libxl_xenfirmwaredir_path(void)
49 {
50 return XENFIRMWAREDIR;
51 }
53 const char *libxl_xen_config_dir_path(void)
54 {
55 return XEN_CONFIG_DIR;
56 }
58 const char *libxl_xen_script_dir_path(void)
59 {
60 return XEN_SCRIPT_DIR;
61 }
63 const char *libxl_lock_dir_path(void)
64 {
65 return XEN_LOCK_DIR;
66 }