Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a470e18f53940e7bd07b09f01c0970f653e268bf
Commit:     a470e18f53940e7bd07b09f01c0970f653e268bf
Parent:     4419d1ac7def3c2f74cab15e4a1c69cffcaadedd
Author:     Olaf Hering <[EMAIL PROTECTED]>
AuthorDate: Sat Feb 10 01:45:48 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Sun Feb 11 10:51:31 2007 -0800

    [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 <[EMAIL PROTECTED]>
    Cc: OGAWA Hirofumi <[EMAIL PROTECTED]>
    Cc: Anton Blanchard <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 fs/partitions/msdos.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/partitions/msdos.c b/fs/partitions/msdos.c
index dafd3b6..78443e0 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)
        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 git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to