Jump to content

RMParseSCSIInquiry: Difference between revisions

From EDM2
Created page with "This rmcall service builds an SCSI device description and is provided as a convenience for device drivers dealing with SCSI devices. It converts SCSI inquiry data for a device..."
 
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
This rmcall service builds an SCSI device description and is provided as a convenience for device drivers dealing with SCSI devices. It converts SCSI inquiry data for a device into a device key and a description that can be used in [[RMCreateDevice]].  
This rmcall service builds an SCSI device description and is provided as a convenience for device drivers dealing with SCSI devices. It converts SCSI inquiry data for a device into a device key and a description that can be used in [[RMCreateDevice]].


==Syntax==
==Syntax==
  RMParseSCSIInquiry(InquiryData, DescBuffer, DescBufferSize);
  RMParseSCSIInquiry(InquiryData, DescBuffer, DescBufferSize)
 
==Parameters==
==Parameters==
; InquiryData (PVOID) - output : Pointer to a buffer containing SCSI inquiry data for the device.  
;InquiryData (PVOID) - output: Pointer to a buffer containing SCSI inquiry data for the device.
 
;DescBuffer (PSZ) - input: Pointer to a buffer that will receive the device key and device description built by this service. This data may be used as the device description field (DevDescriptName) of the DEVICESTRUCT used to create the device.
; DescBuffer (PSZ) - input : Pointer to a buffer that will receive the device key and device description built by this service. This data may be used as the device description field (DevDescriptName) of the DEVICESTRUCT used to create the device.
:Refer to [[RMCreateDevice]] for further information.
: Refer to [[RMCreateDevice]] for further information.  
;DescBufferSize (USHORT) - input : Size of the DescBuffer, in bytes.
 
; DescBufferSize (USHORT) - input : Size of the DescBuffer, in bytes.


==Return Code==
==Return Code==
; rc (APIRET) - returns : On systems where the Resource Manager driver is not installed, the library interface code will return RMRC_NOT_INSTALLED.
;rc (APIRET) - returns: On systems where the Resource Manager driver is not installed, the library interface code will return RMRC_NOT_INSTALLED.
 
::RMRC_NULL_POINTER : A Resource Manager service received a NULL value for a pointer that was expected to contain a valid 16:16 address.  
:;RMRC_NULL_POINTER : A Resource Manager service received a NULL value for a pointer that was expected to contain a valid 16:16 address.  
::RMRC_BUFFER_TOO_SMALL : The buffer provided to receive information from a Resource Manager service was too small.
:;RMRC_BUFFER_TOO_SMALL : The buffer provided to receive information from a Resource Manager service was too small.


==Remarks==
==Remarks==
RMParseInquiry automatically generates appropriate keys for SCSI devices. An adjunct structure containing the Target/Lun device (ADJ_SCSI_TARGET_LUN) should be passed on the RMCreateDevice service call. See Device Adapter Keys for more information.  
RMParseInquiry automatically generates appropriate keys for SCSI devices. An adjunct structure containing the Target/Lun device (ADJ_SCSI_TARGET_LUN) should be passed on the RMCreateDevice service call. See Device Adapter Keys for more information.


==Example Code==
==Example Code==
===C===
;C
<PRE>
<PRE>
#include <os2.h>
#include <os2.h>
Line 31: Line 29:
APIRET    rc;
APIRET    rc;


rc = RMParseSCSIInquiry(InquiryData, DescBuffer,
rc = RMParseSCSIInquiry(InquiryData, DescBuffer, DescBufferSize);
      DescBufferSize);
</PRE>
</PRE>


[[Category:DevHlps]]
[[Category:DevHlps]]

Latest revision as of 17:13, 5 April 2025

This rmcall service builds an SCSI device description and is provided as a convenience for device drivers dealing with SCSI devices. It converts SCSI inquiry data for a device into a device key and a description that can be used in RMCreateDevice.

Syntax

RMParseSCSIInquiry(InquiryData, DescBuffer, DescBufferSize)

Parameters

InquiryData (PVOID) - output
Pointer to a buffer containing SCSI inquiry data for the device.
DescBuffer (PSZ) - input
Pointer to a buffer that will receive the device key and device description built by this service. This data may be used as the device description field (DevDescriptName) of the DEVICESTRUCT used to create the device.
Refer to RMCreateDevice for further information.
DescBufferSize (USHORT) - input
Size of the DescBuffer, in bytes.

Return Code

rc (APIRET) - returns
On systems where the Resource Manager driver is not installed, the library interface code will return RMRC_NOT_INSTALLED.
RMRC_NULL_POINTER : A Resource Manager service received a NULL value for a pointer that was expected to contain a valid 16:16 address.
RMRC_BUFFER_TOO_SMALL : The buffer provided to receive information from a Resource Manager service was too small.

Remarks

RMParseInquiry automatically generates appropriate keys for SCSI devices. An adjunct structure containing the Target/Lun device (ADJ_SCSI_TARGET_LUN) should be passed on the RMCreateDevice service call. See Device Adapter Keys for more information.

Example Code

C
#include <os2.h>
#include <rmcalls.h>

PVOID     InquiryData;
PSZ       DescBuffer;
USHORT    DescBufferSize;
APIRET    rc;

rc = RMParseSCSIInquiry(InquiryData, DescBuffer, DescBufferSize);