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

Vitaly Wool vwool at ru.mvista.com
Tue Nov 29 10:39:40 EST 2005


Agreed, thanks.
However, I think we should return error for MEMSETOOBSEL/MEMGETOOBSEL 
for userland apps to learn they can't change oobinfo any more.

Vitaly

JЖrn Engel wrote:

>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
>
>  
>





More information about the linux-mtd mailing list