/* believe only that's fat, don't trust the version
* the cluster_count will tell us
*/
- if (strncmp(vs->sysid, "NTFS", 4) == 0)
+ if (memcmp(vs->sysid, "NTFS", 4) == 0)
return -1;
- if (strncmp(vs->type.fat32.magic, "MSWIN", 5) == 0)
+ if (memcmp(vs->type.fat32.magic, "MSWIN", 5) == 0)
goto valid;
- if (strncmp(vs->type.fat32.magic, "FAT32 ", 8) == 0)
+ if (memcmp(vs->type.fat32.magic, "FAT32 ", 8) == 0)
goto valid;
- if (strncmp(vs->type.fat.magic, "FAT16 ", 8) == 0)
+ if (memcmp(vs->type.fat.magic, "FAT16 ", 8) == 0)
goto valid;
- if (strncmp(vs->type.fat.magic, "MSDOS", 5) == 0)
+ if (memcmp(vs->type.fat.magic, "MSDOS", 5) == 0)
goto valid;
- if (strncmp(vs->type.fat.magic, "FAT12 ", 8) == 0)
+ if (memcmp(vs->type.fat.magic, "FAT12 ", 8) == 0)
goto valid;
/*
if (vs == NULL)
return -1;
- if (label != NULL && strncmp(label, "NO NAME ", 11) != 0) {
+ if (label != NULL && memcmp(label, "NO NAME ", 11) != 0) {
volume_id_set_label_raw(id, label, 11);
volume_id_set_label_string(id, label, 11);
- } else if (strncmp(vs->type.fat.label, "NO NAME ", 11) != 0) {
+ } else if (memcmp(vs->type.fat.label, "NO NAME ", 11) != 0) {
volume_id_set_label_raw(id, vs->type.fat.label, 11);
volume_id_set_label_string(id, vs->type.fat.label, 11);
}
if (vs == NULL)
return -1;
- if (label != NULL && strncmp(label, "NO NAME ", 11) != 0) {
+ if (label != NULL && memcmp(label, "NO NAME ", 11) != 0) {
volume_id_set_label_raw(id, label, 11);
volume_id_set_label_string(id, label, 11);
- } else if (strncmp(vs->type.fat32.label, "NO NAME ", 11) != 0) {
+ } else if (memcmp(vs->type.fat32.label, "NO NAME ", 11) != 0) {
volume_id_set_label_raw(id, vs->type.fat32.label, 11);
volume_id_set_label_string(id, vs->type.fat32.label, 11);
}