-$Id: CHANGES,v 1.90 2000/11/10 18:05:16 stelian Exp $
+$Id: CHANGES,v 1.91 2000/11/29 10:13:41 stelian Exp $
+
+Changes between versions 0.4b20 and 0.4b21 (released ?????????????????)
+=======================================================================
+
+1. Fixed some bugs in the dump -w|-W logic introduced by
+ the previous version. Thanks to Andreas Dilger
+ <adilger@turbolinux.com> for his help on this one.
Changes between versions 0.4b19 and 0.4b20 (released November 10, 2000)
=======================================================================
#ifndef lint
static const char rcsid[] =
- "$Id: optr.c,v 1.14 2000/11/10 14:42:25 stelian Exp $";
+ "$Id: optr.c,v 1.15 2000/11/29 10:13:43 stelian Exp $";
#endif /* not lint */
#include <sys/param.h>
{
char *date;
- if (ddate)
+ if (ddate) {
+ char *d;
date = (char *)ctime(&ddate);
- //date[16] = '\0'; /* blast away seconds and year */
+ d = strchr(date, '\n');
+ if (d) *d = '\0';
+ }
if (!dumpme && arg == 'w')
return;
sizeof(dtwalk->dd_name)) == 0)
continue;
lastname = dtwalk->dd_name;
- if ((dt = dtwalk->dd_fstab) != NULL &&
- dt->fs_freq != 0) {
+ if ((dt = dtwalk->dd_fstab) != NULL) {
/* Overload fs_freq as dump level and
* fs_passno as date, because we can't
* change struct fstab format.
* filesystem needs to be dumped.
*/
dt->fs_passno = dtwalk->dd_ddate;
- if (dtwalk->dd_ddate <
- tnow - (dt->fs_freq * 86400))
- dt->fs_freq = -dtwalk->dd_level;
+ if (dt->fs_freq > 0 && (dtwalk->dd_ddate <
+ tnow - (dt->fs_freq * 86400)))
+ dt->fs_freq = -dtwalk->dd_level - 1;
else
- dt->fs_freq = dtwalk->dd_level;
+ dt->fs_freq = dtwalk->dd_level + 1;
}
}
if (strncmp(dt->fs_vfstype, *type,
sizeof(dt->fs_vfstype)) == 0) {
const char *disk = get_device_name(dt->fs_spec);
- print_wmsg(arg, dt->fs_freq < 0 || !dt->fs_passno,
+ print_wmsg(arg, dt->fs_freq < 0,
disk ? disk : dt->fs_spec,
- dt->fs_freq < 0 ? -dt->fs_freq : dt->fs_freq,
+ dt->fs_freq < 0 ? -dt->fs_freq - 1 : dt->fs_freq - 1,
dt->fs_file,
dt->fs_passno);
}