X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=dump%2Ftape.c;h=2df4d1e242772338f88bce5b9cf6bbd5e4b48cc7;hb=585ca01a9a2ed1ce197c44a33f5a1fde06adbef7;hp=bd1e2f90c0bde55892a4e4365b1ad0dc1c230984;hpb=6466785009d6e9260d2e6bd67378fed5411e6f02;p=dump.git diff --git a/dump/tape.c b/dump/tape.c index bd1e2f9..2df4d1e 100644 --- a/dump/tape.c +++ b/dump/tape.c @@ -37,7 +37,7 @@ #ifndef lint static const char rcsid[] = - "$Id: tape.c,v 1.84 2004/05/25 10:39:29 stelian Exp $"; + "$Id: tape.c,v 1.86 2004/07/07 11:07:29 stelian Exp $"; #endif /* not lint */ #include @@ -60,7 +60,11 @@ int write(), read(); #ifdef __linux__ #include #include -#include /* for definition of BLKFLSBUF */ +#include +#include /* for definition of BLKFLSBUF */ +#ifndef BLKFLSBUF /* last resort... */ +#define BLKFLSBUF _IO(0x12, 97) /* Flush buffer cache. */ +#endif #include #endif #include @@ -142,7 +146,7 @@ static int MkTapeString __P((struct s_spcl *, long long)); * The following structure defines the instruction packets sent to slaves. */ struct req { - daddr_t dblk; + ext2_loff_t dblk; int count; }; int reqsiz; @@ -234,7 +238,7 @@ void writerec(const void *dp, int isspcl) { - slp->req[trecno].dblk = (daddr_t)0; + slp->req[trecno].dblk = (ext2_loff_t)0; slp->req[trecno].count = 1; /* XXX post increment triggers an egcs-1.1.2-12 bug on alpha/sparc */ *(union u_spcl *)(*(nextblock)) = *(union u_spcl *)dp; @@ -272,9 +276,10 @@ writerec(const void *dp, int isspcl) } void -dumpblock(daddr_t blkno, int size) +dumpblock(blk_t blkno, int size) { - int avail, tpblks, dblkno; + int avail, tpblks; + ext2_loff_t dblkno; dblkno = fsbtodb(sblock, blkno); tpblks = size >> tp_bshift;