+Tue Nov 5 16:16:53 1996 Barry Jaspan <bjaspan@mit.edu>
+
+ * dump.c (load_db): minor fix to code that verifies the specified
+ load version matches the file (autodetect worked anyway)
+
Fri Oct 18 14:23:41 1996 Barry Jaspan <bjaspan@mit.edu>
* dump.c (load_db): osa_adb_rename_policy_db will create the db,
*/
fgets(buf, sizeof(buf), f);
if (load) {
- /*
- * If the header does not end in newline, only check what we know.
- */
- if ((load->header[strlen(load->header)-1] != '\n' &&
- strncmp(buf, load->header, strlen(load->header)) != 0) ||
- (strcmp(buf, load->header) != 0)) {
+ /* only check what we know; some headers only contain a prefix */
+ if (strncmp(buf, load->header, strlen(load->header)) != 0) {
fprintf(stderr, head_bad_fmt, programname, dumpfile);
exit_status++;
if (dumpfile) fclose(f);
}
}
if (load->updateonly && !update) {
- fprintf(stderr, "%s: dump version %s can only be loaded in "
- "update mode\n", programname, load->name);
+ fprintf(stderr, "%s: dump version %s can only be loaded with the "
+ "-update flag\n", programname, load->name);
exit_status++;
return;
}