Revision 0e7e1989 block/raw-win32.c

b/block/raw-win32.c
210 210
    return l.QuadPart;
211 211
}
212 212

  
213
static int raw_create(const char *filename, int64_t total_size,
214
                      const char *backing_file, int flags)
213
static int raw_create(const char *filename, QEMUOptionParameter *options)
215 214
{
216 215
    int fd;
216
    int64_t total_size = 0;
217 217

  
218
    if (flags || backing_file)
219
        return -ENOTSUP;
218
    /* Read out options */
219
    while (options && options->name) {
220
        if (!strcmp(options->name, BLOCK_OPT_SIZE)) {
221
            total_size = options->value.n / 512;
222
        }
223
        options++;
224
    }
220 225

  
221 226
    fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY,
222 227
              0644);
......
228 233
    return 0;
229 234
}
230 235

  
236
static QEMUOptionParameter raw_create_options[] = {
237
    { BLOCK_OPT_SIZE,           OPT_SIZE },
238
    { NULL }
239
};
240

  
231 241
static BlockDriver bdrv_raw = {
232 242
    .format_name	= "raw",
233 243
    .instance_size	= sizeof(BDRVRawState),
......
239 249
    .bdrv_write		= raw_write,
240 250
    .bdrv_truncate	= raw_truncate,
241 251
    .bdrv_getlength	= raw_getlength,
252

  
253
    .create_options = raw_create_options,
242 254
};
243 255

  
244 256
/***********************************************/

Also available in: Unified diff