block: fix compilation error on windows 45/31845/3
authorSeokYeon Hwang <syeon.hwang@samsung.com>
Thu, 11 Dec 2014 06:13:35 +0000 (15:13 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Tue, 16 Dec 2014 11:10:07 +0000 (03:10 -0800)
Change-Id: I5a746ab35cb449b2f42da9dff6b592228ebcf495
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
block/raw-win32.c

index 7118753..91dd96c 100644 (file)
@@ -352,6 +352,7 @@ static int raw_open(BlockDriverState *bs, QDict *options, int flags,
         goto fail;
     }
 #else
+    // TODO: re-test and re-coding needed
     open_flags = O_BINARY & ~O_ACCMODE;
     if (flags & BDRV_O_RDWR) {
         open_flags |= O_RDWR;
@@ -359,25 +360,6 @@ static int raw_open(BlockDriverState *bs, QDict *options, int flags,
         open_flags |= O_RDONLY;
     }
 
-    /* Use O_DSYNC for write-through caching, no flags for write-back caching,
-     * and O_DIRECT for no caching. */
-    /*
-       if ((flags & BDRV_O_NOCACHE)) {
-       open_flags |= O_DIRECT;
-       }
-       if (!(flags & BDRV_O_CACHE_WB)) {
-       open_flags |= O_DSYNC;
-       }
-     */
-
-    if ((flags & BDRV_O_NATIVE_AIO) && aio == NULL) {
-        aio = win32_aio_init();
-        if (aio == NULL) {
-            ret = -EINVAL;
-            goto fail;
-        }
-    }
-
     ret = qemu_open(filename, open_flags, 0644);
     if (ret < 0) {
         error_report("raw_open failed(%d) \n", ret);