|
From: <jo...@hy...> - 2002-09-22 19:57:33
|
Hi,
while testing some old Xenix programs, I found two bugs in linux-abi. The
solution in both cases was in the iBCS code :-| .
case_1: these old programs tend to read a directory with read().
a) Xenix doesn't allow filenames longer than 14 characters. So longer
Linux entries have to be skipped (this was missing).
b) the long Linux inodes have to be folded to short inodes. This was
wrong, some type casts were missing.
This is in abi/svr4/misc.c
case_2: For old V3 programs (linux "file" says pre-SysV) Xenix allows to get
a read_lock for files opened with access mode WRONLY, Linux doesn't.
It looks to me as if this "feature" is part of the bug compattibility
of newer Xenix versions for those old V3 programs. I imagine that in
the dark ages of Unix there was a Xenix Version with a rather broken
implementation of locking. Read locks were handled as if they were
write locks and so on.
Parts of this "bug compattibility" are handled in user land: x286emul.
This one can't. So xnx_locking() has to set the access mode for the
file temporarily to RDWR while getting the lock. NOTE: this will
change the behaviour for V5 programs: they may get a lock in a
situation where Xenix doesn't allow the lock. To overcome this, we
probably have to invent an new personality.
This is in abi/cxenix/misc.c .
Please include this patch (or a better solution) in future linux-abi versions.
Christoph, are you still listening?
Joerg
--
------------------------------------------------------------------------------
Joerg Ahrens _/
Koenigsberger Strasse 32 _/_/
31226 Peine _/ _/
Tel.: 05171/57308 _/ _/_/_/_/
e-mail: jo...@hy... _/_/_/_/ _/
------------------------------------------------------------------------------
|