only print warnings if vflg.

This commit is contained in:
christos 2009-02-26 17:30:51 +00:00
parent 89890e45af
commit 90baf4f26f
1 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: misc.c,v 1.2 2008/07/23 11:59:43 christos Exp $ */
/* $NetBSD: misc.c,v 1.3 2009/02/26 17:30:51 christos Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: misc.c,v 1.2 2008/07/23 11:59:43 christos Exp $");
__RCSID("$NetBSD: misc.c,v 1.3 2009/02/26 17:30:51 christos Exp $");
#include <stdbool.h>
#include <sys/param.h>
@ -77,6 +77,8 @@ static struct nlist nl[] = {
{ .n_name = NULL }
};
extern int vflg;
static int
p_bpf(struct file *f)
@ -143,7 +145,7 @@ pmisc(struct file *f, const char *name)
if ((n = KVM_NLIST(nl)) == -1)
errx(1, "Cannot list kernel symbols (%s)",
KVM_GETERR());
else if (n != 0)
else if (n != 0 && vflg)
warnx("Could not find %d symbols", n);
}
for (i = 0; i < NL_MAX; i++)