Magic bitmask 0x1985 not found

McNutt, Scott smcnutt at artesyncp.com
Fri Jul 20 13:29:50 EDT 2001


> From: David Woodhouse
> 
> smcnutt at artesyncp.com said:
> >  I thought I used 131072. But based on the dump, I must have
> > fat-fingered 131071 :-(. I made a new image with -e 131072 and it
> > looks good.
> 
> Er, yes, that would confuse it quite a lot. Perhaps we ought to make 
> mkfs.jffs2 reject values which aren't a power of two?
> 
Here's a quicky:

		case 'e':
            {
                unsigned int erase_mask;
                erase_block_size = strtol(optarg, NULL, 0);
                erase_mask = (unsigned)(-1)>>
                    ((sizeof(erase_block_size)<<3) - ffs(erase_block_size )
+ 1);
                if( erase_block_size & erase_mask ){
                    printf( "erase size must be power of 2\n");
                    exit(1);
                }
            }
			break;





More information about the linux-mtd mailing list