kernels/linux-2.4.0/net/wanrouter/wanproc.c
/*
 *	Prepare data for reading 'Config' entry.
 *	Return length of data.
 */
Prepare data for reading 'Config' entry.
Return length of data.
Prepare data for reading ' Config ' entry . Return length of data .
static int config_get_info(char* buf, char** start, off_t offs, int len)
{
	int cnt = sizeof(conf_hdr) - 1;
	wan_device_t* wandev;
	strcpy(buf, conf_hdr);
	for (wandev = router_devlist;
	     wandev && (cnt < (PROC_BUFSZ - 120));
	     wandev = wandev->next) {
		if (wandev->state) cnt += sprintf(&buf[cnt],
			"%-15s|0x%-4X|%3u|%3u| 0x%-8lX |0x%-6X|%7u|%7u|%7u|%7u\n",
			wandev->name,
			wandev->ioport,
			wandev->irq,
			wandev->dma,
			wandev->maddr,
			wandev->msize,
			wandev->hw_opt[0],
			wandev->hw_opt[1],
			wandev->hw_opt[2],
			wandev->hw_opt[3]);
	}
	return cnt;
}
static int config_get_info ( char * buf , char * * start , off_t offs , int len ) { int cnt = sizeof ( conf_hdr ) - 1 ; wan_device_t * wandev ; strcpy ( buf , conf_hdr ) ; for ( wandev = router_devlist ; wandev && ( cnt < ( PROC_BUFSZ - 120 ) ) ; wandev = wandev -> next ) { if ( wandev -> state ) cnt += sprintf ( & buf [ cnt ] , " \n " , wandev -> name , wandev -> ioport , wandev -> irq , wandev -> dma , wandev -> maddr , wandev -> msize , wandev -> hw_opt [ 0 ] , wandev -> hw_opt [ 1 ] , wandev -> hw_opt [ 2 ] , wandev -> hw_opt [ 3 ] ) ; } return cnt ; }
Prepare data for reading 'Config' entry.
Prepare data for reading ' Config ' entry .