]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] msdos partitions: fix logic error in AIX detection
authorOlaf Hering <olh@suse.de>
Sat, 10 Feb 2007 09:45:48 +0000 (01:45 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sun, 11 Feb 2007 18:51:31 +0000 (10:51 -0800)
Correct the AIX magic check to let 'echo > /dev/sdb' actually work.

Signed-off-by: Olaf Hering <olh@suse.de>
Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/partitions/msdos.c

index dafd3b6b2dc3301be1c03946bfaf0dfd5e6a9f0f..78443e07b3c48c5a71690a49d583faa62794b893 100644 (file)
@@ -68,10 +68,10 @@ static int aix_magic_present(unsigned char *p, struct block_device *bdev)
        unsigned char *d;
        int slot, ret = 0;
 
-       if (p[0] != AIX_LABEL_MAGIC1 &&
-               p[1] != AIX_LABEL_MAGIC2 &&
-               p[2] != AIX_LABEL_MAGIC3 &&
-               p[3] != AIX_LABEL_MAGIC4)
+       if (!(p[0] == AIX_LABEL_MAGIC1 &&
+               p[1] == AIX_LABEL_MAGIC2 &&
+               p[2] == AIX_LABEL_MAGIC3 &&
+               p[3] == AIX_LABEL_MAGIC4))
                return 0;
        /* Assume the partition table is valid if Linux partitions exists */
        for (slot = 1; slot <= 4; slot++, pt++) {