Fix compile error when MIIVERBOSE is set. Reported by Kurt Schreiner.

This commit is contained in:
msaitoh 2019-03-25 09:46:24 +00:00
parent e5e1d84b3a
commit 8a41f2d3ca
2 changed files with 8 additions and 9 deletions

View File

@ -1,5 +1,5 @@
#! /usr/bin/awk -f
# $NetBSD: devlist2h.awk,v 1.8 2017/06/03 14:46:29 christos Exp $
# $NetBSD: devlist2h.awk,v 1.9 2019/03/25 09:46:24 msaitoh Exp $
#
# Copyright (c) 1998 The NetBSD Foundation, Inc.
# All rights reserved.
@ -142,6 +142,11 @@ NF > 0 && $1 == "model" {
models[nmodels, 4]) > hfile
if (!firstdone) {
printf("struct mii_knowndev {\n") > dfile
printf(" int oui;\n") > dfile
printf(" int model;\n") > dfile
printf(" const char *descr;\n") > dfile
printf("};\n") > dfile
printf("struct mii_knowndev mii_knowndevs[] = {\n") > dfile
firstdone = 1
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: mii_verbose.c,v 1.5 2019/03/25 07:34:13 msaitoh Exp $ */
/* $NetBSD: mii_verbose.c,v 1.6 2019/03/25 09:46:24 msaitoh Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@ -55,19 +55,13 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mii_verbose.c,v 1.5 2019/03/25 07:34:13 msaitoh Exp $");
__KERNEL_RCSID(0, "$NetBSD: mii_verbose.c,v 1.6 2019/03/25 09:46:24 msaitoh Exp $");
#include <sys/module.h>
#include <dev/mii/miidevs.h>
#include <dev/mii/miidevs_data.h>
#include <dev/mii/mii_verbose.h>
struct mii_knowndev {
int oui;
int model;
const char *descr;
};
const char * mii_get_descr_real(int, int);
MODULE(MODULE_CLASS_MISC, miiverbose, NULL);