Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 130427
b: refs/heads/master
c: a27ce8f
h: refs/heads/master
i:
  130425: 7d9ad42
  130423: 81f5669
v: v3
  • Loading branch information
Corentin Chary authored and Artem Bityutskiy committed Jan 18, 2009
1 parent a3fd026 commit ff3f07a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c3da23be1673be4e738aea235604b4e6cb259655
refs/heads/master: a27ce8f55dd5fddf0b8ea179cce8f399c13dc94f
14 changes: 14 additions & 0 deletions trunk/drivers/mtd/ubi/cdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,20 @@ static int vol_cdev_ioctl(struct inode *inode, struct file *file,
err = ubi_leb_unmap(desc, lnum);
break;
}

/* Check if logical eraseblock is mapped command */
case UBI_IOCEBISMAP:
{
int32_t lnum;

err = get_user(lnum, (__user int32_t *)argp);
if (err) {
err = -EFAULT;
break;
}
err = ubi_is_mapped(desc, lnum);
break;
}
#endif

default:
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/mtd/ubi-user.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@
#define UBI_IOCEBMAP _IOW(UBI_VOL_IOC_MAGIC, 3, struct ubi_map_req)
/* Unmap an eraseblock, used for debugging, disabled by default */
#define UBI_IOCEBUNMAP _IOW(UBI_VOL_IOC_MAGIC, 4, int32_t)
/* Check if an eraseblock is mapped, used for debugging, disabled by default */
#define UBI_IOCEBISMAP _IOR(UBI_VOL_IOC_MAGIC, 5, int32_t)

/* Maximum MTD device name length supported by UBI */
#define MAX_UBI_MTD_NAME_LEN 127
Expand Down

0 comments on commit ff3f07a

Please sign in to comment.