[PATCH] makes 'find' work with Amiga RR enhanced ISO CD's

Michael Krause (m.krause@tu-harburg.de)
Wed, 27 May 1998 21:23:45 +0200 (CEST)


Hi,

this patch fixes a bug in the isofs, or rather hides a bug in numerous
CDs I own which have been manufactured with the Amiga RockRidge
extensions. Those CD's contain RockRidge PX entries, but the n_links
field for directories is always 2 (even if the directory contains
entries), so 'find' is unable to examine the CD (this 'bug' is
mentioned in inode.c, too). This patch makes the 2 into a 1, so 'find'
is forced to do a real directory scan.

--- fs/isofs103org/rock.c Wed May 27 20:34:46 1998
+++ fs/isofs/rock.c Wed May 27 20:55:01 1998
@@ -274,7 +274,9 @@
break;
case SIG('P','X'):
inode->i_mode = isonum_733(rr->u.PX.mode);
- inode->i_nlink = isonum_733(rr->u.PX.n_links);
+ if((inode->i_nlink = isonum_733(rr->u.PX.n_links)) == 2
+ && S_ISDIR(inode->i_mode))
+ inode->i_nlink = 1;
inode->i_uid = isonum_733(rr->u.PX.uid);
inode->i_gid = isonum_733(rr->u.PX.gid);
break;

Comments?

-- 
michael krause [aka raw style / lego] - http://ms.demo.org/rst/

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu