/* check trx file before erasing or writing anything */
if (!trx_check(imagefd, device)) {
fprintf(stderr, "TRX check failed!\n");
/* check trx file before erasing or writing anything */
if (!trx_check(imagefd, device)) {
fprintf(stderr, "TRX check failed!\n");