readdiskid.c 709 Bytes

#include "hostio.h"

extern 	s32	__leoActive;

s32 myLeoReadDiskID(LEOCmd *cmdBlock, LEODiskID *vaddr, OSMesgQueue *mq)
{
  
  /* 
   * Check for existence of Leo Manager 
   */
  if (!__leoActive) {
    return(-1);
  }
  
  /*
   * Fill up command block
   */
  cmdBlock->header.command	= LEO_COMMAND_READ_DISK_ID;
  cmdBlock->header.reserve1	= 0;

  /* don't let the command read system area */
  cmdBlock->header.control	= LEO_CONTROL_ND;
  cmdBlock->header.reserve3	= 0;
  cmdBlock->data.readdiskid.buffer_pointer 	= vaddr;

  if (mq != NULL)
  {
    cmdBlock->header.control	|= LEO_CONTROL_POST;
    cmdBlock->header.post	= mq;
  }

  leoCommand((void *)cmdBlock);

  return 0;
  
} /* LeoReadDiskID */