uint8_t num_floppies;
FDrive drives[MAX_FD];
struct {
- BlockBackend *blk;
FloppyDriveType type;
} qdev_for_drives[MAX_FD];
int reset_sensei;
{
unsigned int i;
FDrive *drive;
- DeviceState *dev;
- BlockBackend *blk;
- bool ok;
- const char *fdc_name, *drive_suffix;
for (i = 0; i < MAX_FD; i++) {
drive = &fdctrl->drives[i];
drive->fdctrl = fdctrl;
-
- /* If the drive is not present, we skip creating the qdev device, but
- * still have to initialise the controller. */
- blk = fdctrl->qdev_for_drives[i].blk;
- if (!blk) {
- fd_init(drive);
- fd_revalidate(drive);
- continue;
- }
-
- fdc_name = object_get_typename(OBJECT(fdc_dev));
- drive_suffix = !strcmp(fdc_name, "SUNW,fdtwo") ? "" : i ? "B" : "A";
- warn_report("warning: property %s.drive%s is deprecated",
- fdc_name, drive_suffix);
- error_printf("Use -device floppy,unit=%d,drive=... instead.\n", i);
-
- dev = qdev_new("floppy");
- qdev_prop_set_uint32(dev, "unit", i);
- qdev_prop_set_enum(dev, "drive-type", fdctrl->qdev_for_drives[i].type);
-
- /*
- * Hack alert: we move the backend from the floppy controller
- * device to the floppy device. We first need to detach the
- * controller, or else floppy_create()'s qdev_prop_set_drive()
- * will die when it attaches floppy device. We also need to
- * take another reference so that blk_detach_dev() doesn't
- * free blk while we still need it.
- *
- * The hack is probably a bad idea.
- */
- blk_ref(blk);
- blk_detach_dev(blk, fdc_dev);
- fdctrl->qdev_for_drives[i].blk = NULL;
- ok = qdev_prop_set_drive_err(dev, "drive", blk, errp);
- blk_unref(blk);
- if (!ok) {
- return;
- }
-
- if (!qdev_realize_and_unref(dev, &fdctrl->bus.bus, errp)) {
- return;
- }
+ fd_init(drive);
+ fd_revalidate(drive);
}
}
DEFINE_PROP_UINT32("iobase", FDCtrlISABus, iobase, 0x3f0),
DEFINE_PROP_UINT32("irq", FDCtrlISABus, irq, 6),
DEFINE_PROP_UINT32("dma", FDCtrlISABus, dma, 2),
- DEFINE_PROP_DRIVE("driveA", FDCtrlISABus, state.qdev_for_drives[0].blk),
- DEFINE_PROP_DRIVE("driveB", FDCtrlISABus, state.qdev_for_drives[1].blk),
DEFINE_PROP_SIGNED("fdtypeA", FDCtrlISABus, state.qdev_for_drives[0].type,
FLOPPY_DRIVE_TYPE_AUTO, qdev_prop_fdc_drive_type,
FloppyDriveType),
};
static Property sysbus_fdc_properties[] = {
- DEFINE_PROP_DRIVE("driveA", FDCtrlSysBus, state.qdev_for_drives[0].blk),
- DEFINE_PROP_DRIVE("driveB", FDCtrlSysBus, state.qdev_for_drives[1].blk),
DEFINE_PROP_SIGNED("fdtypeA", FDCtrlSysBus, state.qdev_for_drives[0].type,
FLOPPY_DRIVE_TYPE_AUTO, qdev_prop_fdc_drive_type,
FloppyDriveType),
};
static Property sun4m_fdc_properties[] = {
- DEFINE_PROP_DRIVE("drive", FDCtrlSysBus, state.qdev_for_drives[0].blk),
DEFINE_PROP_SIGNED("fdtype", FDCtrlSysBus, state.qdev_for_drives[0].type,
FLOPPY_DRIVE_TYPE_AUTO, qdev_prop_fdc_drive_type,
FloppyDriveType),
check_floppy_qtree -drive if=floppy,file="$TEST_IMG",index=1
check_floppy_qtree -drive if=floppy,file="$TEST_IMG" -drive if=floppy,file="$TEST_IMG.2",index=1
-echo
-echo
-echo === Using -drive if=none and -global ===
-
-check_floppy_qtree -drive if=none,file="$TEST_IMG" -global isa-fdc.driveA=none0
-check_floppy_qtree -drive if=none,file="$TEST_IMG" -global isa-fdc.driveB=none0
-check_floppy_qtree -drive if=none,file="$TEST_IMG" -drive if=none,file="$TEST_IMG.2" \
- -global isa-fdc.driveA=none0 -global isa-fdc.driveB=none1
-
echo
echo
echo === Using -drive if=none and -device ===
echo
echo === Mixing -fdX and -global ===
-# Working
-check_floppy_qtree -fda "$TEST_IMG" -drive if=none,file="$TEST_IMG.2" -global isa-fdc.driveB=none0
-check_floppy_qtree -fdb "$TEST_IMG" -drive if=none,file="$TEST_IMG.2" -global isa-fdc.driveA=none0
-
-# Conflicting
-check_floppy_qtree -fda "$TEST_IMG" -drive if=none,file="$TEST_IMG.2" -global isa-fdc.driveA=none0
-check_floppy_qtree -fdb "$TEST_IMG" -drive if=none,file="$TEST_IMG.2" -global isa-fdc.driveB=none0
# Conflicting, -fdX wins
check_floppy_qtree -fda "$TEST_IMG" -drive if=none,file="$TEST_IMG.2" -global floppy.drive=none0
echo === Mixing -global and -device ===
# Working
-check_floppy_qtree -drive if=none,file="$TEST_IMG" -drive if=none,file="$TEST_IMG.2" \
- -global isa-fdc.driveA=none0 -device floppy,drive=none1
-check_floppy_qtree -drive if=none,file="$TEST_IMG" -drive if=none,file="$TEST_IMG.2" \
- -global isa-fdc.driveA=none0 -device floppy,drive=none1,unit=1
-
-check_floppy_qtree -drive if=none,file="$TEST_IMG" -drive if=none,file="$TEST_IMG.2" \
- -global isa-fdc.driveB=none0 -device floppy,drive=none1
-check_floppy_qtree -drive if=none,file="$TEST_IMG" -drive if=none,file="$TEST_IMG.2" \
- -global isa-fdc.driveB=none0 -device floppy,drive=none1,unit=0
check_floppy_qtree -drive if=none,file="$TEST_IMG" \
-global floppy.drive=none0 -device floppy,unit=0
# Conflicting
-check_floppy_qtree -drive if=none,file="$TEST_IMG" -drive if=none,file="$TEST_IMG.2" \
- -global isa-fdc.driveA=none0 -device floppy,drive=none1,unit=0
-check_floppy_qtree -drive if=none,file="$TEST_IMG" -drive if=none,file="$TEST_IMG.2" \
- -global isa-fdc.driveB=none0 -device floppy,drive=none1,unit=1
check_floppy_qtree -drive if=none,file="$TEST_IMG" -drive if=none,file="$TEST_IMG.2" \
-global floppy.drive=none0 -device floppy,drive=none1,unit=0
check_floppy_qtree -drive if=floppy,file="$TEST_IMG" \
-drive if=none,file="$TEST_IMG.2" \
-drive if=none,file="$TEST_IMG.3" \
- -global isa-fdc.driveB=none0 \
+ -device floppy,drive=none0 \
-device floppy,drive=none1
echo
iobase = 1008 (0x3f0)
irq = 6 (0x6)
dma = 2 (0x2)
- driveA = ""
- driveB = ""
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
iobase = 1008 (0x3f0)
irq = 6 (0x6)
dma = 2 (0x2)
- driveA = ""
- driveB = ""
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
iobase = 1008 (0x3f0)
irq = 6 (0x6)
dma = 2 (0x2)
- driveA = ""
- driveB = ""
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
iobase = 1008 (0x3f0)
irq = 6 (0x6)
dma = 2 (0x2)
- driveA = ""
- driveB = ""
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
iobase = 1008 (0x3f0)
irq = 6 (0x6)
dma = 2 (0x2)
- driveA = ""
- driveB = ""
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
iobase = 1008 (0x3f0)
irq = 6 (0x6)
dma = 2 (0x2)
- driveA = ""
- driveB = ""
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
iobase = 1008 (0x3f0)
irq = 6 (0x6)
dma = 2 (0x2)
- driveA = ""
- driveB = ""
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
iobase = 1008 (0x3f0)
irq = 6 (0x6)
dma = 2 (0x2)
- driveA = ""
- driveB = ""
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
-=== Using -drive if=none and -global ===
-
-Testing: -drive if=none,file=TEST_DIR/t.qcow2 -global isa-fdc.driveA=none0
-QEMU_PROG: warning: warning: property isa-fdc.driveA is deprecated
-Use -device floppy,unit=0,drive=... instead.
-
- dev: isa-fdc, id ""
- iobase = 1008 (0x3f0)
- irq = 6 (0x6)
- dma = 2 (0x2)
- driveA = ""
- driveB = ""
- fdtypeA = "auto"
- fdtypeB = "auto"
- fallback = "288"
- isa irq 6
- bus: floppy-bus.0
- type floppy-bus
- dev: floppy, id ""
- unit = 0 (0x0)
- drive = "none0"
- logical_block_size = 512 (512 B)
- physical_block_size = 512 (512 B)
- min_io_size = 0 (0 B)
- opt_io_size = 0 (0 B)
- discard_granularity = 4294967295 (4 GiB)
- write-cache = "auto"
- share-rw = false
- drive-type = "144"
-none0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
- Attached to: /machine/unattached/device[N]
- Removable device: not locked, tray closed
- Cache mode: writeback
-
-ide1-cd0: [not inserted]
- Attached to: /machine/unattached/device[N]
- Removable device: not locked, tray closed
-
-sd0: [not inserted]
- Removable device: not locked, tray closed
-(qemu) quit
-
-
-Testing: -drive if=none,file=TEST_DIR/t.qcow2 -global isa-fdc.driveB=none0
-QEMU_PROG: warning: warning: property isa-fdc.driveB is deprecated
-Use -device floppy,unit=1,drive=... instead.
-
- dev: isa-fdc, id ""
- iobase = 1008 (0x3f0)
- irq = 6 (0x6)
- dma = 2 (0x2)
- driveA = ""
- driveB = ""
- fdtypeA = "auto"
- fdtypeB = "auto"
- fallback = "288"
- isa irq 6
- bus: floppy-bus.0
- type floppy-bus
- dev: floppy, id ""
- unit = 1 (0x1)
- drive = "none0"
- logical_block_size = 512 (512 B)
- physical_block_size = 512 (512 B)
- min_io_size = 0 (0 B)
- opt_io_size = 0 (0 B)
- discard_granularity = 4294967295 (4 GiB)
- write-cache = "auto"
- share-rw = false
- drive-type = "144"
-none0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
- Attached to: /machine/unattached/device[N]
- Removable device: not locked, tray closed
- Cache mode: writeback
-
-ide1-cd0: [not inserted]
- Attached to: /machine/unattached/device[N]
- Removable device: not locked, tray closed
-
-sd0: [not inserted]
- Removable device: not locked, tray closed
-(qemu) quit
-
-
-Testing: -drive if=none,file=TEST_DIR/t.qcow2 -drive if=none,file=TEST_DIR/t.qcow2.2 -global isa-fdc.driveA=none0 -global isa-fdc.driveB=none1
-QEMU_PROG: warning: warning: property isa-fdc.driveA is deprecated
-Use -device floppy,unit=0,drive=... instead.
-QEMU_PROG: warning: warning: property isa-fdc.driveB is deprecated
-Use -device floppy,unit=1,drive=... instead.
-
- dev: isa-fdc, id ""
- iobase = 1008 (0x3f0)
- irq = 6 (0x6)
- dma = 2 (0x2)
- driveA = ""
- driveB = ""
- fdtypeA = "auto"
- fdtypeB = "auto"
- fallback = "288"
- isa irq 6
- bus: floppy-bus.0
- type floppy-bus
- dev: floppy, id ""
- unit = 1 (0x1)
- drive = "none1"
- logical_block_size = 512 (512 B)
- physical_block_size = 512 (512 B)
- min_io_size = 0 (0 B)
- opt_io_size = 0 (0 B)
- discard_granularity = 4294967295 (4 GiB)
- write-cache = "auto"
- share-rw = false
- drive-type = "144"
- dev: floppy, id ""
- unit = 0 (0x0)
- drive = "none0"
- logical_block_size = 512 (512 B)
- physical_block_size = 512 (512 B)
- min_io_size = 0 (0 B)
- opt_io_size = 0 (0 B)
- discard_granularity = 4294967295 (4 GiB)
- write-cache = "auto"
- share-rw = false
- drive-type = "144"
-none0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
- Attached to: /machine/unattached/device[N]
- Removable device: not locked, tray closed
- Cache mode: writeback
-
-none1 (NODE_NAME): TEST_DIR/t.qcow2.2 (qcow2)
- Attached to: /machine/unattached/device[N]
- Removable device: not locked, tray closed
- Cache mode: writeback
-
-ide1-cd0: [not inserted]
- Attached to: /machine/unattached/device[N]
- Removable device: not locked, tray closed
-
-sd0: [not inserted]
- Removable device: not locked, tray closed
-(qemu) quit
-
-
-
=== Using -drive if=none and -device ===
Testing: -drive if=none,file=TEST_DIR/t.qcow2 -device floppy,drive=none0
iobase = 1008 (0x3f0)
irq = 6 (0x6)
dma = 2 (0x2)
- driveA = ""
- driveB = ""
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
iobase = 1008 (0x3f0)
irq = 6 (0x6)
dma = 2 (0x2)
- driveA = ""
- driveB = ""
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
iobase = 1008 (0x3f0)
irq = 6 (0x6)
dma = 2 (0x2)
- driveA = ""
- driveB = ""
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
=== Mixing -fdX and -global ===
-Testing: -fda TEST_DIR/t.qcow2 -drive if=none,file=TEST_DIR/t.qcow2.2 -global isa-fdc.driveB=none0
-QEMU_PROG: warning: warning: property isa-fdc.driveB is deprecated
-Use -device floppy,unit=1,drive=... instead.
-
- dev: isa-fdc, id ""
- iobase = 1008 (0x3f0)
- irq = 6 (0x6)
- dma = 2 (0x2)
- driveA = ""
- driveB = ""
- fdtypeA = "auto"
- fdtypeB = "auto"
- fallback = "288"
- isa irq 6
- bus: floppy-bus.0
- type floppy-bus
- dev: floppy, id ""
- unit = 0 (0x0)
- drive = "floppy0"
- logical_block_size = 512 (512 B)
- physical_block_size = 512 (512 B)
- min_io_size = 0 (0 B)
- opt_io_size = 0 (0 B)
- discard_granularity = 4294967295 (4 GiB)
- write-cache = "auto"
- share-rw = false
- drive-type = "144"
- dev: floppy, id ""
- unit = 1 (0x1)
- drive = "none0"
- logical_block_size = 512 (512 B)
- physical_block_size = 512 (512 B)
- min_io_size = 0 (0 B)
- opt_io_size = 0 (0 B)
- discard_granularity = 4294967295 (4 GiB)
- write-cache = "auto"
- share-rw = false
- drive-type = "144"
-floppy0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
- Attached to: /machine/unattached/device[N]
- Removable device: not locked, tray closed
- Cache mode: writeback
-
-none0 (NODE_NAME): TEST_DIR/t.qcow2.2 (qcow2)
- Attached to: /machine/unattached/device[N]
- Removable device: not locked, tray closed
- Cache mode: writeback
-
-ide1-cd0: [not inserted]
- Attached to: /machine/unattached/device[N]
- Removable device: not locked, tray closed
-
-sd0: [not inserted]
- Removable device: not locked, tray closed
-(qemu) quit
-
-
-Testing: -fdb TEST_DIR/t.qcow2 -drive if=none,file=TEST_DIR/t.qcow2.2 -global isa-fdc.driveA=none0
-QEMU_PROG: warning: warning: property isa-fdc.driveA is deprecated
-Use -device floppy,unit=0,drive=... instead.
-
- dev: isa-fdc, id ""
- iobase = 1008 (0x3f0)
- irq = 6 (0x6)
- dma = 2 (0x2)
- driveA = ""
- driveB = ""
- fdtypeA = "auto"
- fdtypeB = "auto"
- fallback = "288"
- isa irq 6
- bus: floppy-bus.0
- type floppy-bus
- dev: floppy, id ""
- unit = 1 (0x1)
- drive = "floppy1"
- logical_block_size = 512 (512 B)
- physical_block_size = 512 (512 B)
- min_io_size = 0 (0 B)
- opt_io_size = 0 (0 B)
- discard_granularity = 4294967295 (4 GiB)
- write-cache = "auto"
- share-rw = false
- drive-type = "144"
- dev: floppy, id ""
- unit = 0 (0x0)
- drive = "none0"
- logical_block_size = 512 (512 B)
- physical_block_size = 512 (512 B)
- min_io_size = 0 (0 B)
- opt_io_size = 0 (0 B)
- discard_granularity = 4294967295 (4 GiB)
- write-cache = "auto"
- share-rw = false
- drive-type = "144"
-floppy1 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
- Attached to: /machine/unattached/device[N]
- Removable device: not locked, tray closed
- Cache mode: writeback
-
-none0 (NODE_NAME): TEST_DIR/t.qcow2.2 (qcow2)
- Attached to: /machine/unattached/device[N]
- Removable device: not locked, tray closed
- Cache mode: writeback
-
-ide1-cd0: [not inserted]
- Attached to: /machine/unattached/device[N]
- Removable device: not locked, tray closed
-
-sd0: [not inserted]
- Removable device: not locked, tray closed
-(qemu) quit
-
-
-Testing: -fda TEST_DIR/t.qcow2 -drive if=none,file=TEST_DIR/t.qcow2.2 -global isa-fdc.driveA=none0
-QEMU_PROG: warning: warning: property isa-fdc.driveA is deprecated
-Use -device floppy,unit=0,drive=... instead.
-QEMU_PROG: Floppy unit 0 is in use
-
-Testing: -fdb TEST_DIR/t.qcow2 -drive if=none,file=TEST_DIR/t.qcow2.2 -global isa-fdc.driveB=none0
-QEMU_PROG: warning: warning: property isa-fdc.driveB is deprecated
-Use -device floppy,unit=1,drive=... instead.
-QEMU_PROG: Floppy unit 1 is in use
-
Testing: -fda TEST_DIR/t.qcow2 -drive if=none,file=TEST_DIR/t.qcow2.2 -global floppy.drive=none0
QEMU_PROG: -global floppy.drive=... conflicts with drive=floppy0
iobase = 1008 (0x3f0)
irq = 6 (0x6)
dma = 2 (0x2)
- driveA = ""
- driveB = ""
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
iobase = 1008 (0x3f0)
irq = 6 (0x6)
dma = 2 (0x2)
- driveA = ""
- driveB = ""
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
iobase = 1008 (0x3f0)
irq = 6 (0x6)
dma = 2 (0x2)
- driveA = ""
- driveB = ""
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
iobase = 1008 (0x3f0)
irq = 6 (0x6)
dma = 2 (0x2)
- driveA = ""
- driveB = ""
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
iobase = 1008 (0x3f0)
irq = 6 (0x6)
dma = 2 (0x2)
- driveA = ""
- driveB = ""
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
iobase = 1008 (0x3f0)
irq = 6 (0x6)
dma = 2 (0x2)
- driveA = ""
- driveB = ""
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
=== Mixing -global and -device ===
-Testing: -drive if=none,file=TEST_DIR/t.qcow2 -drive if=none,file=TEST_DIR/t.qcow2.2 -global isa-fdc.driveA=none0 -device floppy,drive=none1
-QEMU_PROG: warning: warning: property isa-fdc.driveA is deprecated
-Use -device floppy,unit=0,drive=... instead.
-
- dev: isa-fdc, id ""
- iobase = 1008 (0x3f0)
- irq = 6 (0x6)
- dma = 2 (0x2)
- driveA = ""
- driveB = ""
- fdtypeA = "auto"
- fdtypeB = "auto"
- fallback = "288"
- isa irq 6
- bus: floppy-bus.0
- type floppy-bus
- dev: floppy, id ""
- unit = 1 (0x1)
- drive = "none1"
- logical_block_size = 512 (512 B)
- physical_block_size = 512 (512 B)
- min_io_size = 0 (0 B)
- opt_io_size = 0 (0 B)
- discard_granularity = 4294967295 (4 GiB)
- write-cache = "auto"
- share-rw = false
- drive-type = "144"
- dev: floppy, id ""
- unit = 0 (0x0)
- drive = "none0"
- logical_block_size = 512 (512 B)
- physical_block_size = 512 (512 B)
- min_io_size = 0 (0 B)
- opt_io_size = 0 (0 B)
- discard_granularity = 4294967295 (4 GiB)
- write-cache = "auto"
- share-rw = false
- drive-type = "144"
-none0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
- Attached to: /machine/unattached/device[N]
- Removable device: not locked, tray closed
- Cache mode: writeback
-
-none1 (NODE_NAME): TEST_DIR/t.qcow2.2 (qcow2)
- Attached to: /machine/peripheral-anon/device[N]
- Removable device: not locked, tray closed
- Cache mode: writeback
-
-ide1-cd0: [not inserted]
- Attached to: /machine/unattached/device[N]
- Removable device: not locked, tray closed
-
-sd0: [not inserted]
- Removable device: not locked, tray closed
-(qemu) quit
-
-
-Testing: -drive if=none,file=TEST_DIR/t.qcow2 -drive if=none,file=TEST_DIR/t.qcow2.2 -global isa-fdc.driveA=none0 -device floppy,drive=none1,unit=1
-QEMU_PROG: warning: warning: property isa-fdc.driveA is deprecated
-Use -device floppy,unit=0,drive=... instead.
-
- dev: isa-fdc, id ""
- iobase = 1008 (0x3f0)
- irq = 6 (0x6)
- dma = 2 (0x2)
- driveA = ""
- driveB = ""
- fdtypeA = "auto"
- fdtypeB = "auto"
- fallback = "288"
- isa irq 6
- bus: floppy-bus.0
- type floppy-bus
- dev: floppy, id ""
- unit = 1 (0x1)
- drive = "none1"
- logical_block_size = 512 (512 B)
- physical_block_size = 512 (512 B)
- min_io_size = 0 (0 B)
- opt_io_size = 0 (0 B)
- discard_granularity = 4294967295 (4 GiB)
- write-cache = "auto"
- share-rw = false
- drive-type = "144"
- dev: floppy, id ""
- unit = 0 (0x0)
- drive = "none0"
- logical_block_size = 512 (512 B)
- physical_block_size = 512 (512 B)
- min_io_size = 0 (0 B)
- opt_io_size = 0 (0 B)
- discard_granularity = 4294967295 (4 GiB)
- write-cache = "auto"
- share-rw = false
- drive-type = "144"
-none0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
- Attached to: /machine/unattached/device[N]
- Removable device: not locked, tray closed
- Cache mode: writeback
-
-none1 (NODE_NAME): TEST_DIR/t.qcow2.2 (qcow2)
- Attached to: /machine/peripheral-anon/device[N]
- Removable device: not locked, tray closed
- Cache mode: writeback
-
-ide1-cd0: [not inserted]
- Attached to: /machine/unattached/device[N]
- Removable device: not locked, tray closed
-
-sd0: [not inserted]
- Removable device: not locked, tray closed
-(qemu) quit
-
-
-Testing: -drive if=none,file=TEST_DIR/t.qcow2 -drive if=none,file=TEST_DIR/t.qcow2.2 -global isa-fdc.driveB=none0 -device floppy,drive=none1
-QEMU_PROG: warning: warning: property isa-fdc.driveB is deprecated
-Use -device floppy,unit=1,drive=... instead.
-
- dev: isa-fdc, id ""
- iobase = 1008 (0x3f0)
- irq = 6 (0x6)
- dma = 2 (0x2)
- driveA = ""
- driveB = ""
- fdtypeA = "auto"
- fdtypeB = "auto"
- fallback = "288"
- isa irq 6
- bus: floppy-bus.0
- type floppy-bus
- dev: floppy, id ""
- unit = 0 (0x0)
- drive = "none1"
- logical_block_size = 512 (512 B)
- physical_block_size = 512 (512 B)
- min_io_size = 0 (0 B)
- opt_io_size = 0 (0 B)
- discard_granularity = 4294967295 (4 GiB)
- write-cache = "auto"
- share-rw = false
- drive-type = "144"
- dev: floppy, id ""
- unit = 1 (0x1)
- drive = "none0"
- logical_block_size = 512 (512 B)
- physical_block_size = 512 (512 B)
- min_io_size = 0 (0 B)
- opt_io_size = 0 (0 B)
- discard_granularity = 4294967295 (4 GiB)
- write-cache = "auto"
- share-rw = false
- drive-type = "144"
-none0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
- Attached to: /machine/unattached/device[N]
- Removable device: not locked, tray closed
- Cache mode: writeback
-
-none1 (NODE_NAME): TEST_DIR/t.qcow2.2 (qcow2)
- Attached to: /machine/peripheral-anon/device[N]
- Removable device: not locked, tray closed
- Cache mode: writeback
-
-ide1-cd0: [not inserted]
- Attached to: /machine/unattached/device[N]
- Removable device: not locked, tray closed
-
-sd0: [not inserted]
- Removable device: not locked, tray closed
-(qemu) quit
-
-
-Testing: -drive if=none,file=TEST_DIR/t.qcow2 -drive if=none,file=TEST_DIR/t.qcow2.2 -global isa-fdc.driveB=none0 -device floppy,drive=none1,unit=0
-QEMU_PROG: warning: warning: property isa-fdc.driveB is deprecated
-Use -device floppy,unit=1,drive=... instead.
-
- dev: isa-fdc, id ""
- iobase = 1008 (0x3f0)
- irq = 6 (0x6)
- dma = 2 (0x2)
- driveA = ""
- driveB = ""
- fdtypeA = "auto"
- fdtypeB = "auto"
- fallback = "288"
- isa irq 6
- bus: floppy-bus.0
- type floppy-bus
- dev: floppy, id ""
- unit = 0 (0x0)
- drive = "none1"
- logical_block_size = 512 (512 B)
- physical_block_size = 512 (512 B)
- min_io_size = 0 (0 B)
- opt_io_size = 0 (0 B)
- discard_granularity = 4294967295 (4 GiB)
- write-cache = "auto"
- share-rw = false
- drive-type = "144"
- dev: floppy, id ""
- unit = 1 (0x1)
- drive = "none0"
- logical_block_size = 512 (512 B)
- physical_block_size = 512 (512 B)
- min_io_size = 0 (0 B)
- opt_io_size = 0 (0 B)
- discard_granularity = 4294967295 (4 GiB)
- write-cache = "auto"
- share-rw = false
- drive-type = "144"
-none0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
- Attached to: /machine/unattached/device[N]
- Removable device: not locked, tray closed
- Cache mode: writeback
-
-none1 (NODE_NAME): TEST_DIR/t.qcow2.2 (qcow2)
- Attached to: /machine/peripheral-anon/device[N]
- Removable device: not locked, tray closed
- Cache mode: writeback
-
-ide1-cd0: [not inserted]
- Attached to: /machine/unattached/device[N]
- Removable device: not locked, tray closed
-
-sd0: [not inserted]
- Removable device: not locked, tray closed
-(qemu) quit
-
-
Testing: -drive if=none,file=TEST_DIR/t.qcow2 -global floppy.drive=none0 -device floppy,unit=0
dev: isa-fdc, id ""
iobase = 1008 (0x3f0)
irq = 6 (0x6)
dma = 2 (0x2)
- driveA = ""
- driveB = ""
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
(qemu) quit
-Testing: -drive if=none,file=TEST_DIR/t.qcow2 -drive if=none,file=TEST_DIR/t.qcow2.2 -global isa-fdc.driveA=none0 -device floppy,drive=none1,unit=0
-QEMU_PROG: warning: warning: property isa-fdc.driveA is deprecated
-Use -device floppy,unit=0,drive=... instead.
-QEMU_PROG: -device floppy,drive=none1,unit=0: Floppy unit 0 is in use
-
-Testing: -drive if=none,file=TEST_DIR/t.qcow2 -drive if=none,file=TEST_DIR/t.qcow2.2 -global isa-fdc.driveB=none0 -device floppy,drive=none1,unit=1
-QEMU_PROG: warning: warning: property isa-fdc.driveB is deprecated
-Use -device floppy,unit=1,drive=... instead.
-QEMU_PROG: -device floppy,drive=none1,unit=1: Floppy unit 1 is in use
-
Testing: -drive if=none,file=TEST_DIR/t.qcow2 -drive if=none,file=TEST_DIR/t.qcow2.2 -global floppy.drive=none0 -device floppy,drive=none1,unit=0
QEMU_PROG: -device floppy,drive=none1,unit=0: -global floppy.drive=... conflicts with drive=none1
=== Too many floppy drives ===
-Testing: -drive if=floppy,file=TEST_DIR/t.qcow2 -drive if=none,file=TEST_DIR/t.qcow2.2 -drive if=none,file=TEST_DIR/t.qcow2.3 -global isa-fdc.driveB=none0 -device floppy,drive=none1
-QEMU_PROG: warning: warning: property isa-fdc.driveB is deprecated
-Use -device floppy,unit=1,drive=... instead.
+Testing: -drive if=floppy,file=TEST_DIR/t.qcow2 -drive if=none,file=TEST_DIR/t.qcow2.2 -drive if=none,file=TEST_DIR/t.qcow2.3 -device floppy,drive=none0 -device floppy,drive=none1
QEMU_PROG: -device floppy,drive=none1: Can't create floppy unit 2, bus supports only 2 units
iobase = 1008 (0x3f0)
irq = 6 (0x6)
dma = 2 (0x2)
- driveA = ""
- driveB = ""
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
iobase = 1008 (0x3f0)
irq = 6 (0x6)
dma = 2 (0x2)
- driveA = ""
- driveB = ""
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
iobase = 1008 (0x3f0)
irq = 6 (0x6)
dma = 2 (0x2)
- driveA = ""
- driveB = ""
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
iobase = 1008 (0x3f0)
irq = 6 (0x6)
dma = 2 (0x2)
- driveA = ""
- driveB = ""
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
iobase = 1008 (0x3f0)
irq = 6 (0x6)
dma = 2 (0x2)
- driveA = ""
- driveB = ""
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
iobase = 1008 (0x3f0)
irq = 6 (0x6)
dma = 2 (0x2)
- driveA = ""
- driveB = ""
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
iobase = 1008 (0x3f0)
irq = 6 (0x6)
dma = 2 (0x2)
- driveA = ""
- driveB = ""
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"
iobase = 1008 (0x3f0)
irq = 6 (0x6)
dma = 2 (0x2)
- driveA = ""
- driveB = ""
fdtypeA = "auto"
fdtypeB = "auto"
fallback = "288"