debuggers.hg

view tools/libxl/xl.h @ 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 26d58b44cd27
children
line source
1 /*
2 * Author Yang Hongyang <yanghy@cn.fujitsu.com>
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 #ifndef XL_H
16 #define XL_H
18 #include "xentoollog.h"
20 struct cmd_spec {
21 char *cmd_name;
22 int (*cmd_impl)(int argc, char **argv);
23 char *cmd_desc;
24 char *cmd_usage;
25 char *cmd_option;
26 };
28 int main_vcpulist(int argc, char **argv);
29 int main_info(int argc, char **argv);
30 int main_cd_eject(int argc, char **argv);
31 int main_cd_insert(int argc, char **argv);
32 int main_console(int argc, char **argv);
33 int main_vncviewer(int argc, char **argv);
34 int main_pcilist(int argc, char **argv);
35 int main_pcilist_assignable(int argc, char **argv);
36 int main_pcidetach(int argc, char **argv);
37 int main_pciattach(int argc, char **argv);
38 int main_restore(int argc, char **argv);
39 int main_migrate_receive(int argc, char **argv);
40 int main_save(int argc, char **argv);
41 int main_migrate(int argc, char **argv);
42 int main_dump_core(int argc, char **argv);
43 int main_pause(int argc, char **argv);
44 int main_unpause(int argc, char **argv);
45 int main_destroy(int argc, char **argv);
46 int main_shutdown(int argc, char **argv);
47 int main_reboot(int argc, char **argv);
48 int main_list(int argc, char **argv);
49 int main_list_vm(int argc, char **argv);
50 int main_create(int argc, char **argv);
51 int main_button_press(int argc, char **argv);
52 int main_vcpupin(int argc, char **argv);
53 int main_vcpuset(int argc, char **argv);
54 int main_memmax(int argc, char **argv);
55 int main_memset(int argc, char **argv);
56 int main_sched_credit(int argc, char **argv);
57 int main_domid(int argc, char **argv);
58 int main_domname(int argc, char **argv);
59 int main_rename(int argc, char **argv);
60 int main_trigger(int argc, char **argv);
61 int main_sysrq(int argc, char **argv);
62 int main_debug_keys(int argc, char **argv);
63 int main_dmesg(int argc, char **argv);
64 int main_top(int argc, char **argv);
65 int main_networkattach(int argc, char **argv);
66 int main_networklist(int argc, char **argv);
67 int main_networkdetach(int argc, char **argv);
68 int main_blockattach(int argc, char **argv);
69 int main_blocklist(int argc, char **argv);
70 int main_blockdetach(int argc, char **argv);
71 int main_uptime(int argc, char **argv);
72 int main_tmem_list(int argc, char **argv);
73 int main_tmem_freeze(int argc, char **argv);
74 int main_tmem_destroy(int argc, char **argv);
75 int main_tmem_thaw(int argc, char **argv);
76 int main_tmem_set(int argc, char **argv);
77 int main_tmem_shared_auth(int argc, char **argv);
78 int main_tmem_freeable(int argc, char **argv);
79 int main_network2attach(int argc, char **argv);
80 int main_network2list(int argc, char **argv);
81 int main_network2detach(int argc, char **argv);
82 int main_cpupoolcreate(int argc, char **argv);
83 int main_cpupoollist(int argc, char **argv);
84 int main_cpupooldestroy(int argc, char **argv);
85 int main_cpupoolrename(int argc, char **argv);
86 int main_cpupoolcpuadd(int argc, char **argv);
87 int main_cpupoolcpuremove(int argc, char **argv);
88 int main_cpupoolmigrate(int argc, char **argv);
89 int main_cpupoolnumasplit(int argc, char **argv);
91 void help(const char *command);
93 extern struct cmd_spec cmd_table[];
94 extern int cmdtable_len;
95 /* Look up a command in the table, allowing unambiguous truncation */
96 struct cmd_spec *cmdtable_lookup(const char *s);
98 extern libxl_ctx ctx;
99 extern xentoollog_logger_stdiostream *logger;
101 /* global options */
102 extern int autoballoon;
103 extern char *lockfile;
105 #endif /* XL_H */