From 8c95cc301d14462e5b6c1b4e00dbccddad82ec88 Mon Sep 17 00:00:00 2001 From: Stelian Pop Date: Thu, 10 Apr 2003 07:59:02 +0000 Subject: [PATCH] Fix dump -w|-W (/etc/mtab does have 0 0 as passno/freq) --- CHANGES | 7 ++++++- THANKS | 3 ++- dump/optr.c | 8 +++++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 67ed8b1..413591c 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,4 @@ -$Id: CHANGES,v 1.226 2003/04/09 10:42:56 stelian Exp $ +$Id: CHANGES,v 1.227 2003/04/10 07:59:02 stelian Exp $ Changes between versions 0.4b33 and 0.4b34 (released ?????????????????) ======================================================================= @@ -87,6 +87,11 @@ Changes between versions 0.4b33 and 0.4b34 (released ?????????????????) 19. Made dump work with 2.5 kernel end of tape early warning semantics. Thanks to Kai Makisara for the patch. +20. Fixed a bug which caused dump -w|-W not to work anymore, because + the fs_freq and fs_passno fields in /etc/mtab are always set + to 0 0. Thanks to Trent Piepho for + reporting the bug. + Changes between versions 0.4b32 and 0.4b33 (released February 10, 2003) ======================================================================= diff --git a/THANKS b/THANKS index 5ac33c5..917b8fe 100644 --- a/THANKS +++ b/THANKS @@ -1,4 +1,4 @@ -$Id: THANKS,v 1.79 2003/04/09 10:42:57 stelian Exp $ +$Id: THANKS,v 1.80 2003/04/10 07:59:02 stelian Exp $ Dump and restore were written by the people of the CSRG at the University of California, Berkeley. @@ -84,6 +84,7 @@ Brent Olson night@halcyon.com Jorgen Ostling jorgen_ostling@users.sourceforge.net Jerry Peters gapeters@worldnet.att.net David B. Peterson dave@toppledwagon.com +Trent Piepho xyzzy@speakeasy.org Dave Platt dplatt@snulbug.mtview.ca.us Kenneth Porter shiva@well.com Eric S. Raymond esr@minx.thyrsus.com diff --git a/dump/optr.c b/dump/optr.c index 8d72cab..2d89880 100644 --- a/dump/optr.c +++ b/dump/optr.c @@ -37,7 +37,7 @@ #ifndef lint static const char rcsid[] = - "$Id: optr.c,v 1.36 2003/03/30 15:40:36 stelian Exp $"; + "$Id: optr.c,v 1.37 2003/04/10 07:59:05 stelian Exp $"; #endif /* not lint */ #include @@ -460,6 +460,12 @@ allocfsent(struct mntent *fs) quit("Cannot access %s\n", tabfs->mnt_fsname); if (tabbuf.st_rdev == buf.st_rdev) { free(new); + /* Copy passno and freq from /etc/fstab because + * /etc/mtab does always have them as 0 0 */ + if (!tabfs->mnt_passno) + tabfs->mnt_passno = fs->mnt_passno; + if (!tabfs->mnt_freq) + tabfs->mnt_freq = fs->mnt_freq; return NULL; } } -- 2.39.2