Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet Improve panic messages.



details:   https://anonhg.NetBSD.org/src/rev/1a74c3e9313c
branches:  trunk
changeset: 997178:1a74c3e9313c
user:      maxv <maxv%NetBSD.org@localhost>
date:      Mon Feb 25 10:49:16 2019 +0000

description:
Improve panic messages.

diffstat:

 sys/netinet/tcp_output.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r 08d588ea9c88 -r 1a74c3e9313c sys/netinet/tcp_output.c
--- a/sys/netinet/tcp_output.c  Mon Feb 25 10:25:40 2019 +0000
+++ b/sys/netinet/tcp_output.c  Mon Feb 25 10:49:16 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tcp_output.c,v 1.210 2018/12/27 16:59:17 maxv Exp $    */
+/*     $NetBSD: tcp_output.c,v 1.211 2019/02/25 10:49:16 maxv Exp $    */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -135,7 +135,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcp_output.c,v 1.210 2018/12/27 16:59:17 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_output.c,v 1.211 2019/02/25 10:49:16 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1340,9 +1340,9 @@
                break;
        }
        if (tp->t_template == NULL)
-               panic("tcp_output");
+               panic("%s: no template", __func__);
        if (tp->t_template->m_len < iphdrlen)
-               panic("tcp_output");
+               panic("%s: %d < %d", __func__, tp->t_template->m_len, iphdrlen);
        bcopy(mtod(tp->t_template, void *), mtod(m, void *), iphdrlen);
 
        /*



Home | Main Index | Thread Index | Old Index