Re: [Qemu-devel] Location of temporary file for sectors on Windows

2005-12-06 Thread Jernej Simončič
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



___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


Re: [Qemu-devel] Location of temporary file for sectors on Windows (XP)

2005-12-05 Thread Johannes Schindelin
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



___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


Re: [Qemu-devel] Location of temporary file for sectors on Windows (XP)

2005-12-05 Thread malc

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:[EMAIL PROTECTED]


___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


Re: [Qemu-devel] Location of temporary file for sectors on Windows (XP)

2005-12-05 Thread Johannes Schindelin
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



___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


Re: [Qemu-devel] Location of temporary file for sectors on Windows (XP)

2005-12-05 Thread malc

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:[EMAIL PROTECTED]


___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


[Qemu-devel] Location of temporary file for sectors on Windows (XP)

2005-12-01 Thread W. Craig Scratchley








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






___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel