freebsd/ataidle.c
// initialize the ata_cmd structure with supplied values
initialize the ata_cmd structure with supplied values
initialize the ata_cmd structure with supplied values
int32_t
ata_setataparams(struct ATA *ata, int seccount, int count)
{
	memset(& ata->atacmd, 0, sizeof(struct ata_cmd));
	ata->atacmd.cmd = ATAREQUEST;
	ata->atacmd.u.request.flags = ATA_CMD_CONTROL;
	ata->atacmd.u.request.timeout = ATA_CMD_TIMEOUT;
	ata->atacmd.u.request.count = count;
	ata->atacmd.u.request.u.ata.count = seccount;
	return 0;
}
int32_t ata_setataparams ( struct ATA * ata , int seccount , int count ) { memset ( & ata -> atacmd , 0 , sizeof ( struct ata_cmd ) ) ; ata -> atacmd . cmd = ATAREQUEST ; ata -> atacmd . u . request . flags = ATA_CMD_CONTROL ; ata -> atacmd . u . request . timeout = ATA_CMD_TIMEOUT ; ata -> atacmd . u . request . count = count ; ata -> atacmd . u . request . u . ata . count = seccount ; return 0 ; }
initialize the ata_cmd structure with supplied values
initialize the ata_cmd structure with supplied values
// clear the structure to remove any random values