Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 213083
b: refs/heads/master
c: 8a4f7fb
h: refs/heads/master
i:
  213081: 2ef4ef7
  213079: c16c3e1
v: v3
  • Loading branch information
Stephen M. Cameron authored and Jens Axboe committed Sep 10, 2010
1 parent 610e841 commit 1123b02
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 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: d18dfad4e2bf6c2d2c5c104d882b14b9fee71b14
refs/heads/master: 8a4f7fbfdd76a304c8f04dde6b8fd0e5c50bbe76
27 changes: 15 additions & 12 deletions trunk/drivers/block/cciss.c
Original file line number Diff line number Diff line change
Expand Up @@ -1357,6 +1357,20 @@ static int cciss_getbustypes(ctlr_info_t *h, void __user *argp)
return 0;
}

static int cciss_getfirmver(ctlr_info_t *h, void __user *argp)
{
FirmwareVer_type firmware;

if (!argp)
return -EINVAL;
memcpy(firmware, h->firm_ver, 4);

if (copy_to_user
(argp, firmware, sizeof(FirmwareVer_type)))
return -EFAULT;
return 0;
}

static int cciss_ioctl(struct block_device *bdev, fmode_t mode,
unsigned int cmd, unsigned long arg)
{
Expand All @@ -1383,18 +1397,7 @@ static int cciss_ioctl(struct block_device *bdev, fmode_t mode,
case CCISS_GETBUSTYPES:
return cciss_getbustypes(h, argp);
case CCISS_GETFIRMVER:
{
FirmwareVer_type firmware;

if (!arg)
return -EINVAL;
memcpy(firmware, h->firm_ver, 4);

if (copy_to_user
(argp, firmware, sizeof(FirmwareVer_type)))
return -EFAULT;
return 0;
}
return cciss_getfirmver(h, argp);
case CCISS_GETDRIVVER:
{
DriverVer_type DriverVer = DRIVER_VERSION;
Expand Down

0 comments on commit 1123b02

Please sign in to comment.