X-Git-Url: https://git.wh0rd.org/?p=dump.git;a=blobdiff_plain;f=common%2Fdumprmt.c;h=d39e13432b2c9a4ca391ba9eb16c5839b544ebae;hp=699122f4349d666fb21c3719a03958f0ed8fe58e;hb=c3f69f06e7c87a8e39d2bc02396fa3ba8db76e84;hpb=2be7779919f3c53ac42a5ac63c0d381e401f7587 diff --git a/common/dumprmt.c b/common/dumprmt.c index 699122f..d39e134 100644 --- a/common/dumprmt.c +++ b/common/dumprmt.c @@ -41,7 +41,7 @@ #ifndef lint static const char rcsid[] = - "$Id: dumprmt.c,v 1.25 2003/02/12 11:02:29 stelian Exp $"; + "$Id: dumprmt.c,v 1.26 2003/03/26 10:58:22 stelian Exp $"; #endif /* not lint */ #include @@ -350,7 +350,15 @@ rmtstatus(void) if (rmtstate != TS_OPEN) return (NULL); - rmtcall("status", "S\n"); + 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++) *cp++ = rmtgetb(); return (&mts);