# HG changeset patch # User Daniel Stodden # Date 1275947595 25200 # Node ID d8393489b4c4d93944203f62578f8cf2721ce961 # Parent 5f2119204138ad484ad7ffe0a8eff5c0d70d3f52 blktap2: Fix E/DPRINTF defs all around the driver/ subdir. This is just to avoid macro madness among subdirs sharing blktaplib.h. Signed-off-by: Daniel Stodden Signed-off-by: Jake Wires diff -r 5f2119204138 -r d8393489b4c4 tools/blktap2/drivers/block-remus.c --- a/tools/blktap2/drivers/block-remus.c Mon Jun 07 14:53:15 2010 -0700 +++ b/tools/blktap2/drivers/block-remus.c Mon Jun 07 14:53:15 2010 -0700 @@ -33,7 +33,6 @@ /* due to architectural choices in tapdisk, block-buffer is forced to * reimplement some code which is meant to be private */ -#define TAPDISK #include "tapdisk.h" #include "tapdisk-server.h" #include "tapdisk-driver.h" diff -r 5f2119204138 -r d8393489b4c4 tools/blktap2/drivers/img2qcow.c --- a/tools/blktap2/drivers/img2qcow.c Mon Jun 07 14:53:15 2010 -0700 +++ b/tools/blktap2/drivers/img2qcow.c Mon Jun 07 14:53:15 2010 -0700 @@ -65,8 +65,6 @@ #define O_LARGEFILE 0 #endif - -#define TAPDISK 1 #define BLOCK_PROCESSSZ 4096 #define QCOW_VBD 0 #define PROGRESS_QUANT 2 diff -r 5f2119204138 -r d8393489b4c4 tools/blktap2/drivers/qcow2raw.c --- a/tools/blktap2/drivers/qcow2raw.c Mon Jun 07 14:53:15 2010 -0700 +++ b/tools/blktap2/drivers/qcow2raw.c Mon Jun 07 14:53:15 2010 -0700 @@ -62,7 +62,6 @@ #define O_LARGEFILE 0 #endif -#define TAPDISK 1 #define BLOCK_PROCESSSZ 4096 #define QCOW_VBD 0 #define AIO_VBD 1 diff -r 5f2119204138 -r d8393489b4c4 tools/blktap2/drivers/tapdisk.h --- a/tools/blktap2/drivers/tapdisk.h Mon Jun 07 14:53:15 2010 -0700 +++ b/tools/blktap2/drivers/tapdisk.h Mon Jun 07 14:53:15 2010 -0700 @@ -64,6 +64,10 @@ #include "tapdisk-log.h" #include "tapdisk-utils.h" +#define DPRINTF(_f, _a...) syslog(LOG_INFO, _f, ##_a) +#define EPRINTF(_f, _a...) syslog(LOG_ERR, "tap-err:%s: " _f, __func__, ##_a) +#define PERROR(_f, _a...) EPRINTF(_f ": %s", ##_a, strerror(errno)) + #define MAX_SEGMENTS_PER_REQ 11 #define SECTOR_SHIFT 9 #define DEFAULT_SECTOR_SIZE 512 diff -r 5f2119204138 -r d8393489b4c4 tools/blktap2/include/blktaplib.h --- a/tools/blktap2/include/blktaplib.h Mon Jun 07 14:53:15 2010 -0700 +++ b/tools/blktap2/include/blktaplib.h Mon Jun 07 14:53:15 2010 -0700 @@ -36,15 +36,6 @@ #include #include -#if 1 -#define DPRINTF(_f, _a...) syslog(LOG_INFO, _f, ##_a) -#else -#define DPRINTF(_f, _a...) ((void)0) -#endif - -#define EPRINTF(_f, _a...) syslog(LOG_ERR, "tap-err:%s: " _f, __func__, ##_a) -#define PERROR(_f, _a...) EPRINTF(_f ": %s", ##_a, strerror(errno)) - #define BLK_RING_SIZE __CONST_RING_SIZE(blkif, XC_PAGE_SIZE) /* size of the extra VMA area to map in attached pages. */