static void fdctrl_connect_drives(FDCtrl *fdctrl, Error **errp)
{
    unsigned int i;
    FDrive *drive;

    for (i = 0; i < MAX_FD; i++) {
        drive = &fdctrl->drives[i];
        drive->fdctrl = fdctrl;

        if (drive->blk) {
            if (blk_get_on_error(drive->blk, 0) != BLOCKDEV_ON_ERROR_ENOSPC) {
                error_setg(errp, "fdc doesn't support drive option werror");
                return;
            }
            if (blk_get_on_error(drive->blk, 1) != BLOCKDEV_ON_ERROR_REPORT) {
                error_setg(errp, "fdc doesn't support drive option rerror");
                return;
            }
        }

        fd_init(drive);
        fdctrl_change_cb(drive, 0);
        if (drive->blk) {
            blk_set_dev_ops(drive->blk, &fdctrl_block_ops, drive);
        }
    }
}
static void fdctrl_connect_drives(FDCtrl *fdctrl, Error **errp)
{
    unsigned int i;
    FDrive *drive;

    for (i = 0; i < MAX_FD; i++) {
        drive = &fdctrl->drives[i];
        drive->fdctrl = fdctrl;

        if (drive->blk) {
            if (blk_get_on_error(drive->blk, 0) != BLOCKDEV_ON_ERROR_ENOSPC) {
                error_setg(errp, "fdc doesn't support drive option werror");
                return;
            }
            if (blk_get_on_error(drive->blk, 1) != BLOCKDEV_ON_ERROR_REPORT) {
                error_setg(errp, "fdc doesn't support drive option rerror");
                return;
            }
        }

        fd_init(drive);
        fdctrl_change_cb(drive, 0);
        if (drive->blk) {
            blk_set_dev_ops(drive->blk, &fdctrl_block_ops, drive);
        }
    }
}