The MAX_FD is a limitation of struct FDCtrl which is defined in fdc.h. Now that this header is exposed the definition can be moved there.
Signed-off-by: Bernhard Beschow <shen...@gmail.com> --- include/hw/block/fdc-isa.h | 3 --- include/hw/block/fdc.h | 3 ++- hw/block/fdc.c | 1 - hw/i386/pc.c | 1 + hw/isa/isa-superio.c | 1 + hw/mips/jazz.c | 1 + hw/sparc64/sun4u.c | 1 + 7 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/hw/block/fdc-isa.h b/include/hw/block/fdc-isa.h index 95807fdc65..42abd001dd 100644 --- a/include/hw/block/fdc-isa.h +++ b/include/hw/block/fdc-isa.h @@ -4,9 +4,6 @@ #include "exec/hwaddr.h" #include "qapi/qapi-types-block.h" -/* fdc.c */ -#define MAX_FD 2 - #define TYPE_ISA_FDC "isa-fdc" void isa_fdc_init_drives(ISADevice *fdc, DriveInfo **fds); diff --git a/include/hw/block/fdc.h b/include/hw/block/fdc.h index acca7e0d0e..0484280939 100644 --- a/include/hw/block/fdc.h +++ b/include/hw/block/fdc.h @@ -28,9 +28,10 @@ #include "exec/memory.h" #include "exec/ioport.h" #include "hw/block/block.h" -#include "hw/block/fdc-isa.h" #include "qapi/qapi-types-block.h" +#define MAX_FD 2 + typedef struct FDCtrl FDCtrl; /* Floppy bus emulation */ diff --git a/hw/block/fdc.c b/hw/block/fdc.c index 0e2fa527f9..7f58cf1c1f 100644 --- a/hw/block/fdc.c +++ b/hw/block/fdc.c @@ -28,7 +28,6 @@ */ #include "qemu/osdep.h" -#include "hw/block/fdc-isa.h" #include "qapi/error.h" #include "qemu/error-report.h" #include "qemu/timer.h" diff --git a/hw/i386/pc.c b/hw/i386/pc.c index aeecf56e72..a8051feacd 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -25,6 +25,7 @@ #include "qemu/osdep.h" #include "qemu/units.h" #include "hw/i386/pc.h" +#include "hw/block/fdc.h" #include "hw/block/fdc-isa.h" #include "hw/char/serial.h" #include "hw/char/parallel.h" diff --git a/hw/isa/isa-superio.c b/hw/isa/isa-superio.c index ea6cb4213f..99d2aa491b 100644 --- a/hw/isa/isa-superio.c +++ b/hw/isa/isa-superio.c @@ -17,6 +17,7 @@ #include "sysemu/blockdev.h" #include "chardev/char.h" #include "hw/char/parallel.h" +#include "hw/block/fdc.h" #include "hw/block/fdc-isa.h" #include "hw/isa/superio.h" #include "hw/qdev-properties.h" diff --git a/hw/mips/jazz.c b/hw/mips/jazz.c index bc74d1fd96..646b5eb3f1 100644 --- a/hw/mips/jazz.c +++ b/hw/mips/jazz.c @@ -31,6 +31,7 @@ #include "hw/char/serial.h" #include "hw/char/parallel.h" #include "hw/isa/isa.h" +#include "hw/block/fdc.h" #include "hw/block/fdc-isa.h" #include "sysemu/sysemu.h" #include "hw/boards.h" diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index 9a88772f6f..0d7b539ace 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -39,6 +39,7 @@ #include "hw/rtc/m48t59.h" #include "migration/vmstate.h" #include "hw/input/i8042.h" +#include "hw/block/fdc.h" #include "hw/block/fdc-isa.h" #include "net/net.h" #include "qemu/timer.h" -- 2.43.0