+ lastname = "??";
+ ITITERATE(i, dtwalk) {
+ struct mntent *dt;
+ if (strncmp(lastname, dtwalk->dd_name,
+ sizeof(dtwalk->dd_name)) == 0)
+ continue;
+ lastname = dtwalk->dd_name;
+ 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.
+ * A positive fs_freq means this
+ * filesystem needs to be dumped.
+ *
+ * UGLY HACK: values in 0-3659 range indicate
+ * original value from /etc/fstab (maximum
+ * 10 years...)
+ *
+ * Values bigger than 3659 indicate that
+ * the fs is to be dumped, and the latest
+ * dump level was x-3660
+ *
+ * Negative values indicate that the fs is
+ * not to be dumped, and the latest dump
+ * level was -x-1
+ */
+ dt->mnt_passno = dtwalk->dd_ddate;
+ if (dt->mnt_freq > 0 && (dtwalk->dd_ddate <
+ tnow - (dt->mnt_freq * 86400)))
+ dt->mnt_freq = 3660 + dtwalk->dd_level;
+ else
+ dt->mnt_freq = -dtwalk->dd_level - 1;
+#ifdef FDEBUG
+ printf("%s fs_freq set to %d\n", lastname,
+ dt->mnt_freq);
+#endif
+ }
+ }
+ }
+
+ /* print in /etc/fstab order only those filesystem types we can dump */
+ for (pf = table; pf != NULL; pf = pf->pf_next) {
+ struct mntent *dt = pf->pf_mntent;
+ char **type;
+
+ for (type = fstypes; *type != NULL; type++) {
+ if (strncmp(dt->mnt_type, *type,
+ sizeof(dt->mnt_type)) == 0) {
+ const char *disk = get_device_name(dt->mnt_fsname);
+ print_wmsg(arg, dt->mnt_freq > 0,
+ disk ? disk : dt->mnt_fsname,
+ (dt->mnt_freq < 0 ? -dt->mnt_freq - 1 :
+ dt->mnt_freq < 3660 ? -1 :
+ dt->mnt_freq - 3660),
+ dt->mnt_dir,
+ dt->mnt_passno);
+ }
+ }
+ }
+
+ /* print in /etc/dumpdates order if not in /etc/fstab */
+ if (ddatev != NULL) {
+ struct dumpdates *dtwalk = NULL;
+ char *lastname;
+ int i;
+