[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

D(x)readdir()-problems



Hi!

Some of you may know my Ramdisk-XFS for MagiC. On 68000 machines, it
crashes as soon as the internal fileselector of MagiC starts to read a
directory from it. The reason for this is the fact that I silently
assumed that the buffer to store index and filename in is word aligned,
which causes an address error on 68000 machines if it's not.

I then looked at the MiNT docs and found nothing that forbids to use a
non-word aligned buffer address for D(x)readdir(), but looking at the
MiNT source and the source of the MinixFS, I found that all of them also
silently assume a word aligned buffer, as they use *(long *) to store
the index in it.

It seems that all programs out there happen to use word aligned buffers
(except the already mentioned MagiC fileselector), so I think it's best
to post document that you have to supply a word aligned buffer to
D(x)readdir(). It would of course be no problem to release a new MiNT
with new internal FSes, but one would also have to patch MinixFS and
some other external filesystems to be on the safe side, which is not
that easy as not all of them are still officially supported by their
authors.

Comments?


Ciao

Thomas


-- 
Thomas Binder (Gryf @ IRCNet)  gryf@hrzpub.tu-darmstadt.de
PGP-key available on request!  binder@rbg.informatik.tu-darmstadt.de

Attachment: pgpxEcq0aGhKh.pgp
Description: PGP signature