getinfo.c 544 Bytes

#include "ddwriteint.h"

s32 ddGetInfo(DDInfo *info)
{
  __SystemInfo_s	sys;
  __DefectInfo_s	def;
  u32			formatType;
  u32			result;
  
  /*
   * 呼ばれるのがはじめてなら、初期化する
   */
  if (! __ddWriteActive)
  {
    __ddInit();
  
    if (__ddWriteError)
      return __ddWriteError;
  }
  
  result = __ddReadSystemBlock(&sys, &def, &formatType);

  if(result != 0)
    return (s32)result;
  

  info->iplSize 	= sys.iplSize;
  info->diskType	= (s32)sys.diskType;
  info->loadAddr 	= sys.loadAddr;

  return 0;
  
} /* ddGetInfo() */