summaryrefslogtreecommitdiffstats
path: root/usr.sbin/mopd
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2017-01-21 08:33:51 +0000
committerkrw <krw@openbsd.org>2017-01-21 08:33:51 +0000
commitf7f1b83409d4a3646b29666e18dd21b77190af19 (patch)
tree3cd092e8cb8c1d267d6a00a611376984815d08b2 /usr.sbin/mopd
parentNuke whitespace foolish enough to expose itself during the great (diff)
downloadwireguard-openbsd-f7f1b83409d4a3646b29666e18dd21b77190af19.tar.xz
wireguard-openbsd-f7f1b83409d4a3646b29666e18dd21b77190af19.zip
Nuke whitespace foolish enough to expose itself during the great
"warning:" rectification.
Diffstat (limited to 'usr.sbin/mopd')
-rw-r--r--usr.sbin/mopd/common/device.c4
-rw-r--r--usr.sbin/mopd/common/dl.c6
-rw-r--r--usr.sbin/mopd/common/file.c16
-rw-r--r--usr.sbin/mopd/common/mopdef.h38
-rw-r--r--usr.sbin/mopd/mopa.out/mopa.out.c24
5 files changed, 44 insertions, 44 deletions
diff --git a/usr.sbin/mopd/common/device.c b/usr.sbin/mopd/common/device.c
index 8aeb17b640e..5135f4dd05d 100644
--- a/usr.sbin/mopd/common/device.c
+++ b/usr.sbin/mopd/common/device.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: device.c,v 1.16 2013/11/24 21:32:31 deraadt Exp $ */
+/* $OpenBSD: device.c,v 1.17 2017/01/21 08:33:51 krw Exp $ */
/*
* Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
@@ -157,7 +157,7 @@ deviceInitOne(char *ifname)
snprintf(interface, sizeof(interface), "%s", ifname);
#endif /* _AIX */
- /* Ok, init it just once */
+ /* Ok, init it just once */
p = iflist;
for (p = iflist; p; p = p->next)
if (strcmp(p->if_name, interface) == 0)
diff --git a/usr.sbin/mopd/common/dl.c b/usr.sbin/mopd/common/dl.c
index 76baa16fd83..3b7c616cde7 100644
--- a/usr.sbin/mopd/common/dl.c
+++ b/usr.sbin/mopd/common/dl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dl.c,v 1.9 2016/12/25 16:40:06 krw Exp $ */
+/* $OpenBSD: dl.c,v 1.10 2017/01/21 08:33:51 krw Exp $ */
/*
* Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
@@ -15,9 +15,9 @@
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
diff --git a/usr.sbin/mopd/common/file.c b/usr.sbin/mopd/common/file.c
index 170dded7d5f..65c016b3f95 100644
--- a/usr.sbin/mopd/common/file.c
+++ b/usr.sbin/mopd/common/file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.c,v 1.17 2014/12/13 14:44:59 miod Exp $ */
+/* $OpenBSD: file.c,v 1.18 2017/01/21 08:33:51 krw Exp $ */
/*
* Copyright (c) 1995-96 Mats O Jansson. All rights reserved.
@@ -891,12 +891,12 @@ CheckAOutFile(int fd)
return(-1);
(void)lseek(fd, (off_t) 0, SEEK_SET);
-
+
if (read(fd, (char *)&ex_swap, sizeof(ex_swap)) != sizeof(ex_swap))
return(-1);
(void)lseek(fd, (off_t) 0, SEEK_SET);
-
+
mid = getMID(mid, N_GETMID (ex));
if (mid == -1) {
@@ -1227,7 +1227,7 @@ mopFileRead(struct dllist *dlslot, u_char *buf)
len = 0;
total = dlslot->a_text;
-
+
if (pos < total) {
notdone = total - pos;
if (notdone <= bsz) {
@@ -1256,7 +1256,7 @@ mopFileRead(struct dllist *dlslot, u_char *buf)
}
total = total + dlslot->a_data;
-
+
if ((bsz > 0) && (pos < total)) {
notdone = total - pos;
if (notdone <= bsz) {
@@ -1283,7 +1283,7 @@ mopFileRead(struct dllist *dlslot, u_char *buf)
pos = pos + outlen;
bsz = bsz - outlen;
}
-
+
total = total + dlslot->a_bss;
if ((bsz > 0) && (pos < total)) {
@@ -1298,7 +1298,7 @@ mopFileRead(struct dllist *dlslot, u_char *buf)
pos = pos + outlen;
bsz = bsz - outlen;
}
-
+
total = total + dlslot->a_bss_fill;
if ((bsz > 0) && (pos < total)) {
@@ -1313,7 +1313,7 @@ mopFileRead(struct dllist *dlslot, u_char *buf)
pos = pos + outlen;
bsz = bsz - outlen;
}
-
+
dlslot->a_lseek = pos;
break;
diff --git a/usr.sbin/mopd/common/mopdef.h b/usr.sbin/mopd/common/mopdef.h
index 389656ce9f1..1ec3a8b99be 100644
--- a/usr.sbin/mopd/common/mopdef.h
+++ b/usr.sbin/mopd/common/mopdef.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: mopdef.h,v 1.5 2003/06/02 21:38:39 maja Exp $ */
+/* $OpenBSD: mopdef.h,v 1.6 2017/01/21 08:33:51 krw Exp $ */
/*
* Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $OpenBSD: mopdef.h,v 1.5 2003/06/02 21:38:39 maja Exp $
+ * $OpenBSD: mopdef.h,v 1.6 2017/01/21 08:33:51 krw Exp $
*
*/
@@ -48,7 +48,7 @@
/* The following constants are defined in module MOPDEF.SDL in MOM */
-#define MOP_K_CODE_MIN 0
+#define MOP_K_CODE_MIN 0
#define MOP_K_CODE_MLT 0 /* Memory Load with transfer address */
#define MOP_K_CODE_DCM 1 /* Dump Complete */
#define MOP_K_CODE_MLD 2 /* Memory Load */
@@ -71,38 +71,38 @@
#define MOP_K_CODE_PLT 20 /* Parameter load with transfer address*/
#define MOP_K_CODE_ALD 24 /* Active loop data */
#define MOP_K_CODE_PLD 26 /* Passive looped data */
-#define MOP_K_CODE_MAX 26
+#define MOP_K_CODE_MAX 26
-#define MOP_K_PGTY_MIN 0
+#define MOP_K_PGTY_MIN 0
#define MOP_K_PGTY_SECLDR 0 /* Secondary Loader */
#define MOP_K_PGTY_TERLDR 1 /* Tertiary Loader */
#define MOP_K_PGTY_OPRSYS 2 /* Operating System */
#define MOP_K_PGTY_MGNTFL 3 /* Management File */
-#define MOP_K_PGTY_MAX 3
+#define MOP_K_PGTY_MAX 3
-#define MOP_K_BPTY_MIN 0
+#define MOP_K_BPTY_MIN 0
#define MOP_K_BPTY_SYS 0 /* System Processor */
#define MOP_K_BPTY_COM 1 /* Communication Processor */
#define MOP_K_BPTY_MAX 1
-#define MOP_K_RML_ERROR_MIN 0
+#define MOP_K_RML_ERROR_MIN 0
#define MOP_K_RML_ERROR_NONE 0 /* None */
#define MOP_K_RML_ERROR_NO_LOAD 1 /* Image data not properly loaded */
-#define MOP_K_RML_ERROR_MAX 1
+#define MOP_K_RML_ERROR_MAX 1
-#define MOP_K_PLTP_MIN 0
+#define MOP_K_PLTP_MIN 0
#define MOP_K_PLTP_END 0 /* End Mark */
#define MOP_K_PLTP_TSN 1 /* Target System Name */
#define MOP_K_PLTP_TSA 2 /* Target System Address */
#define MOP_K_PLTP_HSN 3 /* Host System Name */
#define MOP_K_PLTP_HSA 4 /* Host System Address */
#define MOP_K_PLTP_HST 5 /* Host System Time */
-#define MOP_K_PLTP_MAX 5
+#define MOP_K_PLTP_MAX 5
-#define MOP_K_BOT_CNTL_MIN 0
+#define MOP_K_BOT_CNTL_MIN 0
#define MOP_K_BOT_CNTL_SERVER 0 /* Boot-Server */
#define MOP_K_BOT_CNTL_DEVICE 1 /* Boot-Device */
-#define MOP_K_BOT_CNTL_MAX 1
+#define MOP_K_BOT_CNTL_MAX 1
#define MOP_K_INFO_VER 1 /* Maintenance Version */
#define MOP_K_INFO_MFCT 2 /* Maintenance Functions */
@@ -118,26 +118,26 @@
#define MOP_K_INFO_DLTY 400 /* Data Link Type */
#define MOP_K_INFO_DLBSZ 401 /* Data Link Buffer Size */
-#define MOP_K_DLTY_MIN 1
+#define MOP_K_DLTY_MIN 1
#define MOP_K_DLTY_NI 1 /* Ethernet */
#define MOP_K_DLTY_DDCMP 2 /* DDCMP */
#define MOP_K_DLTY_LAPB 3 /* LAPB (frame level of X.25) */
-#define MOP_K_DLTY_MAX 3
+#define MOP_K_DLTY_MAX 3
-#define MOP_K_PRTY_MIN 0
+#define MOP_K_PRTY_MIN 0
#define MOP_K_PRTY_11 1 /* PDP-11 (UNIBUS) */
#define MOP_K_PRTY_CMSV 2 /* Communication Server */
#define MOP_K_PRTY_PRO 3 /* Professional */
#define MOP_K_PRTY_SCO 4 /* Scorpio */
#define MOP_K_PRTY_AMB 5 /* Amber */
#define MOP_K_PRTY_BRI 6 /* XLII Bridge */
-#define MOP_K_PRTY_MAX 6
+#define MOP_K_PRTY_MAX 6
-#define MOP_K_SFID_FORM_MIN -2
+#define MOP_K_SFID_FORM_MIN -2
#define MOP_K_SFID_FORM_MAINT -2 /* Maintenance System */
#define MOP_K_SFID_FORM_OPRSYS -1 /* Standard Operating System */
#define MOP_K_SFID_FORM_NONE 0 /* None */
-#define MOP_K_SFID_FORM_MAX 0
+#define MOP_K_SFID_FORM_MAX 0
#define MOP_K_SFID_CUST 'CP' /* Customer product */
#define MOP_K_SFID_DEC 'DP' /* DEC product */
diff --git a/usr.sbin/mopd/mopa.out/mopa.out.c b/usr.sbin/mopd/mopa.out/mopa.out.c
index 9598907ba0e..e6471cd3c86 100644
--- a/usr.sbin/mopd/mopa.out/mopa.out.c
+++ b/usr.sbin/mopd/mopa.out/mopa.out.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mopa.out.c,v 1.15 2016/12/20 22:19:08 krw Exp $ */
+/* $OpenBSD: mopa.out.c,v 1.16 2017/01/21 08:33:51 krw Exp $ */
/*
* mopa.out - Convert a Unix format kernel into something that
@@ -10,10 +10,10 @@
*
* If necessary, the a.out header is stripped, and the program
* segments are padded out. The BSS segment is zero filled.
- * A header is prepended that looks like an IHD header. In
+ * A header is prepended that looks like an IHD header. In
* particular the Unix machine ID is placed where mopd expects
* the image type to be (offset is IHD_W_ALIAS). If the machine
- * ID could be mistaken for a DEC image type, then the conversion
+ * ID could be mistaken for a DEC image type, then the conversion
* is aborted. The original a.out header is copied into the front
* of the header so that once we have detected the Unix machine
* ID we can haul the load address and the xfer address out.
@@ -92,21 +92,21 @@ main (int argc, char **argv)
int i, j;
struct dllist dl;
short image_type;
-
+
#ifdef NOAOUT
fprintf(stderr, "%s: has no function in OS/BSD\n", argv[0]);
return(1);
-#endif
+#endif
if (argc != 3) {
fprintf (stderr, "usage: %s infile outfile\n", argv[0]);
return (1);
}
-
+
dl.ldfd = open (argv[1], O_RDONLY);
if (dl.ldfd == -1)
err(2, "open `%s'", argv[1]);
-
+
if (GetFileInfo(&dl, 0) == -1)
errx(3, "`%s' is an unknown file type", argv[1]);
@@ -192,13 +192,13 @@ main (int argc, char **argv)
mopFilePutLX(header, 0xd4 + EISD_L_SECSIZE, i, 4);
break;
}
-
+
out = fopen (argv[2], "w");
if (!out)
err(2, "writing `%s'", argv[2]);
-
+
/* Now we do the actual work. Write MOP-image header */
-
+
fwrite (header, sizeof (header), 1, out);
switch (dl.image_type) {
@@ -229,11 +229,11 @@ main (int argc, char **argv)
default:
break;
}
-
+
while ((i = mopFileRead(&dl,header)) > 0) {
(void)fwrite(header, i, 1, out);
}
-
+
fclose (out);
exit(0);
}