FreeBSD/sys/xen/xenbus/xenbus.c
/*------------------------- Private Functions --------------------------------*/
/**
 * \brief Construct the error path corresponding to the given XenBus
 *        device.
 *
 * \param dev  The XenBus device for which we are constructing an error path.
 *
 * \return  On success, the contructed error path.  Otherwise NULL.
 *
 * It is the caller's responsibility to free any returned error path
 * node using the M_XENBUS malloc type.
 */
Private Functions
\brief Construct the error path corresponding to the given XenBus
device.

\param dev  The XenBus device for which we are constructing an error path.

\return  On success, the contructed error path.  Otherwise NULL.

It is the caller's responsibility to free any returned error path
node using the M_XENBUS malloc type.
Private Functions \ brief Construct the error path corresponding to the given XenBus device . \ param dev The XenBus device for which we are constructing an error path . \ return On success the contructed error path . Otherwise NULL . It is the caller ' s responsibility to free any returned error path node using the M_XENBUS malloc type .
static char *
error_path(device_t dev)
{
	char *path_buffer = malloc(strlen("error/")
	    + strlen(xenbus_get_node(dev)) + 1,M_XENBUS, M_WAITOK);
	strcpy(path_buffer, "error/");
	strcpy(path_buffer + strlen("error/"), xenbus_get_node(dev));
	return (path_buffer);
}
static char * error_path ( device_t dev ) { char * path_buffer = malloc ( strlen ( " " ) + strlen ( xenbus_get_node ( dev ) ) + 1 , M_XENBUS , M_WAITOK ) ; strcpy ( path_buffer , " " ) ; strcpy ( path_buffer + strlen ( " " ) , xenbus_get_node ( dev ) ) ; return ( path_buffer ) ; }
Private Functions
 \brief Construct the error path corresponding to the given XenBus
        device.
Private Functions \ brief Construct the error path corresponding to the given XenBus device .