Sun Dec  4 16:34:39 ART 2005  Alberto Bertogli <albertogli@telpin.com.ar>
  * Fix check for read-only access in jopen().
  
  As a comment right above says, checking for read-only access can't be done by
  "if (flags & O_RDONLY)" since O_RDONLY is usually 0. We test jflags & J_RDONLY
  instead because we know it's properly defined.
  
  Thanks to Brian Moyle for reporting this bug and providing a slightly
  different patch.
diff -rN -u old-libjio/trans.c new-libjio/trans.c
--- old-libjio/trans.c	2005-12-19 22:26:27.000000000 -0300
+++ new-libjio/trans.c	2005-12-19 22:26:27.000000000 -0300
@@ -594,7 +594,7 @@
 		goto error_exit;
 
 	/* nothing else to do for read-only access */
-	if (flags & O_RDONLY) {
+	if (jflags & J_RDONLY) {
 		return fs->fd;
 	}
 

