Hide plutid_dump() under #ifdef PLATID_TEST. Saves space in the

kernel and avoids printf dependency for hpcboot.
While here, constify its first argument.
This commit is contained in:
uwe 2006-01-17 02:50:59 +00:00
parent 4f6e1f3b52
commit 0d1e222eff
2 changed files with 10 additions and 5 deletions

View File

@ -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 <sys/cdefs.h>
#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 <sys/types.h>
@ -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)

View File

@ -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)