TMAGIC
strncpy(hd->magic, TMAGIC, TMAGLEN);
if (strncmp(uhd->magic, TMAGIC, TMAGLEN - 1) == 0) {
if (strncmp(hd->magic, TMAGIC, TMAGLEN - 1) != 0)