Module Name: src
Committed By: pooka
Date: Thu Jan 7 22:46:11 UTC 2010
Modified Files:
src/lib/libpuffs: opdump.c
Log Message:
Be slightly more forgiving about unknown operation types.
To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/lib/libpuffs/opdump.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libpuffs/opdump.c
diff -u src/lib/libpuffs/opdump.c:1.29 src/lib/libpuffs/opdump.c:1.30
--- src/lib/libpuffs/opdump.c:1.29 Thu Jan 7 20:47:47 2010
+++ src/lib/libpuffs/opdump.c Thu Jan 7 22:46:11 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: opdump.c,v 1.29 2010/01/07 20:47:47 pooka Exp $ */
+/* $NetBSD: opdump.c,v 1.30 2010/01/07 22:46:11 pooka Exp $ */
/*
* Copyright (c) 2005, 2006 Antti Kantee. All Rights Reserved.
@@ -35,7 +35,7 @@
#include <sys/cdefs.h>
#if !defined(lint)
-__RCSID("$NetBSD: opdump.c,v 1.29 2010/01/07 20:47:47 pooka Exp $");
+__RCSID("$NetBSD: opdump.c,v 1.30 2010/01/07 22:46:11 pooka Exp $");
#endif /* !lint */
#include <sys/types.h>
@@ -147,7 +147,7 @@
const char **map;
int isvn = 0;
- map = NULL; /* yes, we are all interested in your opinion, gcc */
+ printf("reqid: %" PRIu64 ", ", preq->preq_id);
switch (PUFFSOP_OPCLASS(preq->preq_opclass)) {
case PUFFSOP_VFS:
map = vfsop_revmap;
@@ -165,11 +165,14 @@
case PUFFSOP_FLUSH:
map = flush_revmap;
break;
+ default:
+ printf("unhandled opclass\n");
+ return;
}
- printf("reqid: %" PRIu64 ", opclass %d%s, optype: %s, "
+ printf("opclass %d%s, optype: %s, "
"cookie: %p,\n" DINT "aux: %p, auxlen: %zu, pid: %d, lwpid: %d\n",
- preq->preq_id, PUFFSOP_OPCLASS(preq->preq_opclass),
+ PUFFSOP_OPCLASS(preq->preq_opclass),
PUFFSOP_WANTREPLY(preq->preq_opclass) ? "" : " (FAF)",
map[preq->preq_optype], preq->preq_cookie,
preq->preq_buf, preq->preq_buflen,