Skip to content

Commit 93fd85d

Browse files
Geert Uytterhoeventorvalds
authored andcommitted
identify_ramdisk_image(): correct typo about return value in comment
identify_ramdisk_image() returns 0 (not -1) if a gzipped ramdisk is found: if (buf[0] == 037 && ((buf[1] == 0213) || (buf[1] == 0236))) { printk(KERN_NOTICE "RAMDISK: Compressed image found at block %d\n", start_block); nblocks = 0; ^^^^^^^^^^^ goto done; } ... done: sys_lseek(fd, start_block * BLOCK_SIZE, 0); kfree(buf); return nblocks; ^^^^^^^^^^^^^^ Hence correct the typo in the comment, which has existed since the addition of compressed ramdisk support in 1.3.48. Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 2e0eb73 commit 93fd85d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎init/do_mounts_rd.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ identify_ramdisk_image(int fd, int start_block)
7171
sys_read(fd, buf, size);
7272

7373
/*
74-
* If it matches the gzip magic numbers, return -1
74+
* If it matches the gzip magic numbers, return 0
7575
*/
7676
if (buf[0] == 037 && ((buf[1] == 0213) || (buf[1] == 0236))) {
7777
printk(KERN_NOTICE

0 commit comments

Comments
 (0)