summaryrefslogtreecommitdiff
path: root/sys/arch/mvmeppc/stand
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/mvmeppc/stand')
-rw-r--r--sys/arch/mvmeppc/stand/installboot/installboot.c6
-rw-r--r--sys/arch/mvmeppc/stand/libsa/Makefile4
-rw-r--r--sys/arch/mvmeppc/stand/libsa/bugdev.c13
-rw-r--r--sys/arch/mvmeppc/stand/libsa/tftpfs.c6
4 files changed, 16 insertions, 13 deletions
diff --git a/sys/arch/mvmeppc/stand/installboot/installboot.c b/sys/arch/mvmeppc/stand/installboot/installboot.c
index 813ca3042dc..9f0fc87c189 100644
--- a/sys/arch/mvmeppc/stand/installboot/installboot.c
+++ b/sys/arch/mvmeppc/stand/installboot/installboot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: installboot.c,v 1.4 2002/03/14 03:15:58 millert Exp $ */
+/* $OpenBSD: installboot.c,v 1.5 2003/06/01 17:00:38 deraadt Exp $ */
/* $NetBSD: installboot.c,v 1.5 1995/11/17 23:23:50 gwr Exp $ */
/*
@@ -121,7 +121,7 @@ main(argc, argv)
boot = argv[optind];
proto = argv[optind + 1];
dev = argv[optind + 2];
- strcpy(cdev, dev);
+ strlcpy(cdev, dev, sizeof cdev);
cdev[strlen(cdev)-1] = 'c';
if (verbose) {
@@ -423,7 +423,7 @@ char *bootproto;
pcpul->version = 1;
- strcpy(pcpul->vid_id, "M88K");
+ memcpy(pcpul->vid_id, "M88K", sizeof pcpul->vid_id);
fstat(exe_file, &stat);
diff --git a/sys/arch/mvmeppc/stand/libsa/Makefile b/sys/arch/mvmeppc/stand/libsa/Makefile
index 3c8b70fa1ea..4e8cad5fd99 100644
--- a/sys/arch/mvmeppc/stand/libsa/Makefile
+++ b/sys/arch/mvmeppc/stand/libsa/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.1 2001/06/26 21:58:06 smurph Exp $
+# $OpenBSD: Makefile,v 1.2 2003/06/01 17:00:38 deraadt Exp $
LIB=sa
@@ -21,7 +21,7 @@ SRC_sa= alloc.c memcpy.c exit.c getfile.c gets.c globals.c \
lseek.c open.c nullfs.c read.c fstat.c \
ufs.c cread.c
-SRC_kern= ashrdi3.c bzero.c strcpy.c
+SRC_kern= ashrdi3.c bzero.c
SRC_mvme= exec_mvme.c
diff --git a/sys/arch/mvmeppc/stand/libsa/bugdev.c b/sys/arch/mvmeppc/stand/libsa/bugdev.c
index b3a8c8bce27..7943924c56b 100644
--- a/sys/arch/mvmeppc/stand/libsa/bugdev.c
+++ b/sys/arch/mvmeppc/stand/libsa/bugdev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bugdev.c,v 1.1 2001/06/26 21:58:07 smurph Exp $ */
+/* $OpenBSD: bugdev.c,v 1.2 2003/06/01 17:00:38 deraadt Exp $ */
/*
* Copyright (c) 1993 Paul Kranenburg
@@ -425,7 +425,8 @@ retry:
printf(" IO @ %x\n", io);
printf("MEM @ %x\n", mem);
-#define PRINT_REG(regname, x) printf("%s = 0x%x\n", regname, md_swap_long(*(unsigned *)(io + x)))
+#define PRINT_REG(regname, x) printf("%s = 0x%x\n", regname, \
+ md_swap_long(*(unsigned *)(io + x)))
PRINT_REG("CSR0", 0x00);
PRINT_REG("CSR1", 0x08);
@@ -472,19 +473,21 @@ net_open(struct open_file *f, ...)
va_end(ap);
#ifdef DEBUG
- printf("net_open: using mvmebug ctrl %d dev %d, filename: %s\n", pp->clun, pp->dlun, filename);
+ printf("net_open: using mvmebug ctrl %d dev %d, filename: %s\n",
+ pp->clun, pp->dlun, filename);
#endif
nfo.clun = pp->clun;
nfo.dlun = pp->dlun;
nfo.status = 0;
- strcpy(nfo.filename, filename);
+ strlcpy(nfo.filename, filename, sizeof filename);
/* .NETFOPN syscall */
mvmeprom_netfopen(&nfo);
#ifdef DEBUG
if (nfo.status) {
nfoerr = nfo.status;
- printf("net_open: ci err = 0x%x, cd err = 0x%x\n", ((nfoerr >> 8) & 0x0F), (nfoerr & 0x0F));
+ printf("net_open: ci err = 0x%x, cd err = 0x%x\n",
+ ((nfoerr >> 8) & 0x0F), (nfoerr & 0x0F));
}
#endif
return (nfo.status);
diff --git a/sys/arch/mvmeppc/stand/libsa/tftpfs.c b/sys/arch/mvmeppc/stand/libsa/tftpfs.c
index 9e6a3c9e8e2..42f897506df 100644
--- a/sys/arch/mvmeppc/stand/libsa/tftpfs.c
+++ b/sys/arch/mvmeppc/stand/libsa/tftpfs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tftpfs.c,v 1.2 2002/03/14 01:26:41 millert Exp $ */
+/* $OpenBSD: tftpfs.c,v 1.3 2003/06/01 17:00:38 deraadt Exp $ */
/*-
* Copyright (c) 2001 Steve Murphree, Jr.
@@ -119,7 +119,7 @@ tftp_read_file(f, buf_p, size_p)
* and start again.
*/
char filename[64];
- strcpy(filename, fp->filename);
+ strlcpy(filename, fp->filename, sizeof filename);
tftpfs_close(f);
tftpfs_open(filename, f);
for (i = 1; i <= file_block; i++) {
@@ -171,7 +171,7 @@ tftpfs_open(path, f)
bzero(fp->f_buf, TFTP_BLOCK_SIZE);
fp->f_buf_size = 0;
- strcpy(fp->filename, path);
+ strlcpy(fp->filename, path, sizeof fp->filename);
if (f->f_dev->dv_open == NULL) {
panic("No device open()!");