Skip to contentSkip to conversation

filesystem: Disk Errors at boot-time caused by probe of partitions

PATCH New TJ 1 participant 1 message Feb 1, 2007

lore
Share & tools
lore

TJ

author
#0 lore raw

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

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.

partitions/msdos.tj.1.c renamed from partitions/msdos.tj.c +3 -3
@@ -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);
 		}
 	}