patch-2.1.1 linux/drivers/block/rd.c

Next file: linux/drivers/pci/pci.c
Previous file: linux/arch/i386/lib/semaphore.S
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.0/linux/drivers/block/rd.c linux/drivers/block/rd.c
@@ -180,14 +180,14 @@
 
 #ifdef CONFIG_BLK_DEV_INITRD
 
-static int initrd_read(struct inode *inode,struct file *file,char *buf,
-    int count)
+static long initrd_read(struct inode *inode,struct file *file,
+	char *buf, unsigned long count)
 {
 	int left;
 
 	left = initrd_end-initrd_start-file->f_pos;
 	if (count > left) count = left;
-	if (count <= 0) return 0;
+	if (count == 0) return 0;
 	memcpy_tofs(buf,(char *) initrd_start+file->f_pos,count);
 	file->f_pos += count;
 	return count;
@@ -350,8 +350,8 @@
 	/*
 	 * Read block 0 to test for gzipped kernel
 	 */
-	if (fp->f_op->lseek)
-		fp->f_op->lseek(fp->f_inode, fp, start_block * BLOCK_SIZE, 0);
+	if (fp->f_op->llseek)
+		fp->f_op->llseek(fp->f_inode, fp, start_block * BLOCK_SIZE, 0);
 	fp->f_pos = start_block * BLOCK_SIZE;
 	
 	fp->f_op->read(fp->f_inode, fp, buf, size);
@@ -370,8 +370,8 @@
 	/*
 	 * Read block 1 to test for minix and ext2 superblock
 	 */
-	if (fp->f_op->lseek)
-		fp->f_op->lseek(fp->f_inode, fp,
+	if (fp->f_op->llseek)
+		fp->f_op->llseek(fp->f_inode, fp,
 				(start_block+1) * BLOCK_SIZE, 0);
 	fp->f_pos = (start_block+1) * BLOCK_SIZE;
 
@@ -400,8 +400,8 @@
 	       start_block);
 	
 done:
-	if (fp->f_op->lseek)
-		fp->f_op->lseek(fp->f_inode, fp, start_block * BLOCK_SIZE, 0);
+	if (fp->f_op->llseek)
+		fp->f_op->llseek(fp->f_inode, fp, start_block * BLOCK_SIZE, 0);
 	fp->f_pos = start_block * BLOCK_SIZE;	
 
 	if ((nblocks > 0) && blk_size[MAJOR(device)]) {

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov