qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Location of temporary file for sectors on Windows (XP)
@ 2005-12-02  0:58 W. Craig Scratchley
  2005-12-06  1:30 ` Johannes Schindelin
  0 siblings, 1 reply; 6+ messages in thread
From: W. Craig Scratchley @ 2005-12-02  0:58 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1321 bytes --]

The user manual reads:

 

"If you use the option `-snapshot', all disk images are considered as read
only. When sectors in written, they are written in a temporary file created
in `/tmp'."

 

On Windows (XP), however, I am getting files of the form s??? in the C:\
directory.  This is causing problems at SFU because student accounts don't
have write access to the C:\ directory and this seems to be causing Qemu to
immediately crash.

 

Note that I do have a directory C:\tmp, but it is not being used for this
temporary file.  Also, my system has environment variables TMP and TEMP, and
these are not being consulted.

 

Then, I entered the following line:

 

set QEMU_TMPDIR=c:\tmp

 

But this also had no effect.

 

Finally, note that the s??? files in my C:\ directory are not being deleted
by Qemu, which means an arbitrary amount of space can get taken up by the
files over time.

 

Seems like an issue which has not yet been addressed for Windows builds.

 

Thanks,

     Craig Scratchley, Simon Fraser University

 

p.s.  I am now successfully using Qemu for QNX 6.3.0 as a guest (seems I
must use the -isa option for Qemu to get networking).  The -loadvm option is
great, as QNX is very slow to boot in QNX (it is much faster for me in
Bochs).


[-- Attachment #2: Type: text/html, Size: 5305 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] Location of temporary file for sectors on Windows (XP)
  2005-12-02  0:58 [Qemu-devel] Location of temporary file for sectors on Windows (XP) W. Craig Scratchley
@ 2005-12-06  1:30 ` Johannes Schindelin
  2005-12-06  1:46   ` malc
  0 siblings, 1 reply; 6+ messages in thread
From: Johannes Schindelin @ 2005-12-06  1:30 UTC (permalink / raw)
  To: qemu-devel

Hi,

On Thu, 1 Dec 2005, W. Craig Scratchley wrote:

> On Windows (XP), however, I am getting files of the form s??? in the C:\
> directory.  This is causing problems at SFU because student accounts don't
> have write access to the C:\ directory and this seems to be causing Qemu to
> immediately crash.
> 
> [...]  
> 
> Seems like an issue which has not yet been addressed for Windows builds.

Correct. The culprit is the function get_tmp_filename() in block.c. Since 
you cannot remove a file, but still keep a filehandle open (on windblows), 
there is no really nice way to go about that.

You *could* make an array of temporary files, and register a cleanup 
function with atexit(), but I do not know if that would be called when 
closing the window by hitting the "x" button (after all, this is my 
favorite way to exit QEmu when I called it with -snapshot).

Hth,
Dscho

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] Location of temporary file for sectors on Windows (XP)
  2005-12-06  1:30 ` Johannes Schindelin
@ 2005-12-06  1:46   ` malc
  2005-12-06  1:56     ` Johannes Schindelin
  0 siblings, 1 reply; 6+ messages in thread
From: malc @ 2005-12-06  1:46 UTC (permalink / raw)
  To: qemu-devel

On Tue, 6 Dec 2005, Johannes Schindelin wrote:

> Hi,
>
> On Thu, 1 Dec 2005, W. Craig Scratchley wrote:
>
>> On Windows (XP), however, I am getting files of the form s??? in the C:\
>> directory.  This is causing problems at SFU because student accounts don't
>> have write access to the C:\ directory and this seems to be causing Qemu to
>> immediately crash.
>>
>> [...]
>>
>> Seems like an issue which has not yet been addressed for Windows builds.
>
> Correct. The culprit is the function get_tmp_filename() in block.c. Since
> you cannot remove a file, but still keep a filehandle open (on windblows),
> there is no really nice way to go about that.

I would venture a gues that winblows is windows in which case you are not
really correct:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/createfile.asp

FILE_SHARE_DELETE and all that

