/* Return the entire driver board structure to a user app.  */
static int stli_getbrdstruct(struct stlibrd __user *arg)
/* Return the entire driver board structure to a user app.  */
static int stli_getbrdstruct(struct stlibrd __user *arg)
{
	struct stlibrd stli_dummybrd;
	struct stlibrd *brdp;
	if (copy_from_user(&stli_dummybrd, arg, sizeof(struct stlibrd)))
		return -EFAULT;
	if (stli_dummybrd.brdnr >= STL_MAXBRDS)
		return -ENODEV;
	brdp = stli_brds[stli_dummybrd.brdnr];
	if (!brdp)
		return -ENODEV;
	if (copy_to_user(arg, brdp, sizeof(struct stlibrd)))
		return -EFAULT;
	return 0;
}