summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjdike <jdike>2003-09-11 14:44:27 +0000
committerjdike <jdike>2003-09-11 14:44:27 +0000
commit6c82166973ac2e671e8e204564545304e1acbe92 (patch)
tree6ff27f3114703f5d15c4a953c5190a8def3a418f
parentdd1934e935e5c83247c355105b77b81e90b7f587 (diff)
downloaduml-history-6c82166973ac2e671e8e204564545304e1acbe92.tar.gz
Fixed the I/O mismatch panic.
Fixed the partition start calculation in ioctl.
-rw-r--r--arch/um/drivers/ubd_kern.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index dae42bd..de6df0a 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -1002,7 +1002,7 @@ static int prepare_request(struct request *req, struct io_thread_req *io_req)
}
req->sector += ubd_part[minor].start_sect;
- offset = req->sector << 9;
+ offset = ((__u64) req->sector) << 9;
len = req->current_nr_sectors << 9;
io_req->fds[0] = (dev->cow.file != NULL) ? dev->cow.fd : dev->fd;
@@ -1103,7 +1103,7 @@ static int ubd_ioctl(struct inode * inode, struct file * file,
g.heads = 128;
g.sectors = 32;
g.cylinders = dev->size / (128 * 32 * hardsect_sizes[minor]);
- g.start = 2;
+ g.start = ubd_part[minor].start_sect;
return(copy_to_user(loc, &g, sizeof(g)) ? -EFAULT : 0);
case BLKGETSIZE: /* Return device size */
if(!arg) return(-EINVAL);