for (i = 0; i < ARRAY_SIZE(idinfos); i++) {
const struct blkid_idinfo *id;
const struct blkid_idmag *mag;
+ int hasmag = 0;
pr->idx = i;
DBG(DEBUG_LOWPROBE, printf(
"\n --> magic at sboff=%u, kboff=%ld;",
mag->sboff, mag->kboff));
+ hasmag = 1;
break;
}
mag++;
}
- if (id->magics && id->magics[0].magic)
+ if (hasmag == 0 && id->magics && id->magics[0].magic)
/* magic string(s) defined, but not found */
continue;
if (header == NULL)
return -1;
- blkid_probe_strncpy_uuid(pr, (char *) header->uuid, sizeof(header->uuid));
+ blkid_probe_strncpy_uuid(pr, (unsigned char *) header->uuid,
+ sizeof(header->uuid));
blkid_probe_sprintf_version(pr, "%u", le16_to_cpu(header->version));
return 0;
}