-$Id: CHANGES,v 1.205 2003/01/10 10:52:48 stelian Exp $
+$Id: CHANGES,v 1.206 2003/01/10 14:42:47 stelian Exp $
Changes between versions 0.4b32 and 0.4b33 (released ?????????????????)
=======================================================================
a dump. Thanks to Michal Szymanski <msz@astrouw.edu.pl> for
the suggestions.
+7. Made rmt understand long (largefiles) seeks.
+
Changes between versions 0.4b31 and 0.4b32 (released November 15, 2002)
=======================================================================
#ifndef lint
static const char rcsid[] =
- "$Id: dumprmt.c,v 1.23 2002/07/29 12:00:33 stelian Exp $";
+ "$Id: dumprmt.c,v 1.24 2003/01/10 14:42:50 stelian Exp $";
#endif /* not lint */
#include <config.h>
return (rmtreply("write"));
}
-int
-rmtseek(int offset, int pos)
+OFF_T
+rmtseek(OFF_T offset, int pos)
{
char line[80];
- (void)snprintf(line, sizeof (line), "L%d\n%d\n", offset, pos);
+ (void)snprintf(line, sizeof (line), "L%lld\n%d\n", (long long)offset, pos);
return (rmtcall("seek", line));
}
* dump and restore backup suit
* Stelian Pop <stelian@popies.net> - Alcôve <www.alcove.com>, 2000-2002
*
- * $Id: compatlfs.h,v 1.2 2002/01/16 09:32:14 stelian Exp $
+ * $Id: compatlfs.h,v 1.3 2003/01/10 14:42:50 stelian Exp $
*/
/*-
#define STAT stat64
#define LSTAT lstat64
#define FTRUNCATE ftruncate64
+#define OFF_T __off64_t
#else
#define STAT stat
#define LSTAT lstat
#define FTRUNCATE ftruncate
+#define OFF_T off_t
#endif /* USE_LFS */
* Stelian Pop <stelian@popies.net>, 1999-2000
* Stelian Pop <stelian@popies.net> - Alcôve <www.alcove.com>, 2000-2002
*
- * $Id: dump.h,v 1.41 2002/12/12 11:49:35 stelian Exp $
+ * $Id: dump.h,v 1.42 2003/01/10 14:42:50 stelian Exp $
*/
/*-
#include <config.h>
#include <protocols/dumprestore.h>
+#include <compatlfs.h>
#define MAXINOPB (MAXBSIZE / sizeof(struct dinode))
#define MAXNINDIR (MAXBSIZE / sizeof(daddr_t))
void rmtclose __P((void));
int rmtread __P((char *buf, size_t count));
int rmtwrite __P((const char *buf, size_t count));
-int rmtseek __P((int offset, int pos));
+OFF_T rmtseek __P((OFF_T offset, int pos));
struct mtget * rmtstatus __P((void));
int rmtioctl __P((int cmd, int count));
#endif /* RDUMP */
#ifndef lint
static const char rcsid[] =
- "$Id: dirs.c,v 1.21 2002/07/19 14:57:39 stelian Exp $";
+ "$Id: dirs.c,v 1.22 2003/01/10 14:42:51 stelian Exp $";
#endif /* not lint */
#include <config.h>
rst_telldir(RST_DIR *dirp)
{
return ((long)lseek(dirp->dd_fd,
- (off_t)0, SEEK_CUR) - dirp->dd_size + dirp->dd_loc);
+ (OFF_T)0, SEEK_CUR) - dirp->dd_size + dirp->dd_loc);
}
/*
* Stelian Pop <stelian@popies.net>, 1999-2000
* Stelian Pop <stelian@popies.net> - Alcôve <www.alcove.com>, 2000-2002
*
- * $Id: extern.h,v 1.20 2002/11/15 09:25:41 stelian Exp $
+ * $Id: extern.h,v 1.21 2003/01/10 14:42:51 stelian Exp $
*/
/*-
*/
#include <config.h>
+#include <compatlfs.h>
struct entry *addentry __P((char *, dump_ino_t, int));
long addfile __P((char *, dump_ino_t, int));
int rmtioctl __P((int, int));
int rmtopen __P((const char *, const int));
int rmtread __P((const char *, int));
-int rmtseek __P((int, int));
+OFF_T rmtseek __P((OFF_T, int));
/* From e2fsprogs */
int fsetflags __P((const char *, unsigned long));
#ifndef lint
static const char rcsid[] =
- "$Id: tape.c,v 1.66 2002/11/28 08:54:00 stelian Exp $";
+ "$Id: tape.c,v 1.67 2003/01/10 14:42:51 stelian Exp $";
#endif /* not lint */
#include <config.h>
xtrskip(UNUSED(char *buf), size_t size)
{
- if (LSEEK(ofile, (off_t)size, SEEK_CUR) == -1)
+ if (LSEEK(ofile, (OFF_T)size, SEEK_CUR) == -1)
err(1, "seek error extracting inode %lu, name %s\nlseek",
(unsigned long)curfile.ino, curfile.name);
}
seek_failed = (rmtseek(i, 1) < 0);
else
#endif
- seek_failed = (LSEEK(mt, i, SEEK_CUR) == (off_t)-1);
+ seek_failed = (LSEEK(mt, i, SEEK_CUR) == (OFF_T)-1);
if (seek_failed) {
warn("continuation failed");
#ifdef RDUMP
if (host)
- err = (rmtseek((long)pos, SEEK_SET) < 0);
+ err = (rmtseek(pos, SEEK_SET) < 0);
else
#endif
{
#ifndef lint
static const char rcsid[] =
- "$Id: rmt.c,v 1.21 2002/07/29 12:00:34 stelian Exp $";
+ "$Id: rmt.c,v 1.22 2003/01/10 14:42:51 stelian Exp $";
#endif /* not linux */
/*
getstring(count);
getstring(pos);
DEBUG2("rmtd: L %s %s\n", count, pos);
- rval = LSEEK(tape, (off_t)atol(count), atoi(pos));
+ rval = LSEEK(tape, (OFF_T)atoll(count), atoi(pos));
if (rval < 0)
goto ioerror;
goto respond;