Error Countermeasures for Applications Running Under the GD File System 
 
                                                                      1998/09/16
 
1. Door open status detection 
 
Countermeasure: 
Door open status detection is performed by monitoring GDD_DRVSTAT_OPEN of the gdFsDrvStat function. However, because the drive status is updated when any command for the drive has been processed, a status update command must be issued before detection. 
 
Example of door open status detection when not accessiong to files: 
  static Sint32 req_flag = 0;

  if (req_flag == 0) {
    if (gdFsReqDrvStat() == GDD_ERR_OK) req_flag = 1;
  } else {
    GDFS sys;

    sys = gdFsGetSysHn();
    if (gdFsGetStat(sys) != GDD_STAT_BUSY) req_flag = 0;

    if (gdFsGetDrvStat() == GDD_DRVSTAT_OPEN) {
      /* Operation if door is open */
    }
  }



2. GDD_ERR_UNITATTENT error 
 
Countermeasure: 

GDD_ERR_UNITATTENT is issued when the drive has detected a media change. 
In case of wrong detection such as when not changing the disks, execute the same operation as when the door is opened. However, when changing the disks, follow the procedure below.
In this condition, any kind of drive access is disabled. To release this condition, media recognition processing must be performed.
 
The syBtCheckDisc function is used for media recognition. After the media recognition has been properly completed, verify the SystemID of the disc. When the result is positive, use the gdFsReinit function to initialize the file system (or execute gdFsFinish and then gdFsinit). 
 

[EOF]