- initdumptimes(); /* /etc/dumpdates input */
- qsort((char *) ddatev, nddates, sizeof(struct dumpdates *), datesort);
-
- if (arg == 'w')
- (void) printf("Dump these file systems:\n");
- else
- (void) printf("Last dump(s) done (Dump '>' file systems):\n");
- lastname = "??";
- ITITERATE(i, dtwalk) {
- if (strncmp(lastname, dtwalk->dd_name,
- sizeof(dtwalk->dd_name)) == 0)
- continue;
- date = (char *)ctime(&dtwalk->dd_ddate);
- date[16] = '\0'; /* blast away seconds and year */
- lastname = dtwalk->dd_name;
- dt = fstabsearch(dtwalk->dd_name);
- dumpme = (dt != NULL &&
- dt->fs_freq != 0 &&
- dtwalk->dd_ddate < tnow - (dt->fs_freq * SECSPERDAY));
- if (arg != 'w' || dumpme)
- (void) printf(
- "%c %8s\t(%6s) Last dump: Level %c, Date %s\n",
- dumpme && (arg != 'w') ? '>' : ' ',
- dtwalk->dd_name,
- dt ? dt->fs_file : "",
- dtwalk->dd_level,
- date);
+ initdumptimes(0); /* dumpdates input */
+ if (ddatev != NULL) {
+ qsort((char *) ddatev, nddates, sizeof(struct dumpdates *), datesort);
+
+ if (arg == 'w')
+ (void) printf("Dump these file systems:\n");
+ else
+ (void) printf("Last dump(s) done (Dump '>' file systems):\n");
+ lastname = "??";
+ ITITERATE(i, dtwalk) {
+ if (strncmp(lastname, dtwalk->dd_name,
+ sizeof(dtwalk->dd_name)) == 0)
+ continue;
+ date = (char *)ctime(&dtwalk->dd_ddate);
+ date[16] = '\0'; /* blast away seconds and year */
+ lastname = dtwalk->dd_name;
+ dt = fstabsearch(dtwalk->dd_name);
+ dumpme = (dt != NULL &&
+ dt->fs_freq != 0 &&
+ dtwalk->dd_ddate < tnow - (dt->fs_freq * 86400));
+ if (arg != 'w' || dumpme)
+ (void) printf(
+ "%c %8s\t(%6s) Last dump: Level %c, Date %s\n",
+ dumpme && (arg != 'w') ? '>' : ' ',
+ dtwalk->dd_name,
+ dt ? dt->fs_file : "",
+ dtwalk->dd_level,
+ date);
+ }