Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 139868
b: refs/heads/master
c: 73855e1
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Apr 1, 2009
1 parent 8592da9 commit 1c1f374
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 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: d8881cdab5e1810b0a03b480ed16c1e761e68257
refs/heads/master: 73855e13b2bce2bb5cd2a62c270fb07f49353e02
12 changes: 6 additions & 6 deletions trunk/arch/um/drivers/ubd_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "linux/kernel.h"
#include "linux/module.h"
#include "linux/blkdev.h"
#include "linux/ata.h"
#include "linux/hdreg.h"
#include "linux/init.h"
#include "linux/cdrom.h"
Expand Down Expand Up @@ -1308,16 +1309,15 @@ static int ubd_ioctl(struct block_device *bdev, fmode_t mode,
unsigned int cmd, unsigned long arg)
{
struct ubd *ubd_dev = bdev->bd_disk->private_data;
struct hd_driveid ubd_id = {
.cyls = 0,
.heads = 128,
.sectors = 32,
};
u16 ubd_id[ATA_ID_WORDS];

switch (cmd) {
struct cdrom_volctrl volume;
case HDIO_GET_IDENTITY:
ubd_id.cyls = ubd_dev->size / (128 * 32 * 512);
memset(&ubd_id, 0, ATA_ID_WORDS * 2);
ubd_id[ATA_ID_CYLS] = ubd_dev->size / (128 * 32 * 512);
ubd_id[ATA_ID_HEADS] = 128;
ubd_id[ATA_ID_SECTORS] = 32;
if(copy_to_user((char __user *) arg, (char *) &ubd_id,
sizeof(ubd_id)))
return -EFAULT;
Expand Down

0 comments on commit 1c1f374

Please sign in to comment.