[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Re-naming accs
On Sat, 2010-05-15 at 20:33 -0400, Mark Duckworth wrote:
> On 5/15/10 3:59 AM, Alan Hourihane wrote:
> > On Sat, 2010-05-15 at 08:44 +0200, Helmut Karlowski wrote:
> >
> >> Am 15.05.2010, 08:19 Uhr, schrieb Helmut Karlowski
> >> <helmut.karlowski@ish.de>:
> >>
> >>
> >>> Am 14.05.2010, 23:28 Uhr, schrieb Alan Hourihane<alanh@fairlite.co.uk>:
> >>>
> >>>
> >>>>> On FAT I have this too. So maybe it's a bug. Remove works.
> >>>>>
> >>>>> Ext2 works.
> >>>>>
> >>>> It's a kernel bug that's already been fixed on the trunk.
> >>>>
> >>> I can't find it in the diffs. Which particular patch is it?
> >>>
> >> trunk-kernel has the bug too.
> >>
> >> #cat t
> >> set -x
> >> ./sleep.ttp 333&
> >> mv sleep.ttp xy
> >>
> >> t.out:
> >>
> >> + set -x
> >> + ./sleep.ttp 333
> >> [1] 32
> >> + /bin/mv -iv sleep.ttp xy
> >> `sleep.ttp' -> `xy'
> >> /bin/mv: cannot move `sleep.ttp' to `xy': Permission denied
> >>
> > And looking at the code it's purposely done that this should fail with
> > permission denied. I'm not sure why though. It's an easy fix. Look at
> > fatfs.c and the function fatfs_rename() and the first #if 1 statement
> > should be made into #if 0. Try that and see if it helps.
> >
> > Alan.
> >
> I recall reading something long long ago suggesting that if you rename
> or delete an executable on a fatfs partition while it is open,
> corruption results. I could be way off base but that's what I am
> remembering.
There's an easy test. If we can rename without MiNT, then we can fix
MiNT. Let's try under plain TOS and see. Helmut ?
Alan.