* [Qemu-devel] QCOW/QCOW2 for win32
@ 2006-09-07 6:13 Kazu
2006-09-11 0:28 ` Jamie Lokier
0 siblings, 1 reply; 4+ messages in thread
From: Kazu @ 2006-09-07 6:13 UTC (permalink / raw)
To: qemu-devel
Hi,
A patch below fixes QCOW/QCOW2 for win32.
-snapshot option works. When -snapshot is used, a temporary file is
created at C:\Documents and Settings\(user name)\Local Settings\temp.
In path_is_absolute in block.c, path separation '/' also works for win32.
A named snapshot works. I can make a named temporary file by qemu-img.exe
and boots from it.
When I used qcow2, VM snapshots work.
localtime in block.c is thread-safe for win32.
For more information, see.
http://www.h7.dion.ne.jp/~qemu-win/HowToFloppyCdrom-en.html#snapshot
Patch.
http://www.h7.dion.ne.jp/~qemu-win/download/qemu-20060906-qcow.patch
Binary.
http://www.h6.dion.ne.jp/~kazuw/qemu-win/qemu-20060906-qcow.zip
Regards,
Kazu
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] QCOW/QCOW2 for win32
2006-09-07 6:13 [Qemu-devel] QCOW/QCOW2 for win32 Kazu
@ 2006-09-11 0:28 ` Jamie Lokier
2006-09-11 5:32 ` Kazu
0 siblings, 1 reply; 4+ messages in thread
From: Jamie Lokier @ 2006-09-11 0:28 UTC (permalink / raw)
To: qemu-devel
Kazu wrote:
> Patch.
> http://www.h7.dion.ne.jp/~qemu-win/download/qemu-20060906-qcow.patch
>> #ifdef QEMU_TOOL
>> - overlapped = 0;
>> + overlapped = FILE_ATTRIBUTE_NORMAL;
>> #else
>> overlapped = FILE_FLAG_OVERLAPPED;
>> #endif
I suspect the second value should be (FILE_ATTRIBUTE_NORMAL |
FILE_FLAG_OVERLAPPED). But I'm no Win32 expert.
-- Jamie
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] QCOW/QCOW2 for win32
2006-09-11 0:28 ` Jamie Lokier
@ 2006-09-11 5:32 ` Kazu
2006-09-11 21:53 ` Jamie Lokier
0 siblings, 1 reply; 4+ messages in thread
From: Kazu @ 2006-09-11 5:32 UTC (permalink / raw)
To: qemu-devel
Sent: Monday, September 11, 2006 9:28 AM Jamie Lokier wrote:
> Kazu wrote:
>> Patch.
>> http://www.h7.dion.ne.jp/~qemu-win/download/qemu-20060906-qcow.patch
>
>>> #ifdef QEMU_TOOL
>>> - overlapped = 0;
>>> + overlapped = FILE_ATTRIBUTE_NORMAL;
>>> #else
>>> overlapped = FILE_FLAG_OVERLAPPED;
>>> #endif
>
> I suspect the second value should be (FILE_ATTRIBUTE_NORMAL |
> FILE_FLAG_OVERLAPPED). But I'm no Win32 expert.
>
I think FILE_ATTRIBUTE_NORMAL is only used without other options.
Regards,
Kazu
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] QCOW/QCOW2 for win32
2006-09-11 5:32 ` Kazu
@ 2006-09-11 21:53 ` Jamie Lokier
0 siblings, 0 replies; 4+ messages in thread
From: Jamie Lokier @ 2006-09-11 21:53 UTC (permalink / raw)
To: qemu-devel
Kazu wrote:
> > Kazu wrote:
> >> Patch.
> >> http://www.h7.dion.ne.jp/~qemu-win/download/qemu-20060906-qcow.patch
> >
> >>> #ifdef QEMU_TOOL
> >>> - overlapped = 0;
> >>> + overlapped = FILE_ATTRIBUTE_NORMAL;
> >>> #else
> >>> overlapped = FILE_FLAG_OVERLAPPED;
> >>> #endif
> >
> > I suspect the second value should be (FILE_ATTRIBUTE_NORMAL |
> > FILE_FLAG_OVERLAPPED). But I'm no Win32 expert.
>
> I think FILE_ATTRIBUTE_NORMAL is only used without other options.
I think that is true only for "attribute" options, i.e. those
beginning with FILE_ATTRIBUTE_* and not those beginning with
FILE_FLAG_*.
The Microsoft CreateFile documentation is not very clear:
"FILE_ATTRIBUTE_NORMAL: A file does not have other attributes
set. This attribute is valid only if used alone.". But it does
distinguish between attributes and flags.
It also explains that the attributes are only used when creating a
file, not when opening an existing one. Whereas the flags affect the
operation of open file handles, even if the file already exists.
But as I say, I'm no win32 expert.
-- Jamie
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-09-11 21:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-07 6:13 [Qemu-devel] QCOW/QCOW2 for win32 Kazu
2006-09-11 0:28 ` Jamie Lokier
2006-09-11 5:32 ` Kazu
2006-09-11 21:53 ` Jamie Lokier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).