STIOCDM

This IOCTL command displays and manipulates one or two messages on the message display. The message that is sent with this call does not always remain on the display. It depends on the current state of the tape device.

The input data structure is
#define MAXMSGLEN     8
struct stdm_s
   {
  char dm_func;                    /* function code */
                                   /* function selection */
   #define DMSTATUSMSG 0x00        /* general status message */
   #define DMDVMSG     0x20        /* demount/verify message */
   #define DMMIMMED    0x40        /* mount with immediate action indicator*/
   #define DMDEMIMMED  0xE0        /* demount/mount with immediate action */
                                   /* message control */
   #define DMMSG0      0x00        /* display message 0 */
   #define DMMSG1      0x04        /* display message 1 */
   #define DMFLASHMSG0 0x08        /* flash message 0 */
   #define DMFLASHMSG1 0x0C        /* flash message 1 */
   #define DMALTERNATE 0x10        /* alternate message 0 and message 1 */
  char dm_msg0[MAXMSGLEN];         /* message 0 */
  char dm_msg1[MAXMSGLEN];         /* message 1 */
  };
An example of the STIOCDM command is
#include <sys/Atape.h>
struct stdm_s stdm;
stdm.dm_func=DMSTATUSMSG|DMMSG0;
bcopy("SSD",stdm.dm_msg0,8);
if (ioctl(tapefd,STIOCDM,&stdm)<0)
    {
    printf("IOCTL failure. errno=%d",errno);
    exit(errno);
    }