Misc util patch

David Woodhouse dwmw2 at infradead.org
Thu Apr 3 06:51:11 EST 2003


On Wed, 2003-04-02 at 22:13, Stephane Fillod wrote:
> Hi,
> 
> Please find attached a patch against mtd-snapshot-20030325.
> 
> Fixes:
> * typo in eraseall.c, enable short option 'j', make cleanmarker to work:
>   this was obviously NOT tested. Now, it's okay.

Applied.

> * potential bug fix in mkfs.jffs2.c, because cpu_to_je32 can be a macro.
>   BTW, this cleans a warning under ppcboot about unexpected node version.

I think the warning's bogus -- what precisely does it complain about?
Incrementing version more than once is a bug but a harmless one.

I think I'd rather fix the macro instead so it doesn't evaluate 'x' more
than once...

#define t16(x) ({ uint16_t b = x; (target_endian==__BYTE_ORDER)?x:bswap_16(b); })
#define t32(x) ({ uint32_t b = x; (target_endian==__BYTE_ORDER)?x:bswap_32(b); })

> * undefined prototypes in compr_rtime.c

No Likee Ifdefs.

I think it's probably time to stop mkfs.jffs2 from using kernel code at
all. If this is just a warning, let it stay. It's ugly but the fact
we're using kernel files at all is ugly anyway :)

> * gcc-3.x warning cleanups in mtd_debug.c
> * getopt'ified fcp.c, fixes a bug with "fcp -h"

Applied.

Thanks for the fixes.

-- 
dwmw2




More information about the linux-mtd mailing list