-$Id: CHANGES,v 1.38 2000/01/26 11:38:07 stelian Exp $
+$Id: CHANGES,v 1.39 2000/02/04 20:22:21 stelian Exp $
Changes between versions 0.4b13 and 0.4b14 (released ????????????????)
======================================================================
3. Improved the output of dump in order to tell which directory
it is currently dumping (when dumping a subtree).
+4. Added the '-e' exclude inode option to dump. Thanks to
+ Isaac Chuang <ike@isl.stanford.edu> for contributing with the patch.
+
Changes between versions 0.4b12 and 0.4b13 (released January 21, 2000)
======================================================================
-$Id: THANKS,v 1.18 2000/01/25 14:16:01 stelian Exp $
+$Id: THANKS,v 1.19 2000/02/04 20:22:21 stelian Exp $
Dump and restore were written by the people of the CSRG at the University
of California, Berkeley.
Stephen Carr sgcarr@civeng.adelaide.edu.au
Rob Cermak cermak@ahab.rutgers.edu
+Isaac Chuang ike@isl.stanford.edu
Rainer Clasen bj@ncc.cicely.de
Abhijit Dasgupta abhijit@ans.net
Jason Fearon jasonf@netrider.org.au
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $Id: dump.8.in,v 1.10 2000/01/21 10:23:30 stelian Exp $
+.\" $Id: dump.8.in,v 1.11 2000/02/04 20:22:21 stelian Exp $
.\"
.Dd __DATE__
.Dt DUMP 8
.It Fl c
Change the defaults for use with a cartridge tape drive, with a density
of 8000 bpi, and a length of 1700 feet.
+.It Fl e Ar inode
+Exclude
+.Ar inode
+from the dump (you can use
+.Ar stat
+to find the inode number for a file or directory).
.It Fl h Ar level
Honor the user
.Dq nodump
* Remy Card <card@Linux.EU.Org>, 1994-1997
* Stelian Pop <pop@cybercable.fr>, 1999-2000
*
- * $Id: dump.h,v 1.9 2000/01/21 10:17:41 stelian Exp $
+ * $Id: dump.h,v 1.10 2000/02/04 20:22:21 stelian Exp $
*/
/*-
extern off_t lseek();
extern const char *strerror();
#endif
+
+ /* 04-Feb-00 ILC */
+#define IEXCLUDE_MAXNUM 256 /* max size of inode exclude list */
+
#ifndef lint
static const char rcsid[] =
- "$Id: main.c,v 1.14 2000/01/26 11:38:08 stelian Exp $";
+ "$Id: main.c,v 1.15 2000/02/04 20:22:21 stelian Exp $";
#endif /* not lint */
#include <sys/param.h>
static void obsolete __P((int *, char **[]));
static void usage __P((void));
+ino_t iexclude_list[IEXCLUDE_MAXNUM]; /* the inode exclude list */
+int iexclude_num = 0; /* number of elements in the list */
+
int
main(int argc, char *argv[])
{
obsolete(&argc, &argv);
#ifdef KERBEROS
-#define optstring "0123456789aB:b:cd:f:h:kL:Mns:ST:uWw"
+#define optstring "0123456789aB:b:cd:e:f:h:kL:Mns:ST:uWw"
#else
-#define optstring "0123456789aB:b:cd:f:h:L:Mns:ST:uWw"
+#define optstring "0123456789aB:b:cd:e:f:h:L:Mns:ST:uWw"
#endif
while ((ch = getopt(argc, argv, optstring)) != -1)
#undef optstring
if (density >= 625 && !bflag)
ntrec = HIGHDENSITYTREC;
break;
+
+ /* 04-Feb-00 ILC */
+ case 'e': /* exclude an inode */
+ iexclude_list[iexclude_num++] =
+ numarg("inode to exclude",0L,0L);
+ msg("Added %d to exclude list\n",
+ iexclude_list[iexclude_num-1]);
+ break;
case 'f': /* output file */
tapeprefix = optarg;
"k"
#endif
"MnSu] [-B records] [-b blocksize] [-d density]\n"
- "\t%s [-f file] [-h level] [-s feet] [-T date] filesystem\n"
+ "\t%s [-e inode#] [-f file] [-h level] [-s feet] [-T date] filesystem\n"
"\t%s [-W | -w]\n", __progname, white, __progname);
exit(X_STARTUP);
}
#ifndef lint
static const char rcsid[] =
- "$Id: traverse.c,v 1.14 2000/01/21 10:17:41 stelian Exp $";
+ "$Id: traverse.c,v 1.15 2000/02/04 20:22:21 stelian Exp $";
#endif /* not lint */
#include <sys/param.h>
#define WANTTODUMP(dp) CHANGEDSINCE(dp, spcl.c_ddate)
#endif
+extern ino_t iexclude_list[IEXCLUDE_MAXNUM]; /* the inode exclude list */
+extern int iexclude_num; /* number of elements in the list */
+
/*
* Determine if given inode should be dumped
*/
* to the usedinomap.
*/
SETINO(ino, usedinomap);
+
+ /* 04-Feb-00 ILC */
+ if(iexclude_num) { /* if there are inodes in the exclude list */
+ int idx; /* then check this inode against it */
+ for (idx=0; idx<iexclude_num; idx++) {
+ if (ino == iexclude_list[idx]) {
+ msg("Excluding inode number %d\n", ino);
+ return; /* if in list then skip */
+ }
+ }
+ }
+
if (mode == IFDIR)
SETINO(ino, dumpdirmap);
if (WANTTODUMP(dp)) {