Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 27914
b: refs/heads/master
c: 73c619e
h: refs/heads/master
v: v3
  • Loading branch information
Joern Engel committed May 30, 2006
1 parent db23c0a commit d40e170
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 92cbfdcc3661d7670b01b92b89811cd3a2412297
refs/heads/master: 73c619ea0e49c9306afa7ea53c3362fbc56ffd70
11 changes: 10 additions & 1 deletion trunk/drivers/mtd/mtdchar.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ static int mtd_ioctl(struct inode *inode, struct file *file,
void __user *argp = (void __user *)arg;
int ret = 0;
u_long size;
struct mtd_info_user info;

DEBUG(MTD_DEBUG_LEVEL0, "MTD_ioctl\n");

Expand Down Expand Up @@ -415,7 +416,15 @@ static int mtd_ioctl(struct inode *inode, struct file *file,
}

case MEMGETINFO:
if (copy_to_user(argp, mtd, sizeof(struct mtd_info_user)))
info.type = mtd->type;
info.flags = mtd->flags;
info.size = mtd->size;
info.erasesize = mtd->erasesize;
info.writesize = mtd->writesize;
info.oobsize = mtd->oobsize;
info.ecctype = mtd->ecctype;
info.eccsize = mtd->eccsize;
if (copy_to_user(argp, &info, sizeof(struct mtd_info_user)))
return -EFAULT;
break;

Expand Down

0 comments on commit d40e170

Please sign in to comment.