Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 63896
b: refs/heads/master
c: a6b3a93
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Hellwig authored and Jens Axboe committed Aug 11, 2007
1 parent 442eb75 commit 5d81336
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 20 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: 2e4934aa4586832c35e077191849a06f93e4a9a0
refs/heads/master: a6b3a93e15b2925a151e9ae13dcb93ad7b3e48aa
29 changes: 10 additions & 19 deletions trunk/drivers/block/xsysace.c
Original file line number Diff line number Diff line change
Expand Up @@ -902,26 +902,17 @@ static int ace_release(struct inode *inode, struct file *filp)
return 0;
}

static int ace_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg)
static int ace_getgeo(struct block_device *bdev, struct hd_geometry *geo)
{
struct ace_device *ace = inode->i_bdev->bd_disk->private_data;
struct hd_geometry __user *geo = (struct hd_geometry __user *)arg;
struct hd_geometry g;
dev_dbg(ace->dev, "ace_ioctl()\n");

switch (cmd) {
case HDIO_GETGEO:
g.heads = ace->cf_id.heads;
g.sectors = ace->cf_id.sectors;
g.cylinders = ace->cf_id.cyls;
g.start = 0;
return copy_to_user(geo, &g, sizeof(g)) ? -EFAULT : 0;
struct ace_device *ace = bdev->bd_disk->private_data;

default:
return -ENOTTY;
}
return -ENOTTY;
dev_dbg(ace->dev, "ace_getgeo()\n");

geo->heads = ace->cf_id.heads;
geo->sectors = ace->cf_id.sectors;
geo->cylinders = ace->cf_id.cyls;

return 0;
}

static struct block_device_operations ace_fops = {
Expand All @@ -930,7 +921,7 @@ static struct block_device_operations ace_fops = {
.release = ace_release,
.media_changed = ace_media_changed,
.revalidate_disk = ace_revalidate_disk,
.ioctl = ace_ioctl,
.getgeo = ace_getgeo,
};

/* --------------------------------------------------------------------
Expand Down

0 comments on commit 5d81336

Please sign in to comment.