•  Back 
  •  XHDI functions 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  Help page 
  •  Show info about hypertext 
  •  View a new file 
Topic       : TOS - The Operating System
Author      : 
Version     : tos.hyp (December 19, 2008)
Subject     : Programmieren/Atari
Nodes       : 3010
Index Size  : 93790
HCP-Version : 5
Compiled on : Atari
@charset    : atarist
@lang       : 
@default    : Title
@help       : 
@options    : +g -i -s +x +zz -t4
@width      : 70
View Ref-File14.8.5.11  XHInqTarget2                                            TOS

 Name:         »XHInqTarget2« - Obtain information about a device.

 Opcode:       11

 Syntax:       LONG XHInqTarget2 ( UWORD major, UWORD minor, ULONG 
               *block_size, ULONG *device_flags, BYTE *product_name, 
               UWORD stringlen );

 Description:  XHInqTarget2 returns information about the device 
               specified by major and minor (in device_flags: an 
               attribute vector, in product_name: optionally the 
               product descriptin of the device). Reservations made 
               with XHReserve are respected.

               This function is available only with XHDI version 1.01 
               and above.

 Return value:

                Parameter     Meaning

                block_size    Block size for this device (important 
                              for XHReadWrite); usually 512.
                device_flags  (Bit set -> Capability available):
                               Bit 0:  Device is stoppable 
                                       (XH_TARGET_STOPPABLE)
                               Bit 1:  The medium is removable 
                                       (XH_TARGET_REMOVABLE)
                               Bit 2:  The eject mechanism can be 
                                       locked (XH_TARGET_LOCKABLE)
                               Bit 3:  The device can physically eject 
                                       the medium 
                                       (XH_TARGET_EJECTABLE)
                               Bit 29: Eject mechanism has been locked 
                                       by the driver 
                                       (XH_TARGET_LOCKED, from XHDI 
                                       1.25 up)
                               Bit 30: Device has been stopped by the 
                                       driver (XH_TARGET_STOPPED, from 
                                       XHDI 1.25 up)
                               Bit 31: The device is currently 
                                       reserved (XH_TARGET_RESERVED)
                              All other bits are reserved, drivers 
                              should set them to zero.
                product_name  Product name of the device, similar to 
                              the information returned by the SCSI 
                              command INQUIRE (maximum stringlen 
                              characters incl. terminating zero); if 
                              this information is not available, the 
                              driver should return a zero-length 
                              string
                stringlen     Length of string buffer passed in 
                              product_name

                Note:  The caller may pass a zero pointer for 
                       blocksize, device_flags and product_name.

 Group:        XHDI functions

 See Also:     Arbitration   _drvbits   Partition types 
               System variables   XHDI cookie   XHDI terminology