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