Skip to contentSkip to conversation

: rd_block & devblocks are unsigned long

PATCH New Juan Quintela 1 participant 1 message Jan 22, 2003 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : rd_block & devblocks are unsigned long

[ Resent to marcelo with corret subject ]

Hi
rd_blocks, and devblocks are unsigned longs, print them as unsigned longs.

Please, apply.

Later, Juan.

init/do_mounts.c renamed from init/do_mounts.c.orig +5 -5
diff -uNp t1/init/do_mounts.c.orig t1/init/do_mounts.c
@@ -593,7 +593,7 @@ static int __init rd_load_image(char *fr
 		rd_blocks >>= 1;
 
 	if (nblocks > rd_blocks) {
-		printk("RAMDISK: image too big! (%d/%d blocks)\n",
+		printk("RAMDISK: image too big! (%d/%lu blocks)\n",
 		       nblocks, rd_blocks);
 		goto done;
 	}
@@ -620,23 +620,23 @@ static int __init rd_load_image(char *fr
 		goto done;
 	}
 
-	printk(KERN_NOTICE "RAMDISK: Loading %d blocks [%d disk%s] into ram disk... ", 
+	printk(KERN_NOTICE "RAMDISK: Loading %d blocks [%lu disk%s] into ram disk... ", 
 		nblocks, ((nblocks-1)/devblocks)+1, nblocks>devblocks ? "s" : "");
 	for (i=0; i < nblocks; i++) {
 		if (i && (i % devblocks == 0)) {
-			printk("done disk #%d.\n", i/devblocks);
+			printk("done disk #%lu.\n", i/devblocks);
 			rotate = 0;
 			if (close(in_fd)) {
 				printk("Error closing the disk.\n");
 				goto noclose_input;
 			}
-			change_floppy("disk #%d", i/devblocks+1);
+			change_floppy("disk #%lu", i/devblocks+1);
 			in_fd = open(from, O_RDONLY, 0);
 			if (in_fd < 0)  {
 				printk("Error opening disk.\n");
 				goto noclose_input;
 			}
-			printk("Loading disk #%d... ", i/devblocks+1);
+			printk("Loading disk #%lu... ", i/devblocks+1);
 		}
 		read(in_fd, buf, BLOCK_SIZE);
 		write(out_fd, buf, BLOCK_SIZE);
Signature · 2 lines
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy