Date: Tue, 18 Jun 2013 14:20:11 GMT From: Jonathan Anderson <jonathan@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 229889 for review Message-ID: <201306181420.r5IEKBLx018498@skunkworks.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@229889?ac=10 Change 229889 by jonathan@jonathan-on-joe on 2013/06/18 14:19:21 Now that we have an alternate error handling path, we mightn't need these asserts (that do not appear in the upstream TESLA repository). Affected files ... .. //depot/projects/ctsrd/tesla/src/sys/contrib/tesla/libtesla/tesla_class.c#4 edit .. //depot/projects/ctsrd/tesla/src/sys/contrib/tesla/libtesla/tesla_key.c#4 edit .. //depot/projects/ctsrd/tesla/src/sys/contrib/tesla/libtesla/tesla_notification.c#10 edit .. //depot/projects/ctsrd/tesla/src/sys/contrib/tesla/libtesla/tesla_store.c#4 edit Differences ... ==== //depot/projects/ctsrd/tesla/src/sys/contrib/tesla/libtesla/tesla_class.c#4 (text+ko) ==== @@ -138,12 +138,7 @@ // A new instance must not look inactive. if ((state == 0) && (name->tk_mask == 0)) -#ifdef _KERNEL - tesla_panic("inactive-looking new instance: state %d, mask 0x%x", - state, name->tk_mask); -#else return (TESLA_ERROR_EINVAL); -#endif if (tclass->tc_free == 0) return (TESLA_ERROR_ENOMEM); ==== //depot/projects/ctsrd/tesla/src/sys/contrib/tesla/libtesla/tesla_key.c#4 (text+ko) ==== @@ -72,10 +72,6 @@ if (IS_SET(source->tk_mask, i)) { if (IS_SET(dest->tk_mask, i)) { if (dest->tk_keys[i] != source->tk_keys[i]) -#ifdef _KERNEL - tesla_panic("dest key %d (0x%x) != source (0x%x)", - i, dest->tk_keys[i], source->tk_keys[i]); -#endif return (TESLA_ERROR_EINVAL); } else { dest->tk_keys[i] = source->tk_keys[i]; ==== //depot/projects/ctsrd/tesla/src/sys/contrib/tesla/libtesla/tesla_notification.c#10 (text+ko) ==== @@ -236,7 +236,7 @@ next = sprint_transitions(next, end, transp); assert(next > buffer); - DEBUG(libtesla.instance.fail, "%s", buffer); + error("%s", buffer); } static void @@ -262,7 +262,7 @@ next = sprint_transitions(next, end, transp); assert(next > buffer); - DEBUG(libtesla.instance.fail, "%s", buffer); + error("%s", buffer); } static void ==== //depot/projects/ctsrd/tesla/src/sys/contrib/tesla/libtesla/tesla_store.c#4 (text+ko) ==== @@ -96,11 +96,7 @@ } default: -#ifdef _KERNEL - tesla_panic("invliad TESLA_CONTEXT %d", context); -#else return (TESLA_ERROR_EINVAL); -#endif } if (store->length == 0) { @@ -163,11 +159,7 @@ assert(tclassp != NULL); if (id >= store->length) -#ifdef _KERNEL - tesla_panic("requested class id %d > store length (%d)", id, store->length); -#else return (TESLA_ERROR_EINVAL); -#endif tesla_class *tclass = &store->classes[id]; assert(tclass != NULL);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306181420.r5IEKBLx018498>