[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug in MiNTlibs' stat()
Hi,
finally I know why PARCP has problems with reading CD-ROM directories -
there's a bug in stat() of MiNTlibs pl46. The patch follows:
--- do_stat.c Tue Mar 14 21:03:44 1995
+++ /usr/src/libsrc/do_stat.c Sat Jun 7 06:26:46 1997
@@ -53,7 +53,6 @@
short magic;
_DTA d;
int isdot = 0;
- static short have_fxattr = 1; /* for the first call, assume we have it */
if (!_path) {
@@ -69,12 +68,17 @@
/* try to use the build in stat() call, but if the system does not
* have it, record that and never try again
*/
- if (have_fxattr) {
- r = Fxattr(lflag, path, st);
- if (r == -EINVAL) {
- have_fxattr = 0;
- }
- else if (r) {
+
+ /* actually we can't do that, because Fxattr() works for MetaDOS devices
+ * but returns -EINVAL for other GEMDOS devices. Really unhappy solution.
+ * Since I don't want to patch chdir() and other calls I simply have to
+ * test the presence of Fxattr() every time the stat() is called.
+ * PS 970606
+ */
+
+ r = Fxattr(lflag, path, st);
+ if (r != -EINVAL) {
+ if (r) {
if ((r == -EPATH) && _enoent(path)) {
r = -ENOENT;
}
I wonder if nox or anyone is still working on MiNTlibs, since it's more
than two years ago the last patch level has been created. I would like to
get this patch into the new patch level because it's probably the main
reason why so many clean programs have problems with reading from CD-ROM
(e.g. Paula).
Petr
--
WWW: http://ft3.zlin.vutbr.cz/stehlik/home.htm PARCP development
e-mail: stehlik@cas3.zlin.vutbr.cz
netmail: 2:421/36@fidonet.org, 90:1200/2@nest.ftn AfterBurner040 user