file-win32.c (cdece0467c00007cf8e3f4b3c3f0b13bf2c4fea9) | file-win32.c (03c320d803fd881736b63015048498cf97d410d3) |
---|---|
1/* 2 * Block driver for RAW files (win32) 3 * 4 * Copyright (c) 2006 Fabrice Bellard 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights --- 262 unchanged lines hidden (view full) --- 271 if (flags & BDRV_O_NOCACHE) { 272 *overlapped |= FILE_FLAG_NO_BUFFERING; 273 } 274} 275 276static void raw_parse_filename(const char *filename, QDict *options, 277 Error **errp) 278{ | 1/* 2 * Block driver for RAW files (win32) 3 * 4 * Copyright (c) 2006 Fabrice Bellard 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights --- 262 unchanged lines hidden (view full) --- 271 if (flags & BDRV_O_NOCACHE) { 272 *overlapped |= FILE_FLAG_NO_BUFFERING; 273 } 274} 275 276static void raw_parse_filename(const char *filename, QDict *options, 277 Error **errp) 278{ |
279 /* The filename does not have to be prefixed by the protocol name, since 280 * "file" is the default protocol; therefore, the return value of this 281 * function call can be ignored. */ 282 strstart(filename, "file:", &filename); 283 284 qdict_put_str(options, "filename", filename); | 279 bdrv_parse_filename_strip_prefix(filename, "file:", options); |
285} 286 287static QemuOptsList raw_runtime_opts = { 288 .name = "raw", 289 .head = QTAILQ_HEAD_INITIALIZER(raw_runtime_opts.head), 290 .desc = { 291 { 292 .name = "filename", --- 373 unchanged lines hidden (view full) --- 666 if (is_windows_drive(filename)) 667 return 100; 668 return 0; 669} 670 671static void hdev_parse_filename(const char *filename, QDict *options, 672 Error **errp) 673{ | 280} 281 282static QemuOptsList raw_runtime_opts = { 283 .name = "raw", 284 .head = QTAILQ_HEAD_INITIALIZER(raw_runtime_opts.head), 285 .desc = { 286 { 287 .name = "filename", --- 373 unchanged lines hidden (view full) --- 661 if (is_windows_drive(filename)) 662 return 100; 663 return 0; 664} 665 666static void hdev_parse_filename(const char *filename, QDict *options, 667 Error **errp) 668{ |
674 /* The prefix is optional, just as for "file". */ 675 strstart(filename, "host_device:", &filename); 676 677 qdict_put_str(options, "filename", filename); | 669 bdrv_parse_filename_strip_prefix(filename, "host_device:", options); |
678} 679 680static int hdev_open(BlockDriverState *bs, QDict *options, int flags, 681 Error **errp) 682{ 683 BDRVRawState *s = bs->opaque; 684 int access_flags, create_flags; 685 int ret = 0; --- 101 unchanged lines hidden --- | 670} 671 672static int hdev_open(BlockDriverState *bs, QDict *options, int flags, 673 Error **errp) 674{ 675 BDRVRawState *s = bs->opaque; 676 int access_flags, create_flags; 677 int ret = 0; --- 101 unchanged lines hidden --- |