[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 01/14] xl: Combine headers into one header file.



This provides a single place to put declarations of external symbols etc.

Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
 tools/libxl/xl.c          |    3 +-
 tools/libxl/xl.h          |   77 +++++++++++++++++++++++++++++++++++++++++++++
 tools/libxl/xl_cmdimpl.c  |    2 +-
 tools/libxl/xl_cmdimpl.h  |   66 --------------------------------------
 tools/libxl/xl_cmdtable.c |    2 +-
 tools/libxl/xl_cmdtable.h |   31 ------------------
 6 files changed, 80 insertions(+), 101 deletions(-)
 create mode 100644 tools/libxl/xl.h
 delete mode 100644 tools/libxl/xl_cmdimpl.h
 delete mode 100644 tools/libxl/xl_cmdtable.h

diff --git a/tools/libxl/xl.c b/tools/libxl/xl.c
index a01bf38..82ab873 100644
--- a/tools/libxl/xl.c
+++ b/tools/libxl/xl.c
@@ -29,8 +29,7 @@
 
 #include "libxl.h"
 #include "libxl_utils.h"
-#include "xl_cmdimpl.h"
-#include "xl_cmdtable.h"
+#include "xl.h"
 
 extern struct libxl_ctx ctx;
 extern int logfile;
diff --git a/tools/libxl/xl.h b/tools/libxl/xl.h
new file mode 100644
index 0000000..faf784a
--- /dev/null
+++ b/tools/libxl/xl.h
@@ -0,0 +1,77 @@
+/*
+ * Author Yang Hongyang <yanghy@xxxxxxxxxxxxxx>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; version 2.1 only. with the special
+ * exception on linking described in file LICENSE.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ */
+
+#ifndef XL_H
+#define XL_H
+
+struct cmd_spec {
+    char *cmd_name;
+    int (*cmd_impl)(int argc, char **argv);
+    char *cmd_desc;
+    char *cmd_usage;
+    char *cmd_option;
+};
+
+int main_vcpulist(int argc, char **argv);
+int main_info(int argc, char **argv);
+int main_cd_eject(int argc, char **argv);
+int main_cd_insert(int argc, char **argv);
+int main_console(int argc, char **argv);
+int main_pcilist(int argc, char **argv);
+int main_pcidetach(int argc, char **argv);
+int main_pciattach(int argc, char **argv);
+int main_restore(int argc, char **argv);
+int main_migrate_receive(int argc, char **argv);
+int main_save(int argc, char **argv);
+int main_migrate(int argc, char **argv);
+int main_pause(int argc, char **argv);
+int main_unpause(int argc, char **argv);
+int main_destroy(int argc, char **argv);
+int main_list(int argc, char **argv);
+int main_list_vm(int argc, char **argv);
+int main_create(int argc, char **argv);
+int main_button_press(int argc, char **argv);
+int main_vcpupin(int argc, char **argv);
+int main_vcpuset(int argc, char **argv);
+int main_memmax(int argc, char **argv);
+int main_memset(int argc, char **argv);
+int main_sched_credit(int argc, char **argv);
+int main_domid(int argc, char **argv);
+int main_domname(int argc, char **argv);
+int main_rename(int argc, char **argv);
+int main_trigger(int argc, char **argv);
+int main_sysrq(int argc, char **argv);
+int main_debug_keys(int argc, char **argv);
+int main_dmesg(int argc, char **argv);
+int main_top(int argc, char **argv);
+int main_networkattach(int argc, char **argv);
+int main_networklist(int argc, char **argv);
+int main_networkdetach(int argc, char **argv);
+int main_blockattach(int argc, char **argv);
+int main_blocklist(int argc, char **argv);
+int main_blockdetach(int argc, char **argv);
+int main_uptime(int argc, char **argv);
+int main_tmem_list(int argc, char **argv);
+int main_tmem_freeze(int argc, char **argv);
+int main_tmem_destroy(int argc, char **argv);
+int main_tmem_thaw(int argc, char **argv);
+int main_tmem_set(int argc, char **argv);
+int main_tmem_shared_auth(int argc, char **argv);
+
+void help(char *command);
+
+extern struct cmd_spec cmd_table[];
+extern int cmdtable_len;
+
+#endif /* XL_H */
diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index 85c6e1b..c79f42d 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -38,7 +38,7 @@
 #include "libxl.h"
 #include "libxl_utils.h"
 #include "libxlutil.h"
