From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xensource.com
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>,
Ian Jackson <ian.jackson@eu.citrix.com>
Subject: [PATCH] xl: Combine headers into one header file.
Date: Thu, 27 May 2010 16:55:08 +0100 [thread overview]
Message-ID: <1274975721-3777-2-git-send-email-ian.jackson@eu.citrix.com> (raw)
In-Reply-To: <1274975721-3777-1-git-send-email-ian.jackson@eu.citrix.com>
This provides a single place to put declarations of external symbols etc.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
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@cn.fujitsu.com>
+ *
+ * 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@cn.fujitsu.com>
- *
- * 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@cn.fujitsu.com>
- *
- * 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
next prev parent reply other threads:[~2010-05-27 15:55 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-27 15:55 [PATCH 00/14] Logging cleanups, libxc API change Ian Jackson
2010-05-27 15:55 ` Ian Jackson [this message]
2010-05-27 15:55 ` [PATCH] xl: Move "extern" declarations to xl.h Ian Jackson
2010-05-27 15:55 ` [PATCH] stubdom/newlib: Provide correct names for time.h timezone variables Ian Jackson
2010-05-27 15:55 ` [PATCH] libxc: xc_domain_save.c: rename "write_exact" macro Ian Jackson
2010-05-27 15:55 ` [PATCH] libelf: Tidy up logging and remove dependency on stdio Ian Jackson
2010-05-27 15:55 ` [PATCH] xtl: New xentoollog mini-library Ian Jackson
2010-05-27 15:55 ` [PATCH] libxc: eliminate static variables, use xentoollog; API change Ian Jackson
2010-05-27 15:55 ` [PATCH] libxc: Use new DBGPRINTF for a few debugging output messages Ian Jackson
2010-05-27 15:55 ` [PATCH] libxl: Fix up some incorrect printf formats Ian Jackson
2010-05-27 15:55 ` [PATCH] libxl: Use the caller's logger (xentoollog) Ian Jackson
2010-05-27 15:55 ` [PATCH] xl: Allow control of logging level Ian Jackson
2010-05-27 15:55 ` [PATCH] libxc: save/restore error handling fixes Ian Jackson
2010-05-27 15:55 ` [PATCH] libxc: remove \n from strings passed to PERROR Ian Jackson
2010-05-27 15:55 ` [PATCH] xl/libxtl: Remove glitch in xl migrate log output Ian Jackson
2010-05-27 15:58 ` [PATCH 00/14] Logging cleanups, libxc API change Ian Jackson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1274975721-3777-2-git-send-email-ian.jackson@eu.citrix.com \
--to=ian.jackson@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).