Revision 83f64091 block-vpc.c

b/block-vpc.c
86 86
    return 0;
87 87
}
88 88

  
89
static int vpc_open(BlockDriverState *bs, const char *filename)
89
static int vpc_open(BlockDriverState *bs, const char *filename, int flags)
90 90
{
91 91
    BDRVVPCState *s = bs->opaque;
92 92
    int fd, i;
93 93
    struct vpc_subheader header;
94 94

  
95
    fd = open(filename, O_RDWR | O_BINARY | O_LARGEFILE);
96
    if (fd < 0) {
97
        fd = open(filename, O_RDONLY | O_BINARY | O_LARGEFILE);
98
        if (fd < 0)
99
            return -1;
100
    }
101
    
95
    fd = open(filename, O_RDONLY | O_BINARY);
96
    if (fd < 0)
97
        return -1;
98

  
102 99
    bs->read_only = 1; // no write support yet
103 100
    
104 101
    s->fd = fd;

Also available in: Unified diff