kernels/linux-2.4.0/net/wanrouter/wanproc.c
/*
 *	Add directory entry for WAN device.
 */
Add directory entry for WAN device.
Add directory entry for WAN device .
int wanrouter_proc_add (wan_device_t* wandev)
{
	if (wandev->magic != ROUTER_MAGIC)
		return -EINVAL;
	wandev->dent = create_proc_entry(wandev->name, 0, proc_router);
	if (!wandev->dent)
		return -ENOMEM;
	wandev->dent->proc_fops	= &wandev_fops;
	wandev->dent->proc_iops	= &router_inode;
	wandev->dent->get_info	= wandev_get_info;
	wandev->dent->data	= wandev;
	return 0;
}
int wanrouter_proc_add ( wan_device_t * wandev ) { if ( wandev -> magic != ROUTER_MAGIC ) return - EINVAL ; wandev -> dent = create_proc_entry ( wandev -> name , 0 , proc_router ) ; if ( ! wandev -> dent ) return - ENOMEM ; wandev -> dent -> proc_fops = & wandev_fops ; wandev -> dent -> proc_iops = & router_inode ; wandev -> dent -> get_info = wandev_get_info ; wandev -> dent -> data = wandev ; return 0 ; }
Add directory entry for WAN device.
Add directory entry for WAN device .