-- 
mailto:malc@pulsesoft.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] Location of temporary file for sectors on Windows (XP)
  2005-12-06  1:46   ` malc
@ 2005-12-06  1:56     ` Johannes Schindelin
  2005-12-06  2:01       ` malc
  2005-12-06  7:44       ` [Qemu-devel] Location of temporary file for sectors on Windows Jernej Simončič
  0 siblings, 2 replies; 6+ messages in thread
From: Johannes Schindelin @ 2005-12-06  1:56 UTC (permalink / raw)
  To: qemu-devel

Hi,

On Tue, 6 Dec 2005, malc wrote:

> On Tue, 6 Dec 2005, Johannes Schindelin wrote:
> 
> > Hi,
> > 
> > On Thu, 1 Dec 2005, W. Craig Scratchley wrote:
> > 
> > > On Windows (XP), however, I am getting files of the form s??? in the C:\
> > > directory.  This is causing problems at SFU because student accounts don't
> > > have write access to the C:\ directory and this seems to be causing Qemu
> > > to
> > > immediately crash.
> > > 
> > > [...]
> > > 
> > > Seems like an issue which has not yet been addressed for Windows builds.
> > 
> > Correct. The culprit is the function get_tmp_filename() in block.c. Since
> > you cannot remove a file, but still keep a filehandle open (on windblows),
> > there is no really nice way to go about that.
> 
> I would venture a gues that winblows is windows in which case you are not
> really correct:
> 
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/createfile.asp

I cannot access that link...

> FILE_SHARE_DELETE and all that

... but having had lots of fun with win32 I gather this is not really 
backwards compatible? Or, alternatively, it fails on FAT?

Ciao,
Dscho

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] Location of temporary file for sectors on Windows (XP)
  2005-12-06  1:56     ` Johannes Schindelin
@ 2005-12-06  2:01       ` malc
  2005-12-06  7:44       ` [Qemu-devel] Location of temporary file for sectors on Windows Jernej Simončič
  1 sibling, 0 replies; 6+ messages in thread
From: malc @ 2005-12-06  2:01 UTC (permalink / raw)
  To: qemu-devel

On Tue, 6 Dec 2005, Johannes Schindelin wrote:

>>
>> I would venture a gues that winblows is windows in which case you are not
>> really correct:
>>
>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/createfile.asp
>
> I cannot access that link...

Strange..
Just search msdn for CreateFile

>
>> FILE_SHARE_DELETE and all that
>
> ... but having had lots of fun with win32 I gather this is not really
> backwards compatible? Or, alternatively, it fails on FAT?

It's not supported on Win 98/95/Me

-- 
mailto:malc@pulsesoft.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] Location of temporary file for sectors on Windows
  2005-12-06  1:56     ` Johannes Schindelin
  2005-12-06  2:01       ` malc
@ 2005-12-06  7:44       ` Jernej Simončič
  1 sibling, 0 replies; 6+ messages in thread
From: Jernej Simončič @ 2005-12-06  7:44 UTC (permalink / raw)
  To: Johannes Schindelin on [qemu-devel]

On Tuesday, December 6, 2005, 2:56:54, Johannes Schindelin wrote:

>> FILE_SHARE_DELETE and all that
> ... but having had lots of fun with win32 I gather this is not really
> backwards compatible? Or, alternatively, it fails on FAT?

MSDN says:

,----- [ FILE_SHARE_DELETE ]
| Enables subsequent open operations on an object to request delete access.
| 
| Otherwise, other processes cannot open the object if they request delete
| access.
| 
| If this flag is not specified, but the object has been opened for delete
| access, the function fails.
| 
|    Windows Me/98/95:  This flag is not supported.
`-----

-- 
< Jernej Simončič ><><><><>< http://deepthought.ena.si/ >

If the shoe fits, it's ugly. If it's good, they discontinue it.
       -- Law of Consumer Economics

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-12-06  7:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-02  0:58 [Qemu-devel] Location of temporary file for sectors on Windows (XP) W. Craig Scratchley
2005-12-06  1:30 ` Johannes Schindelin
2005-12-06  1:46   ` malc
2005-12-06  1:56     ` Johannes Schindelin
2005-12-06  2:01       ` malc
2005-12-06  7:44       ` [Qemu-devel] Location of temporary file for sectors on Windows Jernej Simončič

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).