summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2018-05-28 19:39:16 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2018-05-28 19:39:16 +0000
commit4dc4c6c9550b372fbb3977112c09486d42cacf09 (patch)
tree407d703eb8c9846417e919882759e07fbf13c5b8 /sys
parent414dac5f04eeaadec5a31399fff249f4d8180c92 (diff)
Cleanup bootconfig.h and use strlcpy() to copy boot arguments.
ok drahn@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/arm64/arm64/machdep.c6
-rw-r--r--sys/arch/arm64/include/bootconfig.h11
2 files changed, 4 insertions, 13 deletions
diff --git a/sys/arch/arm64/arm64/machdep.c b/sys/arch/arm64/arm64/machdep.c
index 54f95d0e353..1d59a037114 100644
--- a/sys/arch/arm64/arm64/machdep.c
+++ b/sys/arch/arm64/arm64/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.33 2018/05/15 11:12:35 kettenis Exp $ */
+/* $OpenBSD: machdep.c,v 1.34 2018/05/28 19:39:15 kettenis Exp $ */
/*
* Copyright (c) 2014 Patrick Wildt <patrick@blueri.se>
*
@@ -1136,13 +1136,13 @@ remap_efi_runtime(EFI_PHYSICAL_ADDRESS system_table)
}
int comcnspeed = B115200;
-char bootargs[MAX_BOOT_STRING];
+char bootargs[256];
void
collect_kernel_args(char *args)
{
/* Make a local copy of the bootargs */
- strncpy(bootargs, args, MAX_BOOT_STRING - sizeof(int));
+ strlcpy(bootargs, args, sizeof(bootargs));
}
void
diff --git a/sys/arch/arm64/include/bootconfig.h b/sys/arch/arm64/include/bootconfig.h
index 5f1c49124f5..b47defd59c0 100644
--- a/sys/arch/arm64/include/bootconfig.h
+++ b/sys/arch/arm64/include/bootconfig.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bootconfig.h,v 1.2 2016/12/18 14:40:25 patrick Exp $ */
+/* $OpenBSD: bootconfig.h,v 1.3 2018/05/28 19:39:15 kettenis Exp $ */
/* $NetBSD: bootconfig.h,v 1.2 2001/06/21 22:08:28 chris Exp $ */
/*-
@@ -32,9 +32,6 @@
#ifndef _MACHINE_BOOTCONFIG_H_
#define _MACHINE_BOOTCONFIG_H_
-#define MAX_BOOT_STRING 255
-extern char bootstring[MAX_BOOT_STRING];
-
struct arm64_bootparams {
vaddr_t modulep;
vaddr_t kern_l1pt; /* L1 page table for the kernel */
@@ -45,14 +42,8 @@ struct arm64_bootparams {
void *arg2; // passed to kernel in R2
};
-extern paddr_t physmap[];
-extern u_int physmap_idx;
-
-
void initarm(struct arm64_bootparams *);
extern char *boot_file;
#endif /* _MACHINE_BOOTCONFIG_H_ */
-
-/* End of bootconfig.h */