-
- nlist("/vmunix", nl);
- if (nl[X_DUMPDEV].n_value == 0) {
- fprintf(stderr, "/vmunix: dumpdev not in namelist\n");
+ char *dump_sys;
+
+ dump_sys = system ? system : "/vmunix";
+
+ nlist("/vmunix", current_nl);
+ nlist(dump_sys, dump_nl);
+
+ /*
+ * Some names we need for the currently running system,
+ * others for the system that was running when the dump was made.
+ * The values obtained from the current system are used
+ * to look for things in /dev/kmem that cannot be found
+ * in the dump_sys namelist, but are presumed to be the same
+ * (since the disk partitions are probably the same!)
+ */
+ if (current_nl[X_DUMPDEV].n_value == 0) {
+ fprintf(stderr, "savecore: /vmunix: dumpdev not in namelist\n");
+ exit(1);
+ }
+ if (current_nl[X_DUMPLO].n_value == 0) {
+ fprintf(stderr, "savecore: /vmunix: dumplo not in namelist\n");