FreeBSD/sys/dev/xen/xenstore/xenstore_dev.c
/**
 * \brief Attach the Xenstore device.
 *
 * \param dev  NewBus device_t for this instance.
 *
 * \return  On success, 0. Otherwise an errno value indicating the
 *          type of failure.
 */
\brief Attach the Xenstore device.
\param dev  NewBus device_t for this instance.

\return  On success, 0. Otherwise an errno value indicating the
type of failure.
\ brief Attach the Xenstore device . \ param dev NewBus device_t for this instance . \ return On success 0 . Otherwise an errno value indicating the type of failure .
static int
xs_dev_attach(device_t dev)
{
	struct cdev *xs_cdev;
	xs_cdev = make_dev_credf(MAKEDEV_ETERNAL, &xs_dev_cdevsw, 0, NULL,
	    UID_ROOT, GID_WHEEL, 0400, "xen/xenstore");
	if (xs_cdev == NULL)
		return (EINVAL);
	return (0);
}
static int xs_dev_attach ( device_t dev ) { struct cdev * xs_cdev ; xs_cdev = make_dev_credf ( MAKEDEV_ETERNAL , & xs_dev_cdevsw , 0 , NULL , UID_ROOT , GID_WHEEL , 0400 , " " ) ; if ( xs_cdev == NULL ) return ( EINVAL ) ; return ( 0 ) ; }
\brief Attach the Xenstore device.
\ brief Attach the Xenstore device .