qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC Patch 6/7]Qemu: raw-win32 image file reopen


From: Supriya Kannery
Subject: Re: [Qemu-devel] [RFC Patch 6/7]Qemu: raw-win32 image file reopen
Date: Mon, 13 Feb 2012 18:59:47 +0530
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.20) Gecko/20110817 Fedora/3.1.12-1.fc14 Thunderbird/3.1.12

On 02/08/2012 08:32 PM, Kevin Wolf wrote:
Am 01.02.2012 04:07, schrieb Supriya Kannery:
win32  driver changes for bdrv_reopen_xx functions to
safely reopen image files. Reopening of image files while
changing hostcache dynamically is handled here.

+
+    if (osvi.dwMajorVersion>= WINDOWS_VISTA) {
+        s->hfile = ReOpenFile(raw_rs->stash_hfile, 0, FILE_SHARE_READ,
+                              overlapped);
+        if (s->hfile == INVALID_HANDLE_VALUE) {
+            int err = GetLastError();
+            if (err == ERROR_ACCESS_DENIED) {
+                ret = -EACCES;
+            } else {
+                ret = -1;

Returning -1 where -errno is expected is bad (turns out as -EPERM on
Linux, which is misleading). Maybe -EIO here.

ok

-thanks, Supriya




reply via email to

[Prev in Thread] Current Thread [Next in Thread]