freebsd/ataidle.c
// return the maximum valid channel id
return the maximum valid channel id
return the maximum valid channel id
int32_t 
ata_getmaxchan(struct ATA *ata, uint32_t *maxchan)
{
	int32_t rc = 0;
	if(!rc) {
		if( ata_cmd(ata, 0, 0, 0, ATAGMAXCHANNEL ) == -1 ) {
			perror("error getting maximum channel");
			rc = -1;
		} else {
			*maxchan = ata->atacmd.u.maxchan;
		}
	}
	return rc;											
}
int32_t ata_getmaxchan ( struct ATA * ata , uint32_t * maxchan ) { int32_t rc = 0 ; if ( ! rc ) { if ( ata_cmd ( ata , 0 , 0 , 0 , ATAGMAXCHANNEL ) == -1 ) { perror ( " " ) ; rc = -1 ; } else { * maxchan = ata -> atacmd . u . maxchan ; } } return rc ; }
return the maximum valid channel id
return the maximum valid channel id