#ifndef lint
static const char rcsid[] =
- "$Id: tape.c,v 1.83 2004/04/21 09:15:08 stelian Exp $";
+ "$Id: tape.c,v 1.84 2004/05/25 10:39:29 stelian Exp $";
#endif /* not lint */
#include <config.h>
long long tapea_bytes = 0; /* bytes_written at start of current volume */
static int magtapeout; /* output is really a tape */
-static ssize_t dump_atomic_read __P((int, void *, size_t));
-static ssize_t dump_atomic_write __P((int, const void *, size_t));
+static ssize_t dump_atomic_read __P((int, char *, size_t));
+static ssize_t dump_atomic_write __P((int, const char *, size_t));
#ifdef WRITEDEBUG
static void doslave __P((int, int, int));
#else
* loop until the count is satisfied (or error).
*/
static ssize_t
-dump_atomic_read(int fd, void *buf, size_t count)
+dump_atomic_read(int fd, char *buf, size_t count)
{
int got, need = count;
do {
while ((got = read(fd, buf, need)) > 0 && (need -= got) > 0)
- (char *)buf += got;
+ buf += got;
} while (got == -1 && errno == EINTR);
return (got < 0 ? got : (ssize_t)count - need);
}
* loop until the count is satisfied (or error).
*/
static ssize_t
-dump_atomic_write(int fd, const void *buf, size_t count)
+dump_atomic_write(int fd, const char *buf, size_t count)
{
int got, need = count;
do {
while ((got = write(fd, buf, need)) > 0 && (need -= got) > 0)
- (char *)buf += got;
+ buf += got;
} while (got == -1 && errno == EINTR);
return (got < 0 ? got : (ssize_t)count - need);
}
#ifndef lint
static const char rcsid[] =
- "$Id: dirs.c,v 1.27 2004/04/21 09:15:22 stelian Exp $";
+ "$Id: dirs.c,v 1.28 2004/05/25 10:39:30 stelian Exp $";
#endif /* not lint */
#include <config.h>
return;
loc -= base;
if (loc < 0)
- fprintf(stderr, "bad seek pointer to rst_seekdir %lld\n", loc);
+ fprintf(stderr, "bad seek pointer to rst_seekdir %lld\n", (long long int)loc);
(void) LSEEK(dirp->dd_fd, base + (loc & ~(DIRBLKSIZ - 1)), SEEK_SET);
dirp->dd_loc = loc & (DIRBLKSIZ - 1);
if (dirp->dd_loc != 0)
#ifndef lint
static const char rcsid[] =
- "$Id: tape.c,v 1.80 2004/04/21 09:15:22 stelian Exp $";
+ "$Id: tape.c,v 1.81 2004/05/25 10:39:31 stelian Exp $";
#endif /* not lint */
#include <config.h>
}
if (reason) {
if (lengtherr)
- fprintf(stderr, "%s compressed block: %d expected: %d\n",
+ fprintf(stderr, "%s compressed block: %d expected: %u\n",
lengtherr, readsize, tpbin->length + PREFIXSIZE);
fprintf(stderr, "decompression error, block %ld: %s\n",
tpblksread+1, reason);