Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> writes: > On Tue, Dec 03, 2013 at 11:04:45PM +0100, Robert Jarzmik wrote: > For MEMGETINFO we can directly call into _mtd_ioctl(), but for > MEM[SG]ETBADBLOCK the offsets would have to be corrected first. Is this > worth the effort? Otherwise we could do something like: > > int mtdraw_ioctl(struct cdev *cdev, int request, void *buf) > { > struct mtd_info *mtd = to_mtd(cdev); > > switch (request) { > case MEMGETINFO: > return mtd_memgetinfo(mtd, buf); > default: > return -EINVAL; > } > } Yes, that looks like the right thing to do. I don't think MEM[GS]ETBADBLOCK are used anywhere at this time for raw devices. And I'm not convinced it is worth the effort just as you. And let's be pragmatic : is somebody needs the badblock ioctls, he'll add them :) By now, I'm happy with your patch. Cheers. -- Robert _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox