X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=restore%2Ftape.c;h=f7a8a10211379408d6e58d4b5d2f5668b911fd78;hb=5bbb0926a5e765575c199573ea3b3d0f5ecd99a2;hp=d7e8ed635be54041c6872d5512e64eca52d861ea;hpb=6d9ffa3ebaadf8f1709aa4e6a8956fab4abf4f64;p=dump.git diff --git a/restore/tape.c b/restore/tape.c index d7e8ed6..f7a8a10 100644 --- a/restore/tape.c +++ b/restore/tape.c @@ -46,7 +46,7 @@ #ifndef lint static const char rcsid[] = - "$Id: tape.c,v 1.39 2001/05/26 11:04:46 stelian Exp $"; + "$Id: tape.c,v 1.41 2001/07/18 11:46:31 stelian Exp $"; #endif /* not lint */ #include @@ -67,7 +67,11 @@ static const char rcsid[] = #ifdef __linux__ #include #include +#ifdef HAVE_EXT2FS_EXT2_FS_H +#include +#else #include +#endif #include #include #else /* __linux__ */ @@ -448,8 +452,11 @@ again: return; } if (buf[0] != '\n') { + char *pos; (void) strncpy(magtape, buf, sizeof(magtape)); magtape[sizeof(magtape) - 1] = '\0'; + if ((pos = strchr(magtape, '\n'))) + magtape[pos - magtape] = '\0'; } } #ifdef RRESTORE