[PATCH 1/1] filesystem: Disk Errors at boot-time caused by probe of partitions

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

 



From: TJ <[email protected]>

Applies to: up-to and including 2.6.20-rc7 

Update to previous patch.

Fixed logical error in if() statements for conditional printk(). Replaced bit-wise OR with AND.

Signed-off-by: TJ <[email protected]>

--- fs/partitions/msdos.tj.c	2007-02-01 00:41:57.000000000 +0000
+++ fs/partitions/msdos.tj.1.c	2007-02-01 01:07:31.000000000 +0000
@@ -459,13 +459,13 @@ int check_sane_values(struct partition *
 		if (insane) { /* insanity found; report it */
 			ret = -1; /* error code */
 			printk("\n"); /* start error report on a fresh line */
-			if (insane | 1)
+			if (insane & 1)
 				printk(" partition %d: start (sector %d) beyond end of disk (sector %d)\n",
 				 slot, START_SECT(p), (unsigned int) bdev->bd_disk->capacity-1);
-			if (insane | 2)
+			if (insane & 2)
 				printk(" partition %d: end (sector %d) beyond end of disk (sector %d)\n",
 				 slot, START_SECT(p)+NR_SECTS(p)-1, (unsigned int) bdev->bd_disk->capacity-1);
-			if (insane | 4)
+			if (insane & 4)
 				printk(" partition %d: insane extended contents\n", slot);
 		}
 	}




-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux