[Q] MEMGETREGIONxxx ioctls

Eric ebrower at usa.net
Thu Apr 12 15:27:16 EDT 2001


Here are a few questions related to the MEMGETREGIONxxx ioctls.
I'd simply submit a patch, but I am not sure about the reasoning
and I'm not near a build system for verification:

	1) Why is MEMGETREGIONCOUNT declared with _IOW
	   instead of _IOR in mtd.h?  It seems to be a
	   read from kernelspace, rather than a write to
           kernelspace in mtdchar.c.

	2) Why is MEMGETREGIONINFO declared likewise with _IOW
	   instead of _IOWR?  The ioctl in mtdchar.c reads the
	   regionindex member and then populates the rest of the
	   struct accordingly.

	3) Do we need the declaration of 
		"struct mtd_erase_region_info *kr"
	   inside the MEMGETREGIONINFO ioctl handler?  It is 
	   initialized but never used, so I doubt it is necessary.

Thanks,
E

____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1


To unsubscribe, send "unsubscribe mtd" to majordomo at infradead.org



More information about the linux-mtd mailing list