SCCS-vsn: usr.sbin/kvm_mkdb/kvm_mkdb.c 5.4
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)kvm_mkdb.c 5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)kvm_mkdb.c 5.4 (Berkeley) %G%";
#endif /* not lint */
#include <sys/param.h>
#endif /* not lint */
#include <sys/param.h>
syserrexit("can't unlink %s", file);
*(file+len) = '\0';
}
syserrexit("can't unlink %s", file);
*(file+len) = '\0';
}
mvdb(from, to)
char *from;
char *to;
mvdb(from, to)
char *from;
char *to;
long versoff;
long reloffset;
long versoff;
long reloffset;
+ /* offset relative to start of text image in VM. */
+#ifdef hp300
+ reloffset = s->n_value;
+#endif
+#ifdef tahoe
- * Offset relative to start of text image in VM.
- * On tahoe, first 0x800 is reserved for
- * communication with the console processor.
+ * on tahoe, first 0x800 is reserved for communication
+ * with the console processor.
reloffset = ((s->n_value & ~KERNBASE) - 0x800);
#endif
#ifdef vax
reloffset = ((s->n_value & ~KERNBASE) - 0x800);
#endif
#ifdef vax
#endif
/*
* When loaded, data is rounded
#endif
/*
* When loaded, data is rounded
- * to next 1024 after text, but not in file.
+ * to next page cluster after text, but not in file.
- reloffset -= 1024 - (ebuf.a_text % 1024);
+ reloffset -= CLBYTES - (ebuf.a_text % CLBYTES);
versoff = N_TXTOFF(ebuf) + reloffset;
if (fseek(fstr, versoff, SEEK_SET) == -1)
syserrexit("seek (version): %x", s->n_value);
versoff = N_TXTOFF(ebuf) + reloffset;
if (fseek(fstr, versoff, SEEK_SET) == -1)
syserrexit("seek (version): %x", s->n_value);