tech-kern archive

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

Re: patch: debug instrumentation for dev/raidframe/rf_netbsdkintf.c



On Mon, Jan 21, 2019 at 06:36:37PM +0100, Christoph Badura wrote:
> I think the following is better.  Compile-tested only for both #ifdef
> conditions, but I think that is OK.

Ugh. I forgot to put a comment on that function.  How about this:

/*
 * Provide a wrapper around rf_containsboot that handles NULL pointers
 * gradefully.  For use in DPRINTF().
 */

> Index: rf_netbsdkintf.c
> ===================================================================
> RCS file: /cvsroot/src/sys/dev/raidframe/rf_netbsdkintf.c,v
> retrieving revision 1.356
> diff -u -r1.356 rf_netbsdkintf.c
> --- rf_netbsdkintf.c	23 Jan 2018 22:42:29 -0000	1.356
> +++ rf_netbsdkintf.c	21 Jan 2019 15:01:24 -0000
> @@ -491,6 +491,15 @@
>  	return 0;
>  }
>  
> +#ifdef DEBUG_ROOT
> +static int
> +debug_rf_containsboot(RF_Raid_t *r, device_t bdv) {
> +	if (bdv == NULL)
> +		return 0;
> +	return rf_containsboot(r, bdv);
> +}
> +#endif
> +

--chris


Home | Main Index | Thread Index | Old Index