ia64/xen-unstable

changeset 16513:b1da8762f853

blktap: remove unused headers.

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>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Dec 04 10:48:28 2007 +0000 (2007-12-04)
parents 9ce9d43a76a2
children ebfb3b26010d
files tools/blktap/drivers/blktapctrl.c tools/blktap/drivers/bswap.h tools/blktap/drivers/qcow-create.c tools/blktap/drivers/tapdisk.c tools/blktap/lib/xenbus.c tools/blktap/lib/xs_api.c
line diff
     1.1 --- a/tools/blktap/drivers/blktapctrl.c	Tue Dec 04 10:47:10 2007 +0000
     1.2 +++ b/tools/blktap/drivers/blktapctrl.c	Tue Dec 04 10:48:28 2007 +0000
     1.3 @@ -41,7 +41,6 @@
     1.4  #include <err.h>
     1.5  #include <errno.h>
     1.6  #include <sys/types.h>
     1.7 -#include <linux/types.h>
     1.8  #include <sys/wait.h>
     1.9  #include <signal.h>
    1.10  #include <fcntl.h>
    1.11 @@ -50,7 +49,6 @@
    1.12  #include <string.h>
    1.13  #include <unistd.h>
    1.14  #include <xs.h>
    1.15 -#include <printf.h>
    1.16  #include <sys/time.h>
    1.17  #include <syslog.h>
    1.18                                                                       
     2.1 --- a/tools/blktap/drivers/bswap.h	Tue Dec 04 10:47:10 2007 +0000
     2.2 +++ b/tools/blktap/drivers/bswap.h	Tue Dec 04 10:48:28 2007 +0000
     2.3 @@ -5,6 +5,11 @@
     2.4  
     2.5  #include <inttypes.h>
     2.6  
     2.7 +#if defined(__NetBSD__) || defined(__OpenBSD__)
     2.8 +#include <sys/endian.h>
     2.9 +#include <sys/types.h>
    2.10 +#else
    2.11 +
    2.12  #ifdef HAVE_BYTESWAP_H
    2.13  #include <byteswap.h>
    2.14  #else
    2.15 @@ -73,6 +78,8 @@ static inline void bswap64s(uint64_t *s)
    2.16      *s = bswap64(*s);
    2.17  }
    2.18  
    2.19 +#endif
    2.20 +
    2.21  #if defined(WORDS_BIGENDIAN)
    2.22  #define be_bswap(v, size) (v)
    2.23  #define le_bswap(v, size) bswap ## size(v)
     3.1 --- a/tools/blktap/drivers/qcow-create.c	Tue Dec 04 10:47:10 2007 +0000
     3.2 +++ b/tools/blktap/drivers/qcow-create.c	Tue Dec 04 10:48:28 2007 +0000
     3.3 @@ -37,7 +37,6 @@
     3.4  #include <sys/statvfs.h>
     3.5  #include <sys/stat.h>
     3.6  #include <sys/ioctl.h>
     3.7 -#include <linux/fs.h>
     3.8  #include <string.h>
     3.9  #include "tapdisk.h"
    3.10  
     4.1 --- a/tools/blktap/drivers/tapdisk.c	Tue Dec 04 10:47:10 2007 +0000
     4.2 +++ b/tools/blktap/drivers/tapdisk.c	Tue Dec 04 10:48:28 2007 +0000
     4.3 @@ -27,7 +27,6 @@
     4.4  #include <poll.h>
     4.5  #include <sys/statvfs.h>
     4.6  #include <sys/ioctl.h>
     4.7 -#include <linux/fs.h>
     4.8  #include "blktaplib.h"
     4.9  #include "tapdisk.h"
    4.10  
     5.1 --- a/tools/blktap/lib/xenbus.c	Tue Dec 04 10:47:10 2007 +0000
     5.2 +++ b/tools/blktap/lib/xenbus.c	Tue Dec 04 10:48:28 2007 +0000
     5.3 @@ -37,7 +37,6 @@
     5.4  
     5.5  #include <stdio.h>
     5.6  #include <stdlib.h>
     5.7 -#include <printf.h>
     5.8  #include <string.h>
     5.9  #include <err.h>
    5.10  #include <stdarg.h>
     6.1 --- a/tools/blktap/lib/xs_api.c	Tue Dec 04 10:47:10 2007 +0000
     6.2 +++ b/tools/blktap/lib/xs_api.c	Tue Dec 04 10:48:28 2007 +0000
     6.3 @@ -34,7 +34,6 @@
     6.4  
     6.5  #include <stdio.h>
     6.6  #include <stdlib.h>
     6.7 -#include <printf.h>
     6.8  #include <string.h>
     6.9  #include <err.h>
    6.10  #include <stdarg.h>