- rmtcall("status", "S\n");
- for (i = 0, cp = (char *)&mts; i < sizeof(mts); i++)
+ i = rmtcall("status", "S");
+ if (i < 0) return NULL;
+ if (i != (int)sizeof(mts)) {
+ msg("mtget sizes different between host (%d) "
+ "and remote tape (%d)", sizeof(mts), i);
+ for ( /* empty */; i > 0; --i)
+ rmtgetb();
+ return NULL;
+ }
+ for (i = 0, cp = (char *)&mts; i < (int)sizeof(mts); i++)