From 0d1e222eff2cfe547d8cef8fbb8e34e9ba737d5c Mon Sep 17 00:00:00 2001 From: uwe Date: Tue, 17 Jan 2006 02:50:59 +0000 Subject: [PATCH] Hide plutid_dump() under #ifdef PLATID_TEST. Saves space in the kernel and avoids printf dependency for hpcboot. While here, constify its first argument. --- sys/arch/hpc/hpc/platid.c | 8 +++++--- sys/arch/hpc/include/platid.h | 7 +++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/sys/arch/hpc/hpc/platid.c b/sys/arch/hpc/hpc/platid.c index 8426681f9e4d..704f5c2f3424 100644 --- a/sys/arch/hpc/hpc/platid.c +++ b/sys/arch/hpc/hpc/platid.c @@ -1,4 +1,4 @@ -/* $NetBSD: platid.c,v 1.9 2005/12/11 12:17:25 christos Exp $ */ +/* $NetBSD: platid.c,v 1.10 2006/01/17 02:50:59 uwe Exp $ */ /*- * Copyright (c) 1999-2001 @@ -36,7 +36,7 @@ #include #if !defined(_WIN32) /* XXX: hpcboot.exe */ -__KERNEL_RCSID(0, "$NetBSD: platid.c,v 1.9 2005/12/11 12:17:25 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: platid.c,v 1.10 2006/01/17 02:50:59 uwe Exp $"); #endif #include @@ -65,8 +65,9 @@ platid_hton(platid_t *pid) pid->dw.dw1 = htonl(pid->dw.dw1); } +#ifdef PLATID_TEST void -platid_dump(char *name, void* pxx) +platid_dump(const char *name, void* pxx) { int i; unsigned char* p = (unsigned char*)pxx; @@ -78,6 +79,7 @@ platid_dump(char *name, void* pxx) } printf("\n"); } +#endif int platid_match(platid_t *pid, platid_mask_t *mask) diff --git a/sys/arch/hpc/include/platid.h b/sys/arch/hpc/include/platid.h index 0c0c4d722e93..dc7eb3dae25a 100644 --- a/sys/arch/hpc/include/platid.h +++ b/sys/arch/hpc/include/platid.h @@ -1,4 +1,4 @@ -/* $NetBSD: platid.h,v 1.3 2005/12/11 12:17:25 christos Exp $ */ +/* $NetBSD: platid.h,v 1.4 2006/01/17 02:50:59 uwe Exp $ */ /*- * Copyright (c) 1999-2001 @@ -139,12 +139,15 @@ extern int platid_name_table_size; void platid_ntoh(platid_t *); void platid_hton(platid_t *); -void platid_dump(char *, void *); int platid_match(platid_t *, platid_mask_t *); int platid_match_sub(platid_t *, platid_mask_t *, int); const tchar *platid_name(platid_t *); struct platid_data *platid_search_data(platid_t *, struct platid_data *); void *platid_search(platid_t *, void *, int, int); + +#ifdef PLATID_TEST +void platid_dump(const char *, void *); +#endif __END_DECLS #if defined(_KERNEL_OPT)