Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/i386/stand Make sure devices names are copied inclu...
details: https://anonhg.NetBSD.org/src/rev/73b0a2944396
branches: trunk
changeset: 965150:73b0a2944396
user: manu <manu%NetBSD.org@localhost>
date: Mon Sep 02 06:10:24 2019 +0000
description:
Make sure devices names are copied including last byte
Fix from M. Levinson.
diffstat:
sys/arch/i386/stand/boot/boot2.c | 5 +++--
sys/arch/i386/stand/efiboot/boot.c | 5 +++--
sys/arch/i386/stand/efiboot/devopen.c | 5 +++--
3 files changed, 9 insertions(+), 6 deletions(-)
diffs (57 lines):
diff -r f31724442d68 -r 73b0a2944396 sys/arch/i386/stand/boot/boot2.c
--- a/sys/arch/i386/stand/boot/boot2.c Mon Sep 02 06:08:04 2019 +0000
+++ b/sys/arch/i386/stand/boot/boot2.c Mon Sep 02 06:10:24 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: boot2.c,v 1.71 2019/08/18 02:18:24 manu Exp $ */
+/* $NetBSD: boot2.c,v 1.72 2019/09/02 06:10:24 manu Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -172,7 +172,8 @@
if (default_part_name == NULL) {
*devname = default_devname;
} else {
- snprintf(savedevname, MAXDEVNAME, "NAME=%s", default_part_name);
+ snprintf(savedevname, sizeof(savedevname),
+ "NAME=%s", default_part_name);
*devname = savedevname;
}
*unit = default_unit;
diff -r f31724442d68 -r 73b0a2944396 sys/arch/i386/stand/efiboot/boot.c
--- a/sys/arch/i386/stand/efiboot/boot.c Mon Sep 02 06:08:04 2019 +0000
+++ b/sys/arch/i386/stand/efiboot/boot.c Mon Sep 02 06:10:24 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: boot.c,v 1.14 2019/08/18 02:18:24 manu Exp $ */
+/* $NetBSD: boot.c,v 1.15 2019/09/02 06:10:24 manu Exp $ */
/*-
* Copyright (c) 2016 Kimihiro Nonaka <nonaka%netbsd.org@localhost>
@@ -130,7 +130,8 @@
if (default_part_name == NULL) {
*devname = default_devname;
} else {
- snprintf(savedevname, MAXDEVNAME, "NAME=%s", default_part_name);
+ snprintf(savedevname, sizeof(savedevname),
+ "NAME=%s", default_part_name);
*devname = savedevname;
}
*unit = default_unit;
diff -r f31724442d68 -r 73b0a2944396 sys/arch/i386/stand/efiboot/devopen.c
--- a/sys/arch/i386/stand/efiboot/devopen.c Mon Sep 02 06:08:04 2019 +0000
+++ b/sys/arch/i386/stand/efiboot/devopen.c Mon Sep 02 06:10:24 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: devopen.c,v 1.6 2019/08/18 02:18:24 manu Exp $ */
+/* $NetBSD: devopen.c,v 1.7 2019/09/02 06:10:24 manu Exp $ */
/*-
* Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -100,7 +100,8 @@
(void)biosdisk_findpartition(biosdev, sector, partition, part_name);
if (*part_name != NULL) {
- snprintf(savedevname, MAXDEVNAME, "NAME=%s", *part_name);
+ snprintf(savedevname, sizeof(savedevname),
+ "NAME=%s", *part_name);
*devname = savedevname;
}
}
Home |
Main Index |
Thread Index |
Old Index