From: anthony@yarra-glen.aaii.oz.au (Anthony Baxter)
Subject: Using SCSI_GET_INQUIRY_DATA with SCSI/CAM
Date: Wed, 12 Jan 1994 01:29:26 GMT [thread overview]
Message-ID: <anthony.758338166@vail> (raw)
Hi folks,
(this is under OSF/1)
Does anyone have any tips on how to use the SCSI_GET_INQUIRY_DATA ioctl?
It is supposed to take a nice generic, struct mode_sel_sns_params, but
where does the struct inquiry_info plug into that?
struct scsi_special scsp;
struct extended_sense es;
struct inquiry_info ii;
struct mode_sel_sns_params mssp;
bzero((char *)&scsp,sizeof(struct scsi_special));
bzero((char *)&es,sizeof(struct extended_sense));
bzero((char *)&ii,sizeof(struct inquiry_info));
bzero((char *)&mssp,sizeof(struct mode_sel_sns_params));
scsp.sp_flags = SA_NO_ERROR_LOGGING;
scsp.sp_sub_command = SCMD_INQUIRY;
scsp.sp_sense_length = sizeof(struct extended_sense);
scsp.sp_sense_buffer = &es;
mssp.msp_length = sizeof(struct inquiry_info);
mssp.msp_addr = ⅈ
scsp.sp_iop_length = sizeof(struct mode_sel_sns_params);
scsp.sp_iop_buffer = &mssp;
if ((status=ioctl(cd_fd, SCSI_SPECIAL, &scsp)))
{
/* fail */
}
The above fails with ENXIO.
Any help appreciated - I'm trying to query a cdrom drive for the
vendor name and model information...
Anthony
--
anthony baxter australian artificial intelligence institute
email : anthony@aaii.oz.au 1 grattan st, carlton, australia 3053
/\/\|| phone : +613 663 7922
It's not denial. I'm just selective about the reality I accept. - Calvin
reply other threads:[~1994-01-12 1:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox