freebsd/ataidle.c
// open the ata control device, /dev/ata rw
open the ata control device, /dev/ata rw
open the ata control device / dev / ata rw
int ata_open(struct ATA *ata) {
	int rc = 0;
	ata->fd = open("/dev/ata", O_RDWR);
	if( ata->fd == -1) {
		perror( "error opening ata control device" );
		rc = -1;
	}
	return rc;
}
int ata_open ( struct ATA * ata ) { int rc = 0 ; ata -> fd = open ( " " , O_RDWR ) ; if ( ata -> fd == -1 ) { perror ( " " ) ; rc = -1 ; } return rc ; }
open the ata control device, /dev/ata rw
open the ata control device / dev / ata rw