- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Greetings,
Between version 1.3 and 1.4 there were some several changes to cramfs ... and unfortunately, there is some pretty broken code in cramfs/inode.c. Specifically, some new bit manipulation macros were added that hose the fs from the get-go. Anyway, for those who use cramfs, here's a quick fix:<div class='quotetop'>QUOTE </div> --- Quote Start --- #if defined(CRAMFS_LOBOTOMY_COMPLETE) /* severe brain damage -- do not use */# define CRAMFS_16(x) le16_to_cpu(x)# define CRAMFS_24(x) ((le32_to_cpu(x)) >> 8)# define CRAMFS_32(x) le32_to_cpu(x) # define CRAMFS_GET_NAMELEN(x) (((u8*)(x))[8] & 0x3f)# define CRAMFS_GET_OFFSET(x) ((CRAMFS_24(((u32*)(x))[2] & 0xffffff) << 2) | ((((u32*)(x))[2] & 0xc0000000) >> 30)) #else /* work with nios ii 5.0 -- assume nothing more ;-) */# define CRAMFS_16(x) le16_to_cpu(x)# define CRAMFS_24(x) ((le32_to_cpu(x)) & 0x00ffffff)# define CRAMFS_32(x) le32_to_cpu(x) # define CRAMFS_GET_NAMELEN(x) (le32_to_cpu(((u32*)(x))[2]) & 0x03f)# define CRAMFS_GET_OFFSET(x) (le32_to_cpu(((u32*)(x))[2]) >> 6)# endif[/b] --- Quote End --- Regards, --ScottLink Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks scott!
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page