aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2017-08-22 07:08:27 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2017-09-19 14:09:11 +0200
commite5b5728cd330f533e02e483af8973ad7ffccce8b (patch)
treef47dcecd074391ef42adfeae7d8d4fda94c69bcf /block
parent37b6045c455275af37f0433b05b0dad123e14daf (diff)
downloadqemu-e5b5728cd330f533e02e483af8973ad7ffccce8b.zip
qemu-e5b5728cd330f533e02e483af8973ad7ffccce8b.tar.gz
qemu-e5b5728cd330f533e02e483af8973ad7ffccce8b.tar.bz2
scsi: move non-emulation specific code to scsi/
util/scsi.c includes some SCSI code that is shared by block/iscsi.c and hw/scsi, but the introduction of the persistent reservation helper will add many more instances of this. There is also include/block/scsi.h, which actually is not part of the core block layer. The persistent reservation manager will also need a home. A scsi/ directory provides one for both the aforementioned shared code and the PR manager code. Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/iscsi.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/block/iscsi.c b/block/iscsi.c
index 1e8ae5a..f1d3aaa 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -40,10 +40,14 @@
#include "qmp-commands.h"
#include "qapi/qmp/qstring.h"
#include "crypto/secret.h"
-#include "scsi/scsi.h"
+#include "scsi/utils.h"
+/* Conflict between scsi/utils.h and libiscsi! :( */
+#define SCSI_XFER_NONE ISCSI_XFER_NONE
#include <iscsi/iscsi.h>
#include <iscsi/scsi-lowlevel.h>
+#undef SCSI_XFER_NONE
+QEMU_BUILD_BUG_ON((int)SCSI_XFER_NONE != (int)ISCSI_XFER_NONE);
#ifdef __linux__
#include <scsi/sg.h>