home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pmos2002.zip / DEF / IOERRORC.DEF < prev    next >
Text File  |  1994-05-11  |  3KB  |  92 lines

  1. DEFINITION MODULE IOErrorCodes;
  2.  
  3.     (********************************************************)
  4.     (*                            *)
  5.     (*        I/O subsystem error codes.        *)
  6.     (*                            *)
  7.     (*  This module defines a set of error codes which may    *)
  8.     (*  be used uniformly throughout the file system.    *)
  9.     (*                            *)
  10.     (*  Programmer:        P. Moylan            *)
  11.     (*  Last edited:    11 May 1994            *)
  12.     (*  Status:        OK                *)
  13.     (*                            *)
  14.     (********************************************************)
  15.  
  16.  
  17. TYPE
  18.     ErrorCode = (
  19.  
  20.     OK,            (* Normal return, no error    *)
  21.     OperationAborted,    (* Operator forced abort    *)
  22.  
  23.     (* Error codes from module Files.    *)
  24.  
  25.     FileNotOpen,        (* Should have opened file first  *)
  26.  
  27.     (* Error codes from module Devices.    *)
  28.  
  29.     NoSuchDevice,        (* Illegal device *)
  30.     NoSuchUnit,        (* Illegal unit number *)
  31.  
  32.     (* Error codes from module Directories.    *)
  33.  
  34.     FeatureNotImplemented,    (* Cannot yet handle this case *)
  35.     InvalidFileNameString,    (* Could not parse filename string *)
  36.     DirectoryNotFound,    (* Subdirectory name not found *)
  37.     NotADirectory,        (* Supposed directory name is not a dir    *)
  38.     NameNotFound,        (* File name not found in directory *)
  39.     DuplicateFileName,    (* File name already exists *)
  40.     DeviceFull,        (* No room to create/extend file *)
  41.     DirectoryFull,        (* No room to create new directory entry *)
  42.  
  43.     (* Error codes from the disk device drivers.    *)
  44.  
  45.     BadDMAAddress,        (* Operation uses a memory buffer which    *)
  46.                 (* the DMA hardware cannot handle    *)
  47.     IllegalBlockNumber,    (* The caller requested an operation on    *)
  48.                 (*  a non-existent disk block.        *)
  49.     BadCommand,        (* We tried to do something illegal.    *)
  50.     ControllerNotListening,    (* Could not get the disk controller    *)
  51.                 (*  to accept a command.        *)
  52.     ControllerOutOfSync,    (* Status information from the disk    *)
  53.                 (*  controller does not make sense.    *)
  54.     TimeoutError,        (* Data request interrupt did not    *)
  55.                 (*  arrive within a reasonable time.    *)
  56.     CalibrationFailure,    (* Did not succeed in driving the head    *)
  57.                 (*  back to its home position.        *)
  58.     SeekFailure,        (* Failed to seek to the desired track.    *)
  59.     DriveNotReady,        (* Could be an equipment failure, but    *)
  60.                 (*  more commonly means that the drive    *)
  61.                 (*  door is open or there is no disk in    *)
  62.                 (*  the drive.                *)
  63.     SectorNotFound,        (* Missing sector, cylinder mismatch,    *)
  64.                 (*  and similar errors.  This could    *)
  65.                 (*  mean a badly formatted disk, it    *)
  66.                 (*  could be just one faulty block, or    *)
  67.                 (*  it could mean that a recalibration    *)
  68.                 (*  is needed.                *)
  69.     BadBlock,        (* The sector has its "bad block"    *)
  70.                 (*  mark set - should not be used.    *)
  71.     BadData,        (* Something on the disk is corrupted.    *)
  72.                 (*  Could be a transient error, e.g.    *)
  73.                 (*  read error caused by a speck of    *)
  74.                 (*  dust, but it could also be true    *)
  75.                 (*  corruption of the medium.        *)
  76.     WriteFault,        (* Occurs only with hard disk, reflects    *)
  77.                 (*  a hardware fault signal.        *)
  78.     WriteProtected,        (* Attempted write to a write-protected    *)
  79.                 (*  disk.                *)
  80.     UndiagnosedFailure    (* Miscellaneous error.            *)
  81.  
  82.     );        (* End of the list of error codes *)
  83.  
  84. (************************************************************************)
  85.  
  86. PROCEDURE TranslateErrorCode (code: ErrorCode;
  87.                 VAR (*OUT*) string: ARRAY OF CHAR);
  88.  
  89.     (* Converts code to its textual representation. *)
  90.  
  91. END IOErrorCodes.
  92.