magic constant to panic() calls.
ok benno@ henning@ tb@
-/* $OpenBSD: if_pppx.c,v 1.65 2018/06/15 12:39:38 yasuoka Exp $ */
+/* $OpenBSD: if_pppx.c,v 1.66 2018/07/11 21:18:23 nayden Exp $ */
/*
* Copyright (c) 2010 Claudio Jeker <claudio@openbsd.org>
}
if (RBT_INSERT(pppx_ifs, &pppx_ifs, pxi) != NULL)
- panic("pppx_ifs modified while lock was held");
+ panic("%s: pppx_ifs modified while lock was held", __func__);
LIST_INSERT_HEAD(&pxd->pxd_pxis, pxi, pxi_list);
rw_exit_write(&pppx_ifs_lk);
rw_enter_write(&pppx_ifs_lk);
if (RBT_REMOVE(pppx_ifs, &pppx_ifs, pxi) == NULL)
- panic("pppx_ifs modified while lock was held");
+ panic("%s: pppx_ifs modified while lock was held", __func__);
LIST_REMOVE(pxi, pxi_list);
rw_exit_write(&pppx_ifs_lk);
-/* $OpenBSD: pf_if.c,v 1.94 2018/07/11 09:05:51 henning Exp $ */
+/* $OpenBSD: pf_if.c,v 1.95 2018/07/11 21:18:23 nayden Exp $ */
/*
* Copyright 2005 Henning Brauer <henning@openbsd.org>
pfi_initialize();
pfi_update++;
if ((kif = pfi_kif_get(ifp->if_xname)) == NULL)
- panic("pfi_kif_get failed");
+ panic("%s: pfi_kif_get failed", __func__);
kif->pfik_ifp = ifp;
ifp->if_pf_kif = (caddr_t)kif;
pfi_initialize();
pfi_update++;
if ((kif = pfi_kif_get(ifg->ifg_group)) == NULL)
- panic("pfi_kif_get failed");
+ panic("%s: pfi_kif_get failed", __func__);
kif->pfik_group = ifg;
ifg->ifg_pf_kif = (caddr_t)kif;
pfi_update++;
if ((kif = pfi_kif_get(group)) == NULL)
- panic("pfi_kif_get failed");
+ panic("%s: pfi_kif_get failed", __func__);
pfi_kif_update(kif);
}
if ((gkif = pfi_kif_get(group)) == NULL ||
(ikif = pfi_kif_get(ifp->if_xname)) == NULL)
- panic("pfi_kif_get failed");
+ panic("%s: pfi_kif_get failed", __func__);
ikif->pfik_flags |= gkif->pfik_flags;
pfi_group_change(group);
-/* $OpenBSD: ieee80211.c,v 1.68 2018/04/28 14:49:07 stsp Exp $ */
+/* $OpenBSD: ieee80211.c,v 1.69 2018/07/11 21:18:23 nayden Exp $ */
/* $NetBSD: ieee80211.c,v 1.19 2004/06/06 05:45:29 dyoung Exp $ */
/*-
* channel list before committing to the new mode.
*/
if (mode >= nitems(chanflags))
- panic("unexpected mode %u", mode);
+ panic("%s: unexpected mode %u", __func__, mode);
modeflags = chanflags[mode];
for (i = 0; i <= IEEE80211_CHAN_MAX; i++) {
c = &ic->ic_channels[i];
case IEEE80211_MODE_11B:
case IEEE80211_MODE_11G:
/* these modes use rates, not MCS */
- panic("unexpected mode %d", mode);
+ panic("%s: unexpected mode %d", __func__, mode);
break;
case IEEE80211_MODE_AUTO:
case IEEE80211_MODE_11N:
break;
case IEEE80211_MODE_11N:
/* 11n uses MCS, not rates. */
- panic("unexpected mode %d", mode);
+ panic("%s: unexpected mode %d", __func__, mode);
break;
}
for (i = 0; i < nitems(rates); i++)
case 108: return 0x0c;
}
} else
- panic("unexpected mode %u", mode);
+ panic("%s: unexpected mode %u", __func__, mode);
DPRINTF(("unsupported rate %u\n", rate));
case 0x0c: return 108;
}
} else
- panic("unexpected mode %u", mode);
+ panic("%s: unexpected mode %u", __func__, mode);
DPRINTF(("unsupported plcp %u\n", plcp));
-/* $OpenBSD: ieee80211_mira.c,v 1.11 2017/04/23 21:04:55 stsp Exp $ */
+/* $OpenBSD: ieee80211_mira.c,v 1.12 2018/07/11 21:18:23 nayden Exp $ */
/*
* Copyright (c) 2016 Stefan Sperling <stsp@openbsd.org>
else /* MCS 0-7 */
return NULL;
} else
- panic("invalid probing mode %d", mn->probing);
+ panic("%s: invalid probing mode %d", __func__, mn->probing);
rsnext = &ieee80211_mira_ratesets[next];
if ((rsnext->mcs_mask & mn->valid_rates) == 0)
(1 << ieee80211_mira_next_lower_intra_rate(mn, ni));
#endif
} else
- panic("invalid probing mode %d", mn->probing);
+ panic("%s: invalid probing mode %d", __func__, mn->probing);
}
int
else if (mn->probing & IEEE80211_MIRA_PROBING_UP)
next = ieee80211_mira_next_intra_rate(mn, ni);
else
- panic("invalid probing mode %d", mn->probing);
+ panic("%s: invalid probing mode %d", __func__, mn->probing);
return next;
}
else if (mn->probing & IEEE80211_MIRA_PROBING_UP)
next = ieee80211_mira_next_lower_intra_rate(mn, ni);
else
- panic("invalid probing mode %d", mn->probing);
+ panic("%s: invalid probing mode %d", __func__, mn->probing);
return next;
}
-/* $OpenBSD: in.c,v 1.159 2018/06/03 18:35:48 tb Exp $ */
+/* $OpenBSD: in.c,v 1.160 2018/07/11 21:18:23 nayden Exp $ */
/* $NetBSD: in.c,v 1.26 1996/02/13 23:41:39 christos Exp $ */
/*
int newifaddr;
if (cmd != SIOCSIFADDR)
- panic("invalid ioctl %lu", cmd);
+ panic("%s: invalid ioctl %lu", __func__, cmd);
if (!privileged)
return (EPERM);
break;
default:
- panic("invalid ioctl %lu", cmd);
+ panic("%s: invalid ioctl %lu", __func__, cmd);
}
NET_UNLOCK();
break;
default:
- panic("invalid ioctl %lu", cmd);
+ panic("%s: invalid ioctl %lu", __func__, cmd);
}
err:
-/* $OpenBSD: nd6.c,v 1.224 2018/05/02 07:19:45 tb Exp $ */
+/* $OpenBSD: nd6.c,v 1.225 2018/07/11 21:18:23 nayden Exp $ */
/* $KAME: nd6.c,v 1.280 2002/06/08 19:52:07 itojun Exp $ */
/*
if (!ndopts)
panic("ndopts == NULL in nd6_option");
if (!ndopts->nd_opts_last)
- panic("uninitialized ndopts in nd6_option");
+ panic("%s: uninitialized ndopts", __func__);
if (!ndopts->nd_opts_search)
return NULL;
if (ndopts->nd_opts_done)
if (!ndopts)
panic("ndopts == NULL in nd6_options");
if (!ndopts->nd_opts_last)
- panic("uninitialized ndopts in nd6_options");
+ panic("%s: uninitialized ndopts", __func__);
if (!ndopts->nd_opts_search)
return 0;