[Prev][Next][Index][Thread]

Bug in OSKit's linux block I/O glue [PATCH]



This attached patch fixes the problem which was notcied when trying
to use oskit's floppy driver from the oskit-mach kernel.

The patch is against oskit-20000202, but i used the -p flag for diff
so you would know where to apply it if it was rejected from the current
source tree.

Thanks.

Igor
--- linux/dev/block.c.orig	Sun Aug 12 16:49:03 2001
+++ linux/dev/block.c	Sun Aug 12 16:45:45 2001
@@ -563,7 +563,7 @@ blkio_read(oskit_blkio_t *io, void *buf,
 	file.f_dentry = &dentry;
 	dentry.d_inode = &po->inode;
 
-	err = (*po->fops->read)(&file, buf, count, 0);
+	err = (*po->fops->read)(&file, buf, count, &file.f_pos);
 	if (err) {
 		err = linux_to_oskit_error(err);
 		*amount_read = 0;	/* XXX */
@@ -622,7 +622,7 @@ blkio_write(oskit_blkio_t *io, const voi
 	file.f_inode = &po->inode;
 	file.f_dentry = &dentry;
 	dentry.d_inode = &po->inode;
-	err = (po->fops->write)(&file, buf, count, 0);
+	err = (po->fops->write)(&file, buf, count, &file.f_pos);
 	if (err) {
 		osenv_log(OSENV_LOG_NOTICE, "WRITE error %d, 0x%x\n", err, err);
 		err = linux_to_oskit_error(err);

Follow-Ups: