UBI: add ioctl for map operation
This patch adds ioctl for the LEB map operation (as a debugging option so far). [Re-named ioctl to make it look the same as the other one and made some minor stylistic changes. Artem Bityutskiy.] Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
This commit is contained in:
committed by
Artem Bityutskiy
parent
1de9e8e70f
commit
141e6ebd1b
@@ -518,6 +518,20 @@ static int vol_cdev_ioctl(struct inode *inode, struct file *file,
|
||||
err = ubi_wl_flush(ubi);
|
||||
break;
|
||||
}
|
||||
|
||||
/* Logical eraseblock map command */
|
||||
case UBI_IOCEBMAP:
|
||||
{
|
||||
struct ubi_map_req req;
|
||||
|
||||
err = copy_from_user(&req, argp, sizeof(struct ubi_map_req));
|
||||
if (err) {
|
||||
err = -EFAULT;
|
||||
break;
|
||||
}
|
||||
err = ubi_leb_map(desc, req.lnum, req.dtype);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
default:
|
||||
|
Reference in New Issue
Block a user