sys/cam/cam_xpt.c
/*
 * If the given device only has one peripheral attached to it, and if that
 * peripheral is the passthrough driver, announce it.  This insures that the
 * user sees some sort of announcement for every peripheral in their system.
 */
If the given device only has one peripheral attached to it, and if that
peripheral is the passthrough driver, announce it.  This insures that the
user sees some sort of announcement for every peripheral in their system.
If the given device only has one peripheral attached to it and if that peripheral is the passthrough driver announce it . This insures that the user sees some sort of announcement for every peripheral in their system .
static int
xptpassannouncefunc(struct cam_ed *device, void *arg)
{
	struct cam_periph *periph;
	int i;
	for (periph = SLIST_FIRST(&device->periphs), i = 0; periph != NULL;
	     periph = SLIST_NEXT(periph, periph_links), i++);
	periph = SLIST_FIRST(&device->periphs);
	if ((i == 1)
	 && (strncmp(periph->periph_name, "pass", 4) == 0))
		xpt_announce_periph(periph, NULL);
	return(1);
}
static int xptpassannouncefunc ( struct cam_ed * device , void * arg ) { struct cam_periph * periph ; int i ; for ( periph = SLIST_FIRST ( & device -> periphs ) , i = 0 ; periph != NULL ; periph = SLIST_NEXT ( periph , periph_links ) , i ++ ) ; periph = SLIST_FIRST ( & device -> periphs ) ; if ( ( i == 1 ) && ( strncmp ( periph -> periph_name , " " , 4 ) == 0 ) ) xpt_announce_periph ( periph , NULL ) ; return ( 1 ) ; }
If the given device only has one peripheral attached to it, and if that
 peripheral is the passthrough driver, announce it.
If the given device only has one peripheral attached to it and if that peripheral is the passthrough driver announce it .