freebsd/ataidle.c
// see if a device is present by seeing what its device
// type is, when the channel is queried.  If a device is
// present it will have a non-zero type.
see if a device is present by seeing what its device
type is, when the channel is queried.  If a device is
present it will have a non-zero type.
see if a device is present by seeing what its device type is when the channel is queried . If a device is present it will have a non - zero type .
bool
ata_devpresent(struct ATA *ata, uint32_t ata_chan, uint32_t ata_dev) 
{
	bool devpresent = false;
	struct ATA myata;
	memcpy(&myata, ata, sizeof(struct ATA));
	myata.atacmd.channel = ata_chan;
	myata.atacmd.device = -1;
	myata.atacmd.cmd = ATAGPARM;
	ioctl( myata.fd, IOCATA, &myata.atacmd );	
	if(myata.atacmd.u.param.type[ata_dev])
		devpresent = true;
	return devpresent;
}
bool ata_devpresent ( struct ATA * ata , uint32_t ata_chan , uint32_t ata_dev ) { bool devpresent = false ; struct ATA myata ; memcpy ( & myata , ata , sizeof ( struct ATA ) ) ; myata . atacmd . channel = ata_chan ; myata . atacmd . device = -1 ; myata . atacmd . cmd = ATAGPARM ; ioctl ( myata . fd , IOCATA , & myata . atacmd ) ; if ( myata . atacmd . u . param . type [ ata_dev ] ) devpresent = true ; return devpresent ; }
see if a device is present by seeing what its device
type is, when the channel is queried.
see if a device is present by seeing what its device type is when the channel is queried .