Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 197850
b: refs/heads/master
c: 234f272
h: refs/heads/master
v: v3
  • Loading branch information
john cooper authored and Rusty Russell committed May 19, 2010
1 parent bef26c4 commit 4254291
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4cb2ea28c55cf5e5ef83aec535099ffce3c583df
refs/heads/master: 234f2725a5d03f78539f1d36cb32f2c4f9b1822c
10 changes: 10 additions & 0 deletions trunk/drivers/block/virtio_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,16 @@ static int virtblk_ioctl(struct block_device *bdev, fmode_t mode,
struct gendisk *disk = bdev->bd_disk;
struct virtio_blk *vblk = disk->private_data;

if (cmd == 'VBID') {
void __user *usr_data = (void __user *)data;
char id_str[VIRTIO_BLK_ID_BYTES];
int err;

err = virtblk_get_id(disk, id_str);
if (!err && copy_to_user(usr_data, id_str, VIRTIO_BLK_ID_BYTES))
err = -EFAULT;
return err;
}
/*
* Only allow the generic SCSI ioctls if the host can support it.
*/
Expand Down

0 comments on commit 4254291

Please sign in to comment.