Module Name: src Committed By: abs Date: Tue Oct 27 17:16:25 UTC 2020
Modified Files: src/usr.sbin/mopd/common: file.c src/usr.sbin/mopd/mopcopy: mopcopy.c Log Message: Update mopd for 4k VAX page size and support 1k page a.out binaries >From dreamlayers To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/mopd/common/file.c cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/mopd/mopcopy/mopcopy.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.sbin/mopd/common/file.c diff -u src/usr.sbin/mopd/common/file.c:1.16 src/usr.sbin/mopd/common/file.c:1.17 --- src/usr.sbin/mopd/common/file.c:1.16 Wed Jun 8 01:11:49 2016 +++ src/usr.sbin/mopd/common/file.c Tue Oct 27 17:16:24 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: file.c,v 1.16 2016/06/08 01:11:49 christos Exp $ */ +/* $NetBSD: file.c,v 1.17 2020/10/27 17:16:24 abs Exp $ */ /* * Copyright (c) 1995-96 Mats O Jansson. All rights reserved. @@ -26,7 +26,7 @@ #include "port.h" #ifndef lint -__RCSID("$NetBSD: file.c,v 1.16 2016/06/08 01:11:49 christos Exp $"); +__RCSID("$NetBSD: file.c,v 1.17 2020/10/27 17:16:24 abs Exp $"); #endif #include "os.h" @@ -46,7 +46,10 @@ __RCSID("$NetBSD: file.c,v 1.16 2016/06/ # include <sys/imgact_aout.h> # endif # if !defined(MID_VAX) -# define MID_VAX 140 +# define MID_VAX 150 +# endif +# if !defined(MID_VAX1K) +# define MID_VAX1K 140 # endif #endif /* NOAOUT */ @@ -328,6 +331,11 @@ getMID(int old_mid, int new_mid) mid = MID_VAX; break; #endif +#ifdef MID_VAX1K + case MID_VAX1K: + mid = MID_VAX1K; + break; +#endif #ifdef MID_ALPHA case MID_ALPHA: mid = MID_ALPHA; @@ -356,8 +364,8 @@ getCLBYTES(int mid) int clbytes; switch (mid) { -#ifdef MID_VAX - case MID_VAX: +#ifdef MID_VAX1K + case MID_VAX1K: clbytes = 1024; break; #endif @@ -379,8 +387,12 @@ getCLBYTES(int mid) #ifdef MID_ARM6 case MID_ARM6: #endif +#ifdef MID_VAX + case MID_VAX: +#endif #if defined(MID_I386) || defined(MID_M68K4K) || defined(MID_NS32532) || \ - defined(MID_PMAX) || defined(MID_MIPS) || defined(MID_ARM6) + defined(MID_PMAX) || defined(MID_MIPS) || defined(MID_ARM6) || \ + defined(MID_VAX) clbytes = 4096; break; #endif @@ -697,6 +709,9 @@ GetAOutFileInfo(struct dllist *dl) #ifdef MID_VAX case MID_VAX: #endif +#ifdef MID_VAX1K + case MID_VAX1K: +#endif #ifdef MID_ALPHA case MID_ALPHA: #endif @@ -766,6 +781,11 @@ GetAOutFileInfo(struct dllist *dl) printf("vax"); break; #endif +#ifdef MID_VAX1K + case MID_VAX1K: + printf("vax 1k"); + break; +#endif #ifdef MID_ALPHA case MID_ALPHA: printf("alpha"); Index: src/usr.sbin/mopd/mopcopy/mopcopy.c diff -u src/usr.sbin/mopd/mopcopy/mopcopy.c:1.7 src/usr.sbin/mopd/mopcopy/mopcopy.c:1.8 --- src/usr.sbin/mopd/mopcopy/mopcopy.c:1.7 Fri Dec 27 09:41:52 2019 +++ src/usr.sbin/mopd/mopcopy/mopcopy.c Tue Oct 27 17:16:24 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: mopcopy.c,v 1.7 2019/12/27 09:41:52 msaitoh Exp $ */ +/* $NetBSD: mopcopy.c,v 1.8 2020/10/27 17:16:24 abs Exp $ */ /* mopcopy - Convert a Unix format kernel into something that * can be transferred via MOP. @@ -49,7 +49,7 @@ #include "port.h" #ifndef lint -__RCSID("$NetBSD: mopcopy.c,v 1.7 2019/12/27 09:41:52 msaitoh Exp $"); +__RCSID("$NetBSD: mopcopy.c,v 1.8 2020/10/27 17:16:24 abs Exp $"); #endif #include "os.h" @@ -69,6 +69,9 @@ __RCSID("$NetBSD: mopcopy.c,v 1.7 2019/1 #define NOAOUT #endif #if !defined(MID_VAX) +#define MID_VAX 150 +#endif +#if !defined(MID_VAX1K) #define MID_VAX 140 #endif @@ -125,7 +128,7 @@ main(int argc, char **argv) #ifndef NOAOUT case IMAGE_TYPE_AOUT: - if (dl.a_mid != MID_VAX) + if (dl.a_mid != MID_VAX && dl.a_mid != MID_VAX1K) printf("WARNING: `%s' is not a VAX image (mid=%d)\n", argv[1], dl.a_mid); i = dl.a_text + dl.a_text_fill + dl.a_data + dl.a_data_fill +