Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jesse/openvswitch
[cascardo/linux.git] / block / partitions / msdos.c
index 8752a5d..7681cd2 100644 (file)
@@ -455,14 +455,19 @@ int msdos_partition(struct parsed_partitions *state)
        data = read_part_sector(state, 0, &sect);
        if (!data)
                return -1;
-       if (!msdos_magic_present(data + 510)) {
+
+       /*
+        * Note order! (some AIX disks, e.g. unbootable kind,
+        * have no MSDOS 55aa)
+        */
+       if (aix_magic_present(state, data)) {
                put_dev_sector(sect);
+               strlcat(state->pp_buf, " [AIX]", PAGE_SIZE);
                return 0;
        }
 
-       if (aix_magic_present(state, data)) {
+       if (!msdos_magic_present(data + 510)) {
                put_dev_sector(sect);
-               strlcat(state->pp_buf, " [AIX]", PAGE_SIZE);
                return 0;
        }