dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Read only files in windows

Read only files in windows

From: BlueChip <>
Date: Wed, 07 Jul 2004 19:20:38 +0100

I have noticed that any files created under windows by the simulator end up
being read only.
I did a search and found exactly what I needed (don't you just love google)

A copy of the post at that link is below...


>I got a question wrt to gcc and cygwin. I'm not sure if this is the defined
>behaviour, but for some reason, the following code fails. This is a test
>program which display the failure.
>Running cygwin on windows 2000. Compiling with mingw (no-cygwin option)
>Basically, after creat...close... the file is set to read only (check
>attributes under windows). This causes the second to fail. On the
second run
>of the program, the creat fails as well. Any idea why the file is being
set to
>read only?
>#include <io.h>
>#include <stdio.h>
>#include <fcntl.h>
>int main()
> int handle;
> handle= creat("hello.txt", O_WRONLY);
This isn't the correct argument for creat. The second argument is
the mode, as in what you send to chmod (2).

Received on 2004-07-07

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy