aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.rootkeys2
-rw-r--r--tools/libxc/Makefile1
-rw-r--r--tools/libxc/xc_io.c43
-rw-r--r--tools/libxc/xc_io.h71
-rw-r--r--tools/libxc/xc_vmx_build.c1
5 files changed, 1 insertions, 117 deletions
diff --git a/.rootkeys b/.rootkeys
index 720c76406e..3526ae3342 100644
--- a/.rootkeys
+++ b/.rootkeys
@@ -686,8 +686,6 @@
40278d99BLsfUv3qxv0I8C1sClZ0ow tools/libxc/xc_elf.h
403e0977Bjsm_e82pwvl9VvaJxh8Gg tools/libxc/xc_evtchn.c
4227c129ZKjJPNYooHVzBCyinf7Y6Q tools/libxc/xc_gnttab.c
-40e03333Eegw8czSWvHsbKxrRZJjRA tools/libxc/xc_io.c
-40e03333vrWGbLAhyJjXlqCHaJt7eA tools/libxc/xc_io.h
3fbba6dbNCU7U6nsMYiXzKkp3ztaJg tools/libxc/xc_linux_build.c
3fbba6dbl267zZOAVHYLOdLCdhcZMw tools/libxc/xc_linux_restore.c
3fbba6db7li3FJiABYtCmuGxOJxEGw tools/libxc/xc_linux_save.c
diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile
index 041bf44423..e5db1adcf6 100644
--- a/tools/libxc/Makefile
+++ b/tools/libxc/Makefile
@@ -22,7 +22,6 @@ SRCS += xc_core.c
SRCS += xc_domain.c
SRCS += xc_evtchn.c
SRCS += xc_gnttab.c
-SRCS += xc_io.c
SRCS += xc_linux_build.c
SRCS += xc_plan9_build.c
SRCS += xc_linux_restore.c
diff --git a/tools/libxc/xc_io.c b/tools/libxc/xc_io.c
deleted file mode 100644
index 5589483f10..0000000000
--- a/tools/libxc/xc_io.c
+++ /dev/null
@@ -1,43 +0,0 @@
-#include "xc_io.h"
-#include <sys/time.h>
-
-void xcio_timestamp(XcIOContext *ctxt, const char *msg){
- struct timeval tv;
-
- gettimeofday(&tv, NULL);
- if (msg[0] != '\b' && msg[0] != '\r')
- fprintf(stdout, "[%08ld.%06ld] ", tv.tv_sec, tv.tv_usec);
-}
-
-void xcio_error(XcIOContext *ctxt, const char *msg, ...){
- va_list args;
-
- va_start(args, msg);
- vfprintf(stdout, msg, args); fprintf(stdout, "\n"); fflush(stdout);
- IOStream_vprint(ctxt->info, msg, args);
- IOStream_print(ctxt->info, "\n");
- va_end(args);
-}
-
-void xcio_info(XcIOContext *ctxt, const char *msg, ...){
- va_list args;
-
- if(0 && !(ctxt->flags & XCFLAGS_VERBOSE)) return;
- va_start(args, msg);
- xcio_timestamp(ctxt, msg);
- vfprintf(stdout, msg, args); fprintf(stdout, "\n");
- IOStream_vprint(ctxt->info, msg, args);
- fflush(stdout);
- va_end(args);
-}
-
-void xcio_debug(XcIOContext *ctxt, const char *msg, ...){
- va_list args;
-
- if(0 && !(ctxt->flags & XCFLAGS_DEBUG)) return;
- va_start(args, msg);
- xcio_timestamp(ctxt, msg);
- vfprintf(stdout, msg, args); fprintf(stdout, "\n");
- IOStream_vprint(ctxt->info, msg, args);
- va_end(args);
-}
diff --git a/tools/libxc/xc_io.h b/tools/libxc/xc_io.h
deleted file mode 100644
index 4325473518..0000000000
--- a/tools/libxc/xc_io.h
+++ /dev/null
@@ -1,71 +0,0 @@
-#ifndef __XC_XC_IO_H__
-#define __XC_XC_IO_H__
-
-#include <errno.h>
-#include "xc_private.h"
-#include "iostream.h"
-
-typedef struct XcIOContext {
- u32 domain;
- unsigned flags;
- int resource;
- IOStream *io;
- IOStream *info;
- IOStream *err;
- char *vmconfig;
- int vmconfig_n;
- int (*suspend)(void *data, u32 domain);
- int (*configure)(void *data, u32 domain, char *vmconfig, int vmconfig_n);
- void *data;
-} XcIOContext;
-
-static inline int xcio_suspend_domain(XcIOContext *ctxt){
- int err = 0;
-
- if(ctxt->suspend){
- err = ctxt->suspend(ctxt->data, ctxt->domain);
- } else {
- err = -EINVAL;
- }
- return err;
-}
-
-static inline int xcio_configure_domain(XcIOContext *ctxt){
- int err = 0;
-
- if(ctxt->configure){
- err = ctxt->configure(ctxt->data, ctxt->domain, ctxt->vmconfig, ctxt->vmconfig_n);
- } else {
- err = -EINVAL;
- }
- return err;
-}
-
-static inline int xcio_read(XcIOContext *ctxt, void *buf, int n){
- int rc;
-
- rc = IOStream_read(ctxt->io, buf, n);
- return (rc == n ? 0 : -1);
-}
-
-static inline int xcio_write(XcIOContext *ctxt, void *buf, int n){
- int rc;
-
- rc = IOStream_write(ctxt->io, buf, n);
- return (rc == n ? 0 : -1);
-}
-
-static inline int xcio_flush(XcIOContext *ctxt){
- return IOStream_flush(ctxt->io);
-}
-
-extern void xcio_error(XcIOContext *ctxt, const char *msg, ...);
-extern void xcio_info(XcIOContext *ctxt, const char *msg, ...);
-
-#define xcio_perror(_ctxt, _msg...) \
-xcio_error(_ctxt, "(errno %d %s)" _msg, errno, strerror(errno), ## _msg)
-
-#endif /* ! __XC_XC_IO_H__ */
-
-
-
diff --git a/tools/libxc/xc_vmx_build.c b/tools/libxc/xc_vmx_build.c
index 31319db21a..360f375744 100644
--- a/tools/libxc/xc_vmx_build.c
+++ b/tools/libxc/xc_vmx_build.c
@@ -2,6 +2,7 @@
* xc_vmx_build.c
*/
+#include <stddef.h>
#include "xc_private.h"
#define ELFSIZE 32
#include "xc_elf.h"