-$Id: CHANGES,v 1.264 2005/01/13 12:13:46 stelian Exp $
+$Id: CHANGES,v 1.265 2005/01/13 15:41:05 stelian Exp $
Changes between versions 0.4b38 and 0.4b39 (released ???????????????)
=====================================================================
with an updated version from Andrew Basterfield
<bob@cemetery.homeunix.org>.
+2. Made restore to chdir() back into the initial directory when
+ dumping core while aborting a comparision operation. The
+ previous behaviour was to write the corefile at the root of
+ the directory being compared, which could very well be
+ read only and preventing the corefile generation. Thanks
+ to Kenneth Porter <shiva@sewingwitch.com> for the bug report.
+
Changes between versions 0.4b37 and 0.4b38 (released January 7, 2005)
=====================================================================
#ifndef lint
static const char rcsid[] =
- "$Id: main.c,v 1.47 2004/12/15 11:00:01 stelian Exp $";
+ "$Id: main.c,v 1.48 2005/01/13 15:41:06 stelian Exp $";
#endif /* not lint */
#include <config.h>
static const char *stdin_opt = NULL;
char *bot_script = NULL;
dump_ino_t volinfo[TP_NINOS];
+int wdfd;
#ifdef USE_QFA
FILE *gTapeposfp;
else
setinput(inputdev);
+ wdfd = open(".", O_RDONLY);
+ if (wdfd < 0)
+ err(1, "can't get current directory");
+
if (argc == 0 && !filelist) {
argc = 1;
*--argv = ".";
* Stelian Pop <stelian@popies.net>, 1999-2000
* Stelian Pop <stelian@popies.net> - AlcĂ´ve <www.alcove.com>, 2000-2002
*
- * $Id: restore.h,v 1.30 2004/12/14 14:07:58 stelian Exp $
+ * $Id: restore.h,v 1.31 2005/01/13 15:41:07 stelian Exp $
*/
/*
extern int compare_errors; /* did we encounter any compare errors? */
extern char filesys[NAMELEN];/* name of dumped filesystem */
extern dump_ino_t volinfo[]; /* which inode on which volume archive info */
+extern int wdfd; /* original working directory */
#define DIRHASH_SIZE 1024
#ifndef lint
static const char rcsid[] =
- "$Id: utilities.c,v 1.26 2004/12/15 11:00:01 stelian Exp $";
+ "$Id: utilities.c,v 1.27 2005/01/13 15:41:07 stelian Exp $";
#endif /* not lint */
#include <config.h>
if (yflag)
return;
if (reply("abort") == GOOD) {
- if (reply("dump core") == GOOD)
+ if (reply("dump core") == GOOD) {
+ fchdir(wdfd);
abort();
+ }
exit(1);
}
}