Re: [hatari-devel] Error when saving files |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
Hi,
On 7.12.2022 14.08, Uwe Seimet wrote:
Please see the attachment. The affected file is EDISON.RSM.
Are you sure this is (still) Hatari issue?
The commit in question [1] changed only whether Fopen(read+write) is
changed to Fopen(read-only), and when Fattrib() return value includes
read-only flag.
Whereas your use-case first succeeds and then fails in Fcreate().
At least looking at the trace of "EDISON.RSM" opens, everything looks
now OK from Hatari point of view:
....
GEMDOS 0x3D Fopen("EDISON.RSM", read-only)
-> FD 64 (read-only -> read+write)
....
GEMDOS 0x3E Fclose(64) at PC 0x14220D4
....
GEMDOS 0x3C Fcreate("EDISON.RSM", 0x0)
-> FD 64 (read/write)
GEMDOS 0x3E Fclose(64) at PC 0x14220D4
....
GEMDOS 0x4C Pterm(0) at PC 0x15C3E0C
GEMDOS 0x3C Fcreate("EDISON.RSM", 0x0)
-> ERROR (errno = 13)
WARN : GEMDOS failed to create/truncate 'EDISON.RSM'
Testing doing multiple Fcreate()s in row for same file in EmuCON2 works
fine too.
In case your use-case is doing Fattrib calls for that file, can you
provide full "--trace gemdos" output, and list of given directory
contents & their access rights?
If you can run it on Linux, output from running Hatari + your test-case
with "strace -f -e openat,access" could also help, so that I can see
what happens also on the host side.
- Eero
[1] It was a fix for an earlier commit that changed Fopen(read-only) to
be implemented as fopen("wb+"), because TOS allows writes to files
opened as read-only.
On 7.12.2022 14.00, Uwe Seimet wrote:
It's still not working I'm afraid. The file write permssions are still
removed.
Can you provide "--trace os_base" output?
- Eero
Best regards
Uwe
Hi Uwe,
Thanks for reporting this!
I think it should be fixed now, could you verify?
- Eero
On 6.12.2022 22.38, Uwe Seimet wrote:
I just found that Hatari changes the file permissions from rwrwrw to
read-only for all.
When starting a batch job the EDISON text editor reports that a file is
protected or already existing as a folder. Hatari shows this warning:
WARN : GEMDOS failed to create/truncate '/home/us/TT/D/HDDRIVER/EDISON.RSM'
This issue must be caused by a very recent commit. I guess it's this one:
* 8fe983f2 - Fix GEMDOS HD checks for files writable only by other users (21 hours ago) <Eero Tamminen>
Best regards
Uwe