-$Id: CHANGES,v 1.43 2000/02/10 10:22:04 stelian Exp $
+$Id: CHANGES,v 1.44 2000/02/26 01:35:48 stelian Exp $
+
+Changes between versions 0.4b14 and 0.4b15 (released ?????????????????)
+=======================================================================
+
+1. Added a prompt command in interactive restore mode. Thanks
+ to Andreas Dilger <adilger@home.com> for the patch.
Changes between versions 0.4b13 and 0.4b14 (released February 10, 2000)
=======================================================================
-$Id: THANKS,v 1.21 2000/02/10 09:42:32 stelian Exp $
+$Id: THANKS,v 1.22 2000/02/26 01:35:48 stelian Exp $
Dump and restore were written by the people of the CSRG at the University
of California, Berkeley.
Isaac Chuang ike@isl.stanford.edu
Rainer Clasen bj@ncc.cicely.de
Abhijit Dasgupta abhijit@ans.net
+Andreas Dilger adilger@home.com
Jason Fearon jasonf@netrider.org.au
Jeremy Fitzhardinge jeremy@goop.org
Eirik Fuller eirik@netcom.com
* Remy Card <card@Linux.EU.Org>, 1994-1997
* Stelian Pop <pop@cybercable.fr>, 1999-2000
*
- * $Id: pathnames.h,v 1.6 2000/01/21 10:17:41 stelian Exp $
+ * $Id: pathnames.h,v 1.7 2000/02/26 01:35:48 stelian Exp $
*/
/*
#include <paths.h>
#define _PATH_DEFTAPE "/dev/st0"
-#define _PATH_DTMP "/etc/dtmp"
-#define _PATH_LOCK "/tmp/dumplockXXXXXX"
#define _PATH_RMT "/etc/rmt" /* path on remote host */
fi
if test "$ext2fs_h" = no -o "$ext2fs_lib" = no; then
- { echo "configure: error: You need to install the Ext2fs libraries from the E2fsprogs distribution first" 1>&2; exit 1; }
+ { echo "configure: error: You need to install the Ext2fs libraries from the E2fsprogs distribution first - hint: make install-libs" 1>&2; exit 1; }
fi
for ac_func in err errx verr verrx vwarn vwarnx warn warnx realpath lchown
AC_CHECK_HEADER(ext2fs/ext2fs.h, [ext2fs_h=yes], [ext2fs_h=no])
AC_CHECK_LIB(ext2fs, ext2fs_open, [ext2fs_lib=yes], [ext2fs_lib=no], [-lcom_err])
if test "$ext2fs_h" = no -o "$ext2fs_lib" = no; then
- AC_MSG_ERROR(You need to install the Ext2fs libraries from the E2fsprogs distribution first)
+ AC_MSG_ERROR(You need to install the Ext2fs libraries from the E2fsprogs distribution first - hint: make install-libs)
fi
dnl
* Remy Card <card@Linux.EU.Org>, 1994-1997
* Stelian Pop <pop@cybercable.fr>, 1999-2000
*
- * $Id: dump.h,v 1.10 2000/02/04 20:22:21 stelian Exp $
+ * $Id: dump.h,v 1.11 2000/02/26 01:35:48 stelian Exp $
*/
/*-
char tape[NAME_MAX]; /* name of the tape file */
char *tapeprefix; /* prefix of the tape file */
char *dumpdates; /* name of the file containing dump date information*/
-char *temp; /* name of the file for doing rewrite of dumpdates */
char lastlevel; /* dump level of previous dump */
char level; /* dump level of this dump */
int uflag; /* update flag */
#ifndef lint
static const char rcsid[] =
- "$Id: main.c,v 1.15 2000/02/04 20:22:21 stelian Exp $";
+ "$Id: main.c,v 1.16 2000/02/26 01:35:48 stelian Exp $";
#endif /* not lint */
#include <sys/param.h>
if ((tapeprefix = getenv("TAPE")) == NULL)
tapeprefix = _PATH_DEFTAPE;
dumpdates = _PATH_DUMPDATES;
- temp = _PATH_DTMP;
strcpy(labelstr, "none"); /* XXX safe strcpy. */
if (TP_BSIZE / DEV_BSIZE == 0 || TP_BSIZE % DEV_BSIZE != 0)
quit("TP_BSIZE must be a multiple of DEV_BSIZE\n");
#ifndef lint
static const char rcsid[] =
- "$Id: tape.c,v 1.12 2000/02/10 09:42:32 stelian Exp $";
+ "$Id: tape.c,v 1.13 2000/02/26 01:35:48 stelian Exp $";
#endif /* not lint */
#ifdef __linux__
msg("Dumping volume %d on %s\n", tapeno, tape);
}
#ifdef RDUMP
- while ((tapefd = (host ? rmtopen(tape, 2) :
- pipeout ? 1 : open(tape, O_WRONLY|O_CREAT, 0666))) < 0)
+ while ((tapefd = (host ? rmtopen(tape, 2) : pipeout ?
+ fileno(stdout) :
+ open(tape, O_WRONLY|O_CREAT, 0666))) < 0)
#else
- while ((tapefd = (pipeout ? 1 :
+ while ((tapefd = (pipeout ? fileno(stdout) :
open(tape, O_WRONLY|O_CREAT, 0666))) < 0)
#endif
{
#ifndef lint
static const char rcsid[] =
- "$Id: interactive.c,v 1.8 2000/01/21 10:17:41 stelian Exp $";
+ "$Id: interactive.c,v 1.9 2000/02/26 01:35:48 stelian Exp $";
#endif /* not lint */
#include <sys/param.h>
static int runshell;
static jmp_buf reset;
static char *nextarg = NULL;
-
+static int pflag = 0; /* prompt mode */
/*
* Structure and routines associated with listing directories.
*/
if (strncmp(cmd, "help", strlen(cmd)) != 0)
goto bad;
case '?':
- fprintf(stderr, "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
+ fprintf(stderr, "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
"Available commands are:\n",
"\tls [arg] - list directory\n",
"\tcd arg - change directory\n",
"\twhat - list dump header information\n",
"\tverbose - toggle verbose flag",
" (useful with ``ls'')\n",
+ "\tprompt - toggle the prompt display\n",
"\thelp or `?' - print this list\n",
"If no `arg' is supplied, the current",
" directory is used\n");
* Print current directory.
*/
case 'p':
- if (strncmp(cmd, "pwd", strlen(cmd)) != 0)
- goto bad;
- if (curdir[1] == '\0')
- fprintf(stderr, "/\n");
- else
- fprintf(stderr, "%s\n", &curdir[1]);
+ if (strncmp(cmd, "pwd", strlen(cmd)) == 0) {
+ if (curdir[1] == '\0')
+ fprintf(stderr, "/\n");
+ else
+ fprintf(stderr, "%s\n", &curdir[1]);
+ }
+ /*
+ * Toggle prompt mode.
+ */
+ else if (strncmp(cmd, "prompt", strlen(cmd)) == 0) {
+ if (pflag) {
+ fprintf(stderr, "prompt mode off\n");
+ pflag = 0;
+ break;
+ }
+ fprintf(stderr, "prompt mode on\n");
+ pflag++;
+ break;
+ }
+ else goto bad;
break;
/*
* Quit.
* Read a command line and trim off trailing white space.
*/
do {
- fprintf(stderr, "%s > ", __progname);
+ if (pflag)
+ fprintf(stderr, "%s:%s:%s > ",
+ __progname,
+ spcl.c_filesys,
+ curdir[1] ? &curdir[1] : "/");
+ else
+ fprintf(stderr, "%s > ", __progname);
(void) fflush(stderr);
(void) fgets(input, BUFSIZ, terminal);
} while (!feof(terminal) && input[0] == '\n');