"Fossies" - the Fresh Open Source Software Archive

Member "dosemu-1.4.0/src/plugin/commands/doserror.h" (23 Jun 2003, 4187 Bytes) of package /linux/misc/old/dosemu-1.4.0.tgz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "doserror.h" see the Fossies "Dox" file reference documentation.

    1 #ifndef DOSERROR_H
    2 #define DOSERROR_H
    3 
    4 #define MAX_DOSERROR        0x5A
    5 
    6 #define DOS_EINVAL  0x01
    7 #define DOS_ENOENT  0x02
    8 #define DOS_EMFILE  0x04
    9 #define DOS_EACCES  0x05
   10 #define DOS_EPERM   EACCES
   11 #define DOS_EBADF   0x06
   12 #define DOS_ENOMEM  0x08
   13 #define DOS_EBUSY   0x15
   14 #define DOS_EGENERAL    0x1F
   15 
   16 
   17 
   18 static char *DOSerrcodes[MAX_DOSERROR+1] = {
   19   /* the below error list is shamelessly stolen from Ralph Brown's */
   20   /* 0x00 */  "no error",
   21 #if 0
   22   /* 0x01 */  "function number invalid",
   23 #else
   24   /* 0x01 */  "invalid argument",
   25 #endif
   26   /* 0x02 */  "file not found",
   27   /* 0x03 */  "path not found",
   28   /* 0x04 */  "too many open files",
   29   /* 0x05 */  "access denied",
   30   /* 0x06 */  "invalid handle",
   31   /* 0x07 */  "memory control block destroyed",
   32   /* 0x08 */  "insufficient memory",
   33   /* 0x09 */  "memory block address invalid",
   34   /* 0x0A */  "environment invalid",
   35   /* 0x0B */  "format invalid",
   36   /* 0x0C */  "access code invalid",
   37   /* 0x0D */  "data invalid",
   38   /* 0x0E */  0,
   39   /* 0x0F */  "invalid drive",
   40   /* 0x10 */  "attempted to remove current directory",
   41   /* 0x11 */  "not same device",
   42   /* 0x12 */  "no more files",
   43   /* 0x13 */  "disk write-protected",
   44   /* 0x14 */  "unknown unit",
   45   /* 0x15 */  "drive not ready",
   46   /* 0x16 */  "unknown command",
   47   /* 0x17 */  "data error (CRC)",
   48   /* 0x18 */  "bad request structure length",
   49   /* 0x19 */  "seek error",
   50   /* 0x1A */  "unknown media type",
   51   /* 0x1B */  "sector not found",
   52   /* 0x1C */  "printer out of paper",
   53   /* 0x1D */  "write fault",
   54   /* 0x1E */  "read fault",
   55   /* 0x1F */  "general failure",
   56   /* 0x20 */  "sharing violation",
   57   /* 0x21 */  "lock violation",
   58   /* 0x22 */  "disk change invalid",
   59   /* 0x23 */  "FCB unavailable",
   60   /* 0x24 */  "sharing buffer overflow",
   61   /* 0x25 */  "code page mismatch",
   62   /* 0x26 */  "cannot complete file operation (out of input)",
   63   /* 0x27 */  "insufficient disk space",
   64   0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
   65   /* 0x32 */  "network request not supported",
   66   /* 0x33 */  "remote computer not listening",
   67   /* 0x34 */  "duplicate name on network",
   68   /* 0x35 */  "network name not found",
   69   /* 0x36 */  "network busy",
   70   /* 0x37 */  "network device no longer exists",
   71   /* 0x38 */  "network BIOS command limit exceeded",
   72   /* 0x39 */  "network adapter hardware error",
   73   /* 0x3A */  "incorrect response from network",
   74   /* 0x3B */  "unexpected network error",
   75   /* 0x3C */  "incompatible remote adapter",
   76   /* 0x3D */  "print queue full",
   77   /* 0x3E */  "queue not full",
   78   /* 0x3F */  "not enough space to print file",
   79   /* 0x40 */  "network name was deleted",
   80   /* 0x41 */  "network: Access denied",
   81   /* 0x42 */  "network device type incorrect",
   82   /* 0x43 */  "network name not found",
   83   /* 0x44 */  "network name limit exceeded",
   84   /* 0x45 */  "network BIOS session limit exceeded",
   85   /* 0x46 */  "temporarily paused",
   86   /* 0x47 */  "network request not accepted",
   87   /* 0x48 */  "network print/disk redirection paused",
   88   /* 0x49 */  "network software not installed",
   89   /* 0x4A */  "unexpected adapter close",
   90   /* 0x4B */  "password expired",
   91   /* 0x4C */  "login attempt invalid at this time",
   92   /* 0x4D */  "disk limit exceeded on network node",
   93   /* 0x4E */  "not logged in to network node",
   94   /* 0x4F */  0,
   95   /* 0x50 */  "file exists",
   96   /* 0x51 */  0,
   97   /* 0x52 */  "cannot make directory",
   98   /* 0x53 */  "fail on INT 24h",
   99   /* 0x54 */  "too many redirections",
  100   /* 0x55 */  "duplicate redirection",
  101   /* 0x56 */  "invalid password",
  102   /* 0x57 */  "invalid parameter",
  103   /* 0x58 */  "network write fault",
  104   /* 0x59 */  "function not supported on network",
  105   /* 0x5A */  "required system component not installed"
  106 
  107 #if 0 /* the below won't happen here */
  108    0, 0, 0, 0, 0, 0, 0, 0, 0,
  109   /* 0x64 */  "(MSCDEX) unknown error",
  110   /* 0x65 */  "(MSCDEX) not ready",
  111   /* 0x66 */  "(MSCDEX) EMS memory no longer valid",
  112   /* 0x67 */  "(MSCDEX) not High Sierra or ISO-9660 format",
  113   /* 0x68 */  "(MSCDEX) door open",
  114 #endif
  115 };
  116 
  117 static char * decode_DOS_error(unsigned short errcode)
  118 {
  119     static char *unknown = "unknown error";
  120     if (errcode > MAX_DOSERROR) return unknown;
  121     if (!DOSerrcodes[errcode]) return unknown;
  122     return DOSerrcodes[errcode];
  123 }
  124 
  125 #endif /* DOSERROR_H */