[PATCH] MTD ioctl interface rework to get rid of MEMGETOOBSEL/MEMSETOOBSEL

Jörn Engel joern at wohnheim.fh-wedel.de
Tue Nov 29 10:35:42 EST 2005


On Tue, 29 November 2005 18:06:59 +0300, Vitaly Wool wrote:
> diff -uNr linux-2.6.10.orig/include/mtd/mtd-abi.h linux-2.6.10.nand/include/mtd/mtd-abi.h
> --- linux-2.6.10.orig/include/mtd/mtd-abi.h	2005-11-24 15:58:49.000000000 +0300
> +++ linux-2.6.10.nand/include/mtd/mtd-abi.h	2005-11-28 17:03:12.000000000 +0300
> @@ -102,8 +102,7 @@
>  #define MEMUNLOCK               _IOW('M', 6, struct erase_info_user)
>  #define MEMGETREGIONCOUNT	_IOR('M', 7, int)
>  #define MEMGETREGIONINFO	_IOWR('M', 8, struct region_info_user)
> -#define MEMSETOOBSEL		_IOW('M', 9, struct nand_oobinfo)
> -#define MEMGETOOBSEL		_IOR('M', 10, struct nand_oobinfo)
> +#define MEMGETOOBAVAIL		_IOR('M', 10, uint32_t)
>  #define MEMGETBADBLOCK		_IOW('M', 11, loff_t)
>  #define MEMSETBADBLOCK		_IOW('M', 12, loff_t)
>  #define OTPSELECT		_IOR('M', 13, int)

You really don't want to reuse an old ioctl().  Even removing the code
to handle an old number breaks binary compatibility.  But changing the
behaviour will result in silent breakage.

Jörn

-- 
When in doubt, punt.  When somebody actually complains, go back and fix it...
The 90% solution is a good thing.
-- Rob Landley




More information about the linux-mtd mailing list