aboutsummaryrefslogtreecommitdiffstats
path: root/fs/partitions/msdos.c
diff options
context:
space:
mode:
authorOlaf Hering <olh@suse.de>2007-02-10 04:45:48 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 13:51:31 -0500
commita470e18f53940e7bd07b09f01c0970f653e268bf (patch)
treef4fcb0ff6d4fdc6ebcf30f196fd9c5107bde0e2e /fs/partitions/msdos.c
parent4419d1ac7def3c2f74cab15e4a1c69cffcaadedd (diff)
[PATCH] msdos partitions: fix logic error in AIX detection
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>
Diffstat (limited to 'fs/partitions/msdos.c')
-rw-r--r--fs/partitions/msdos.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/partitions/msdos.c b/fs/partitions/msdos.c
index dafd3b6b2dc3..78443e07b3c4 100644
--- a/fs/partitions/msdos.c
+++ b/fs/partitions/msdos.c
@@ -68,10 +68,10 @@ static int aix_magic_present(unsigned char *p, struct block_device *bdev)
68 unsigned char *d; 68 unsigned char *d;
69 int slot, ret = 0; 69 int slot, ret = 0;
70 70
71 if (p[0] != AIX_LABEL_MAGIC1 && 71 if (!(p[0] == AIX_LABEL_MAGIC1 &&
72 p[1] != AIX_LABEL_MAGIC2 && 72 p[1] == AIX_LABEL_MAGIC2 &&
73 p[2] != AIX_LABEL_MAGIC3 && 73 p[2] == AIX_LABEL_MAGIC3 &&
74 p[3] != AIX_LABEL_MAGIC4) 74 p[3] == AIX_LABEL_MAGIC4))
75 return 0; 75 return 0;
76 /* Assume the partition table is valid if Linux partitions exists */ 76 /* Assume the partition table is valid if Linux partitions exists */
77 for (slot = 1; slot <= 4; slot++, pt++) { 77 for (slot = 1; slot <= 4; slot++, pt++) {