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

Re: Once again: File locking broken under MiNT 1.12h4?



Sascha Blank wrote:

[ Fcntl(,,F_SETLK) broken in 1.12.4 ]

I think this is due to a bug in Julian's Fcntl(,,F_GETOPENS) code.
Try the patch below.

Michael
-- 
Email: hohmuth@inf.tu-dresden.de
WWW:   http://www.inf.tu-dresden.de/~mh1/

--- dosfile.c~	Sun Jun 11 13:42:26 1995
+++ dosfile.c	Thu Jun 15 15:41:11 1995
@@ -1155,6 +1155,8 @@
 		return 0;
 	case FSTAT:
 		return (*f->fc.fs->getxattr)(&f->fc, (XATTR *)arg);
+	case F_GETOPENS:
+		return get_opens (&f->fc, (struct listopens *)arg);
 	case F_SETLK:
 	case F_SETLKW:
 	/* make sure that the file was opened with appropriate permissions */
@@ -1167,8 +1169,6 @@
 				return EACCDN;
 		}
 		/* fall through to device ioctl */
-	case F_GETOPENS:
-		return get_opens (&f->fc, (struct listopens *)arg);
 	default:
 		TRACE(("Fcntl mode %x: calling ioctl",cmd));
 		if (is_terminal(f)) {