Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* Using SCSI_GET_INQUIRY_DATA with SCSI/CAM
@ 1994-01-12  1:29 Anthony Baxter
  0 siblings, 0 replies; only message in thread
From: Anthony Baxter @ 1994-01-12  1:29 UTC (permalink / 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 


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1994-01-12  1:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-01-12  1:29 Using SCSI_GET_INQUIRY_DATA with SCSI/CAM Anthony Baxter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox