return -1;
part = (struct mac_partition *) buf;
- if ((strncmp(part->signature, "PM", 2) == 0) &&
- (strncmp(part->type, "Apple_partition_map", 19) == 0)) {
+ if ((memcmp(part->signature, "PM", 2) == 0) &&
+ (memcmp(part->type, "Apple_partition_map", 19) == 0)) {
/* linux creates an own subdevice for the map
* just return the type if the drive header is missing */
volume_id_set_usage(id, VOLUME_ID_PARTITIONTABLE);
}
driver = (struct mac_driver_desc *) buf;
- if (strncmp(driver->signature, "ER", 2) == 0) {
+ if (memcmp(driver->signature, "ER", 2) == 0) {
/* we are on a main device, like a CD
* just try to probe the first partition from the map */
unsigned int bsize = be16_to_cpu(driver->block_size);
return -1;
part = (struct mac_partition *) buf;
- if (strncmp(part->signature, "PM", 2) != 0)
+ if (memcmp(part->signature, "PM", 2) != 0)
return -1;
part_count = be32_to_cpu(part->map_count);
return -1;
part = (struct mac_partition *) buf;
- if (strncmp(part->signature, "PM", 2) != 0)
+ if (memcmp(part->signature, "PM", 2) != 0)
return -1;
poff = be32_to_cpu(part->start_block) * bsize;
id->partitions[i].off = poff;
id->partitions[i].len = plen;
- if (strncmp(part->type, "Apple_Free", 10) == 0) {
+ if (memcmp(part->type, "Apple_Free", 10) == 0) {
volume_id_set_usage_part(&id->partitions[i], VOLUME_ID_UNUSED);
- } else if (strncmp(part->type, "Apple_partition_map", 19) == 0) {
+ } else if (memcmp(part->type, "Apple_partition_map", 19) == 0) {
volume_id_set_usage_part(&id->partitions[i], VOLUME_ID_PARTITIONTABLE);
} else {
volume_id_set_usage_part(&id->partitions[i], VOLUME_ID_UNPROBED);