* [PATCH][TOOLS] blktap: remove unused headers
@ 2007-11-30 12:35 Christoph Egger
0 siblings, 0 replies; only message in thread
From: Christoph Egger @ 2007-11-30 12:35 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Type: text/plain, Size: 678 bytes --]
Hi!
Attached patch removes unused linux specific headers
and makes bswap.h ready for BSD support.
This is first step for BSD support in blktap. More to come.
No functional change.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
--
AMD Saxony, Dresden, Germany
Operating System Research Center
Legal Information:
AMD Saxony Limited Liability Company & Co. KG
Sitz (Geschäftsanschrift):
Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland
Registergericht Dresden: HRA 4896
vertretungsberechtigter Komplementär:
AMD Saxony LLC (Sitz Wilmington, Delaware, USA)
Geschäftsführer der AMD Saxony LLC:
Dr. Hans-R. Deppe, Thomas McCoy
[-- Attachment #2: tools_blktap_headers.diff --]
[-- Type: text/plain, Size: 2525 bytes --]
diff -r 3057f813da14 tools/blktap/drivers/blktapctrl.c
--- a/tools/blktap/drivers/blktapctrl.c Thu Nov 29 19:30:33 2007 +0000
+++ b/tools/blktap/drivers/blktapctrl.c Fri Nov 30 15:34:58 2007 +0100
@@ -41,7 +41,6 @@
#include <err.h>
#include <errno.h>
#include <sys/types.h>
-#include <linux/types.h>
#include <sys/wait.h>
#include <signal.h>
#include <fcntl.h>
@@ -50,7 +49,6 @@
#include <string.h>
#include <unistd.h>
#include <xs.h>
-#include <printf.h>
#include <sys/time.h>
#include <syslog.h>
diff -r 3057f813da14 tools/blktap/drivers/bswap.h
--- a/tools/blktap/drivers/bswap.h Thu Nov 29 19:30:33 2007 +0000
+++ b/tools/blktap/drivers/bswap.h Fri Nov 30 15:34:58 2007 +0100
@@ -4,6 +4,11 @@
//#include "config-host.h"
#include <inttypes.h>
+
+#if defined(__NetBSD__) || defined(__OpenBSD__)
+#include <sys/endian.h>
+#include <sys/types.h>
+#else
#ifdef HAVE_BYTESWAP_H
#include <byteswap.h>
@@ -73,6 +78,8 @@ static inline void bswap64s(uint64_t *s)
*s = bswap64(*s);
}
+#endif
+
#if defined(WORDS_BIGENDIAN)
#define be_bswap(v, size) (v)
#define le_bswap(v, size) bswap ## size(v)
diff -r 3057f813da14 tools/blktap/drivers/qcow-create.c
--- a/tools/blktap/drivers/qcow-create.c Thu Nov 29 19:30:33 2007 +0000
+++ b/tools/blktap/drivers/qcow-create.c Fri Nov 30 15:34:58 2007 +0100
@@ -37,7 +37,6 @@
#include <sys/statvfs.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
-#include <linux/fs.h>
#include <string.h>
#include "tapdisk.h"
diff -r 3057f813da14 tools/blktap/drivers/tapdisk.c
--- a/tools/blktap/drivers/tapdisk.c Thu Nov 29 19:30:33 2007 +0000
+++ b/tools/blktap/drivers/tapdisk.c Fri Nov 30 15:34:58 2007 +0100
@@ -27,7 +27,6 @@
#include <poll.h>
#include <sys/statvfs.h>
#include <sys/ioctl.h>
-#include <linux/fs.h>
#include "blktaplib.h"
#include "tapdisk.h"
diff -r 3057f813da14 tools/blktap/lib/xenbus.c
--- a/tools/blktap/lib/xenbus.c Thu Nov 29 19:30:33 2007 +0000
+++ b/tools/blktap/lib/xenbus.c Fri Nov 30 15:34:58 2007 +0100
@@ -37,7 +37,6 @@
#include <stdio.h>
#include <stdlib.h>
-#include <printf.h>
#include <string.h>
#include <err.h>
#include <stdarg.h>
diff -r 3057f813da14 tools/blktap/lib/xs_api.c
--- a/tools/blktap/lib/xs_api.c Thu Nov 29 19:30:33 2007 +0000
+++ b/tools/blktap/lib/xs_api.c Fri Nov 30 15:34:58 2007 +0100
@@ -34,7 +34,6 @@
#include <stdio.h>
#include <stdlib.h>
-#include <printf.h>
#include <string.h>
#include <err.h>
#include <stdarg.h>
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-11-30 12:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-30 12:35 [PATCH][TOOLS] blktap: remove unused headers Christoph Egger
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.