Revision b47b3525

b/hw/fdc.c
29 29

  
30 30
#include "hw.h"
31 31
#include "fdc.h"
32
#include "qemu-error.h"
32 33
#include "qemu-timer.h"
33 34
#include "isa.h"
34 35
#include "sysbus.h"
......
1844 1845
}
1845 1846

  
1846 1847
/* Init functions */
1847
static void fdctrl_connect_drives(FDCtrl *fdctrl)
1848
static int fdctrl_connect_drives(FDCtrl *fdctrl)
1848 1849
{
1849 1850
    unsigned int i;
1850 1851
    FDrive *drive;
......
1852 1853
    for (i = 0; i < MAX_FD; i++) {
1853 1854
        drive = &fdctrl->drives[i];
1854 1855

  
1856
        if (drive->bs) {
1857
            if (bdrv_get_on_error(drive->bs, 0) != BLOCK_ERR_STOP_ENOSPC) {
1858
                error_report("fdc doesn't support drive option werror");
1859
                return -1;
1860
            }
1861
            if (bdrv_get_on_error(drive->bs, 1) != BLOCK_ERR_REPORT) {
1862
                error_report("fdc doesn't support drive option rerror");
1863
                return -1;
1864
            }
1865
        }
1866

  
1855 1867
        fd_init(drive);
1856 1868
        fd_revalidate(drive);
1857 1869
        if (drive->bs) {
1858 1870
            bdrv_set_removable(drive->bs, 1);
1859 1871
        }
1860 1872
    }
1873
    return 0;
1861 1874
}
1862 1875

  
1863 1876
FDCtrl *fdctrl_init_isa(DriveInfo **fds)
......
1871 1884
    if (fds[1]) {
1872 1885
        qdev_prop_set_drive_nofail(&dev->qdev, "driveB", fds[1]->bdrv);
1873 1886
    }
1874
    if (qdev_init(&dev->qdev) < 0)
1875
        return NULL;
1887
    qdev_init_nofail(&dev->qdev);
1876 1888
    return &(DO_UPCAST(FDCtrlISABus, busdev, dev)->state);
1877 1889
}
1878 1890

  
......
1950 1962

  
1951 1963
    if (fdctrl->dma_chann != -1)
1952 1964
        DMA_register_channel(fdctrl->dma_chann, &fdctrl_transfer_handler, fdctrl);
1953
    fdctrl_connect_drives(fdctrl);
1954

  
1955
    return 0;
1965
    return fdctrl_connect_drives(fdctrl);
1956 1966
}
1957 1967

  
1958 1968
static int isabus_fdc_init1(ISADevice *dev)

Also available in: Unified diff