[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20070104132053.GA24903@suse.de>
Date: Thu, 4 Jan 2007 14:20:53 +0100
From: Olaf Hering <olh@...e.de>
To: Anton Blanchard <anton@...ba.org>, linuxppc-dev@...abs.org,
Andrew Morton <akpm@...l.org>
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] fix logic error in AIX detection
Correct the AIX magic check to let 'echo > /dev/sdb' actually work.
Signed-off-by: Olaf Hering <olh@...e.de>
---
fs/partitions/msdos.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Index: linux-2.6.20-rc3/fs/partitions/msdos.c
===================================================================
--- linux-2.6.20-rc3.orig/fs/partitions/msdos.c
+++ linux-2.6.20-rc3/fs/partitions/msdos.c
@@ -68,10 +68,10 @@ static int aix_magic_present(unsigned ch
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++) {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists