X-Git-Url: https://git.wh0rd.org/?p=dump.git;a=blobdiff_plain;f=common%2Fdumprmt.c;h=ba824f27d70593fef1917c75a12cc8ad9f2f5420;hp=e05325c564d84be2c05316be1694cc5548503078;hb=67febcc5e8d252f6f13784dfc2b540bacd4dda77;hpb=f0ab1ab5331f9ed387ade32d96b24285b0cd5282 diff --git a/common/dumprmt.c b/common/dumprmt.c index e05325c..ba824f2 100644 --- a/common/dumprmt.c +++ b/common/dumprmt.c @@ -37,7 +37,7 @@ #ifndef lint static const char rcsid[] = - "$Id: dumprmt.c,v 1.29 2006/03/13 10:33:44 stelian Exp $"; + "$Id: dumprmt.c,v 1.30 2010/06/11 11:19:17 stelian Exp $"; #endif /* not lint */ #include @@ -342,8 +342,10 @@ rmtwrite(const char *buf, size_t count) char line[30]; (void)snprintf(line, sizeof (line), "W%ld\n", (long)count); - write(tormtape, line, strlen(line)); - write(tormtape, buf, count); + if (write(tormtape, line, strlen(line)) != strlen(line)) + return -1; + if (write(tormtape, buf, count) != count) + return -1; return (rmtreply("write")); }