Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 213079
b: refs/heads/master
c: 2521610
h: refs/heads/master
i:
  213077: 5115c6b
  213075: 1f8fbba
  213071: b4809af
v: v3
  • Loading branch information
Stephen M. Cameron authored and Jens Axboe committed Sep 10, 2010
1 parent ce4be52 commit c16c3e1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 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: 4c800eed9a46f7b6a469d24e7e6051b23e62bb69
refs/heads/master: 252161094255ffdc277b8a0e5e12b0a8ff67b10f
28 changes: 15 additions & 13 deletions trunk/drivers/block/cciss.c
Original file line number Diff line number Diff line change
Expand Up @@ -1291,6 +1291,20 @@ static int cciss_setintinfo(ctlr_info_t *h, void __user *argp)
return 0;
}

static int cciss_getnodename(ctlr_info_t *h, void __user *argp)
{
NodeName_type NodeName;
int i;

if (!argp)
return -EINVAL;
for (i = 0; i < 16; i++)
NodeName[i] = readb(&h->cfgtable->ServerName[i]);
if (copy_to_user(argp, NodeName, sizeof(NodeName_type)))
return -EFAULT;
return 0;
}

static int cciss_ioctl(struct block_device *bdev, fmode_t mode,
unsigned int cmd, unsigned long arg)
{
Expand All @@ -1309,19 +1323,7 @@ static int cciss_ioctl(struct block_device *bdev, fmode_t mode,
case CCISS_SETINTINFO:
return cciss_setintinfo(h, argp);
case CCISS_GETNODENAME:
{
NodeName_type NodeName;
int i;

if (!arg)
return -EINVAL;
for (i = 0; i < 16; i++)
NodeName[i] =
readb(&h->cfgtable->ServerName[i]);
if (copy_to_user(argp, NodeName, sizeof(NodeName_type)))
return -EFAULT;
return 0;
}
return cciss_getnodename(h, argp);
case CCISS_SETNODENAME:
{
NodeName_type NodeName;
Expand Down

0 comments on commit c16c3e1

Please sign in to comment.