Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch kill sprintf.
details: https://anonhg.NetBSD.org/src/rev/2947d20ccead
branches: trunk
changeset: 328111:2947d20ccead
user: christos <christos%NetBSD.org@localhost>
date: Wed Mar 26 17:38:09 2014 +0000
description:
kill sprintf.
diffstat:
sys/arch/evbarm/ifpga/ifpga_pci.c | 6 +++---
sys/arch/evbarm/iq80310/iq80310_intr.c | 6 +++---
sys/arch/evbarm/iq80310/iq80310_pci.c | 6 +++---
sys/arch/evbarm/ixdp425/ixdp425_pci.c | 6 +++---
sys/arch/evbarm/ixm1200/ixm1200_pci.c | 6 +++---
sys/arch/evbarm/ixm1200/nappi_nppb.c | 6 +++---
sys/arch/ofppc/ofppc/machdep.c | 12 ++++++------
7 files changed, 24 insertions(+), 24 deletions(-)
diffs (202 lines):
diff -r bc97890e02f7 -r 2947d20ccead sys/arch/evbarm/ifpga/ifpga_pci.c
--- a/sys/arch/evbarm/ifpga/ifpga_pci.c Wed Mar 26 17:35:08 2014 +0000
+++ b/sys/arch/evbarm/ifpga/ifpga_pci.c Wed Mar 26 17:38:09 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ifpga_pci.c,v 1.16 2014/03/09 19:55:48 martin Exp $ */
+/* $NetBSD: ifpga_pci.c,v 1.17 2014/03/26 17:40:03 christos Exp $ */
/*
* Copyright (c) 2001 ARM Ltd
@@ -64,7 +64,7 @@
#define _ARM32_BUS_DMA_PRIVATE
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ifpga_pci.c,v 1.16 2014/03/09 19:55:48 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ifpga_pci.c,v 1.17 2014/03/26 17:40:03 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -335,7 +335,7 @@
if (ih == 0)
panic("ifpga_pci_intr_string: bogus handle 0x%lx", ih);
- sprintf(irqstr, "pciint%ld", ih - IFPGA_INTRNUM_PCIINT0);
+ snprintf(irqstr, sizeof(irqstr), "pciint%ld", ih - IFPGA_INTRNUM_PCIINT0);
return irqstr;
}
diff -r bc97890e02f7 -r 2947d20ccead sys/arch/evbarm/iq80310/iq80310_intr.c
--- a/sys/arch/evbarm/iq80310/iq80310_intr.c Wed Mar 26 17:35:08 2014 +0000
+++ b/sys/arch/evbarm/iq80310/iq80310_intr.c Wed Mar 26 17:38:09 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: iq80310_intr.c,v 1.33 2014/01/28 12:01:31 martin Exp $ */
+/* $NetBSD: iq80310_intr.c,v 1.34 2014/03/26 17:40:03 christos Exp $ */
/*
* Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: iq80310_intr.c,v 1.33 2014/01/28 12:01:31 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: iq80310_intr.c,v 1.34 2014/03/26 17:40:03 christos Exp $");
#ifndef EVBARM_SPL_NOINLINE
#define EVBARM_SPL_NOINLINE
@@ -337,7 +337,7 @@
iq = &intrq[i];
TAILQ_INIT(&iq->iq_list);
- sprintf(iq->iq_name, "irq %d", i);
+ snprintf(iq->iq_name, sizeof(iq->iq_name), "irq %d", i);
}
iq80310_intr_calculate_masks();
diff -r bc97890e02f7 -r 2947d20ccead sys/arch/evbarm/iq80310/iq80310_pci.c
--- a/sys/arch/evbarm/iq80310/iq80310_pci.c Wed Mar 26 17:35:08 2014 +0000
+++ b/sys/arch/evbarm/iq80310/iq80310_pci.c Wed Mar 26 17:38:09 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: iq80310_pci.c,v 1.11 2011/07/01 20:41:16 dyoung Exp $ */
+/* $NetBSD: iq80310_pci.c,v 1.12 2014/03/26 17:40:03 christos Exp $ */
/*
* Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: iq80310_pci.c,v 1.11 2011/07/01 20:41:16 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: iq80310_pci.c,v 1.12 2014/03/26 17:40:03 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -234,7 +234,7 @@
{
static char irqstr[IRQNAMESIZE];
- sprintf(irqstr, "iq80310 irq %ld", ih);
+ snprintf(irqstr, sizeof(irqstr), "iq80310 irq %ld", ih);
return (irqstr);
}
diff -r bc97890e02f7 -r 2947d20ccead sys/arch/evbarm/ixdp425/ixdp425_pci.c
--- a/sys/arch/evbarm/ixdp425/ixdp425_pci.c Wed Mar 26 17:35:08 2014 +0000
+++ b/sys/arch/evbarm/ixdp425/ixdp425_pci.c Wed Mar 26 17:38:09 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixdp425_pci.c,v 1.9 2012/11/12 18:00:39 skrll Exp $ */
+/* $NetBSD: ixdp425_pci.c,v 1.10 2014/03/26 17:40:03 christos Exp $ */
#define PCI_DEBUG
/*
* Copyright (c) 2003
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ixdp425_pci.c,v 1.9 2012/11/12 18:00:39 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixdp425_pci.c,v 1.10 2014/03/26 17:40:03 christos Exp $");
/*
* IXDP425 PCI interrupt support.
@@ -219,7 +219,7 @@
{
static char irqstr[IRQNAMESIZE];
- sprintf(irqstr, "ixp425 irq %ld", ih);
+ snprintf(irqstr, sizeof(irqstr), "ixp425 irq %ld", ih);
return (irqstr);
}
diff -r bc97890e02f7 -r 2947d20ccead sys/arch/evbarm/ixm1200/ixm1200_pci.c
--- a/sys/arch/evbarm/ixm1200/ixm1200_pci.c Wed Mar 26 17:35:08 2014 +0000
+++ b/sys/arch/evbarm/ixm1200/ixm1200_pci.c Wed Mar 26 17:38:09 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixm1200_pci.c,v 1.9 2011/07/01 20:42:37 dyoung Exp $ */
+/* $NetBSD: ixm1200_pci.c,v 1.10 2014/03/26 17:40:03 christos Exp $ */
#define PCI_DEBUG
/*
* Copyright (c) 2002, 2003
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ixm1200_pci.c,v 1.9 2011/07/01 20:42:37 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixm1200_pci.c,v 1.10 2014/03/26 17:40:03 christos Exp $");
/*
* IXM1200 PCI interrupt support.
@@ -94,7 +94,7 @@
{
static char irqstr[IRQNAMESIZE];
- sprintf(irqstr, "IXM1200 irq %ld", ih);
+ snprintf(irqstr, sizeof(irqstr), "IXM1200 irq %ld", ih);
return (irqstr);
}
diff -r bc97890e02f7 -r 2947d20ccead sys/arch/evbarm/ixm1200/nappi_nppb.c
--- a/sys/arch/evbarm/ixm1200/nappi_nppb.c Wed Mar 26 17:35:08 2014 +0000
+++ b/sys/arch/evbarm/ixm1200/nappi_nppb.c Wed Mar 26 17:38:09 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nappi_nppb.c,v 1.11 2012/11/12 18:00:39 skrll Exp $ */
+/* $NetBSD: nappi_nppb.c,v 1.12 2014/03/26 17:40:03 christos Exp $ */
/*
* Copyright (c) 2002, 2003
* Ichiro FUKUHARA <ichiro%ichiro.org@localhost>.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nappi_nppb.c,v 1.11 2012/11/12 18:00:39 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nappi_nppb.c,v 1.12 2014/03/26 17:40:03 christos Exp $");
#include "pci.h"
#include "opt_pci.h"
@@ -126,7 +126,7 @@
psc->psc_pc = pc;
psc->psc_tag = pa->pa_tag;
- sprintf(devinfo, "21555 Non-Transparent PCI-PCI Bridge");
+ snprintf(devinfo, sizeof(devinfo), "21555 Non-Transparent PCI-PCI Bridge");
aprint_normal(": %s, rev %d\n", devinfo, PCI_REVISION(pa->pa_class));
/* Make sure bus-mastering is enabled. */
diff -r bc97890e02f7 -r 2947d20ccead sys/arch/ofppc/ofppc/machdep.c
--- a/sys/arch/ofppc/ofppc/machdep.c Wed Mar 26 17:35:08 2014 +0000
+++ b/sys/arch/ofppc/ofppc/machdep.c Wed Mar 26 17:38:09 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.116 2012/07/28 23:11:01 matt Exp $ */
+/* $NetBSD: machdep.c,v 1.117 2014/03/26 17:38:09 christos Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.116 2012/07/28 23:11:01 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.117 2014/03/26 17:38:09 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -166,17 +166,17 @@
}
/* init frame buffer mode */
- sprintf(buf, "%x vesa-set-mode", mode);
+ snprintf(buf, sizeof(buf), "%x vesa-set-mode", mode);
OF_interpret(buf, 0, 0);
/* set dimensions and frame buffer address in OFW */
- sprintf(buf, "%x to screen-width", width);
+ snprintf(buf, sizeof(buf), "%x to screen-width", width);
OF_interpret(buf, 0, 0);
- sprintf(buf, "%x to screen-height", height);
+ snprintf(buf, sizeof(buf), "%x to screen-height", height);
OF_interpret(buf, 0, 0);
OF_interpret("vesa-frame-buffer-adr", 0, 1, &fbaddr);
if (fbaddr != 0) {
- sprintf(buf, "%x to frame-buffer-adr", fbaddr);
+ snprintf(buf, sizeof(buf), "%x to frame-buffer-adr", fbaddr);
OF_interpret(buf, 0, 0);
}
}
Home |
Main Index |
Thread Index |
Old Index