Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 82830
b: refs/heads/master
c: 135da0b
h: refs/heads/master
v: v3
  • Loading branch information
Christian Borntraeger authored and Rusty Russell committed Feb 4, 2008
1 parent 039ef74 commit 488b169
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 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: 6c0cd7c000dc0851035c5003bf9d47733d0b257b
refs/heads/master: 135da0b037984c0284acdf40aaf4f7f31eb5cbd0
15 changes: 13 additions & 2 deletions trunk/drivers/block/virtio_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,20 @@ static int virtblk_ioctl(struct inode *inode, struct file *filp,
(void __user *)data);
}

/* We provide getgeo only to please some old bootloader/partitioning tools */
static int virtblk_getgeo(struct block_device *bd, struct hd_geometry *geo)
{
/* some standard values, similar to sd */
geo->heads = 1 << 6;
geo->sectors = 1 << 5;
geo->cylinders = get_capacity(bd->bd_disk) >> 11;
return 0;
}

static struct block_device_operations virtblk_fops = {
.ioctl = virtblk_ioctl,
.owner = THIS_MODULE,
.ioctl = virtblk_ioctl,
.owner = THIS_MODULE,
.getgeo = virtblk_getgeo,
};

static int virtblk_probe(struct virtio_device *vdev)
Expand Down

0 comments on commit 488b169

Please sign in to comment.