Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 18125
b: refs/heads/master
c: 8a423e5
h: refs/heads/master
i:
  18123: 0dd2cec
v: v3
  • Loading branch information
Al Viro authored and Linus Torvalds committed Jan 12, 2006
1 parent cbd1953 commit 4546a03
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 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: 6225d85f171f8b7a776850d30352bd196f9bd0d6
refs/heads/master: 8a423e542b4a9af45ac0106ab8275760af770793
8 changes: 3 additions & 5 deletions trunk/drivers/block/amiflop.c
Original file line number Diff line number Diff line change
Expand Up @@ -1441,6 +1441,7 @@ static int fd_ioctl(struct inode *inode, struct file *filp,
{
int drive = iminor(inode) & 3;
static struct floppy_struct getprm;
void __user *argp = (void __user *)param;

switch(cmd){
case FDFMTBEG:
Expand Down Expand Up @@ -1486,9 +1487,7 @@ static int fd_ioctl(struct inode *inode, struct file *filp,
getprm.head=unit[drive].type->heads;
getprm.sect=unit[drive].dtype->sects * unit[drive].type->sect_mult;
getprm.size=unit[drive].blocks;
if (copy_to_user((void *)param,
(void *)&getprm,
sizeof(struct floppy_struct)))
if (copy_to_user(argp, &getprm, sizeof(struct floppy_struct)))
return -EFAULT;
break;
case FDSETPRM:
Expand All @@ -1500,8 +1499,7 @@ static int fd_ioctl(struct inode *inode, struct file *filp,
break;
#ifdef RAW_IOCTL
case IOCTL_RAW_TRACK:
if (copy_to_user((void *)param, raw_buf,
unit[drive].type->read_size))
if (copy_to_user(argp, raw_buf, unit[drive].type->read_size))
return -EFAULT;
else
return unit[drive].type->read_size;
Expand Down

0 comments on commit 4546a03

Please sign in to comment.