-#include "xl_cmdtable.h"
+#include "xl.h"
 
 #define UUID_FMT 
"%02hhx%02hhx%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx"
 
diff --git a/tools/libxl/xl_cmdimpl.h b/tools/libxl/xl_cmdimpl.h
deleted file mode 100644
index e6b4c3b..0000000
--- a/tools/libxl/xl_cmdimpl.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Author Yang Hongyang <yanghy@xxxxxxxxxxxxxx>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation; version 2.1 only. with the special
- * exception on linking described in file LICENSE.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License for more details.
- */
-
-#ifndef XL_CMDIMPL_H
-#define XL_CMDIMPL_H
-
-int main_vcpulist(int argc, char **argv);
-int main_info(int argc, char **argv);
-int main_cd_eject(int argc, char **argv);
-int main_cd_insert(int argc, char **argv);
-int main_console(int argc, char **argv);
-int main_pcilist(int argc, char **argv);
-int main_pcidetach(int argc, char **argv);
-int main_pciattach(int argc, char **argv);
-int main_restore(int argc, char **argv);
-int main_migrate_receive(int argc, char **argv);
-int main_save(int argc, char **argv);
-int main_migrate(int argc, char **argv);
-int main_pause(int argc, char **argv);
-int main_unpause(int argc, char **argv);
-int main_destroy(int argc, char **argv);
-int main_list(int argc, char **argv);
-int main_list_vm(int argc, char **argv);
-int main_create(int argc, char **argv);
-int main_button_press(int argc, char **argv);
-int main_vcpupin(int argc, char **argv);
-int main_vcpuset(int argc, char **argv);
-int main_memmax(int argc, char **argv);
-int main_memset(int argc, char **argv);
-int main_sched_credit(int argc, char **argv);
-int main_domid(int argc, char **argv);
-int main_domname(int argc, char **argv);
-int main_rename(int argc, char **argv);
-int main_trigger(int argc, char **argv);
-int main_sysrq(int argc, char **argv);
-int main_debug_keys(int argc, char **argv);
-int main_dmesg(int argc, char **argv);
-int main_top(int argc, char **argv);
-int main_networkattach(int argc, char **argv);
-int main_networklist(int argc, char **argv);
-int main_networkdetach(int argc, char **argv);
-int main_blockattach(int argc, char **argv);
-int main_blocklist(int argc, char **argv);
-int main_blockdetach(int argc, char **argv);
-int main_uptime(int argc, char **argv);
-int main_tmem_list(int argc, char **argv);
-int main_tmem_freeze(int argc, char **argv);
-int main_tmem_destroy(int argc, char **argv);
-int main_tmem_thaw(int argc, char **argv);
-int main_tmem_set(int argc, char **argv);
-int main_tmem_shared_auth(int argc, char **argv);
-
-void help(char *command);
-
-#endif /* XL_CMDIMPL_H */
diff --git a/tools/libxl/xl_cmdtable.c b/tools/libxl/xl_cmdtable.c
index feda1f9..accc4f9 100644
--- a/tools/libxl/xl_cmdtable.c
+++ b/tools/libxl/xl_cmdtable.c
@@ -12,7 +12,7 @@
  * GNU Lesser General Public License for more details.
  */
 
-#include "xl_cmdtable.h"
+#include "xl.h"
 
 struct cmd_spec cmd_table[] = {
     { "create",
diff --git a/tools/libxl/xl_cmdtable.h b/tools/libxl/xl_cmdtable.h
deleted file mode 100644
index 90d1058..0000000
--- a/tools/libxl/xl_cmdtable.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Author Yang Hongyang <yanghy@xxxxxxxxxxxxxx>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation; version 2.1 only. with the special
- * exception on linking described in file LICENSE.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License for more details.
- */
-
-#ifndef XL_CMDTABLE_H
-#define XL_CMDTABLE_H
-
-#include "xl_cmdimpl.h"
-
-struct cmd_spec {
-    char *cmd_name;
-    int (*cmd_impl)(int argc, char **argv);
-    char *cmd_desc;
-    char *cmd_usage;
-    char *cmd_option;
-};
-
-extern struct cmd_spec cmd_table[];
-extern int cmdtable_len;
-
-#endif /* XL_CMDTABLE_H */
-- 
1.5.6.5


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.