<font size=2 face="sans-serif">For a write or create operation ENOSPC
&nbsp;would make some sense.</font><br><font size=2 face="sans-serif">But if the file already exists and I'm
just opening for read access I would be very confused by ENOSPC.</font><br><font size=2 face="sans-serif">How should the system respond: &nbsp;&quot;Sorry,
I know about that file, I have it safely stored away in HSM, but it is
not available right now. Try again later!&quot;</font><br><br><font size=2 face="sans-serif">EAGAIN or EBUSY might be the closest
in ordinary language... </font><br><font size=2 face="sans-serif">But EAGAIN is used when a system call
is interrupted and can be retried right away... </font><br><font size=2 face="sans-serif">So EBUSY?</font><br><br><font size=2 face="sans-serif">The standard return codes in Linux are:</font><br><br><tt><font size=2>#define EPERM &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1
&nbsp; &nbsp; &nbsp;/* Operation not permitted */</font></tt><br><tt><font size=2>#define ENOENT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
2 &nbsp; &nbsp; &nbsp;/* No such file or directory */</font></tt><br><tt><font size=2>#define ESRCH &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;3
&nbsp; &nbsp; &nbsp;/* No such process */</font></tt><br><tt><font size=2>#define EINTR &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;4
&nbsp; &nbsp; &nbsp;/* Interrupted system call */</font></tt><br><tt><font size=2>#define EIO &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;5 &nbsp; &nbsp; &nbsp;/* I/O error */</font></tt><br><tt><font size=2>#define ENXIO &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;6
&nbsp; &nbsp; &nbsp;/* No such device or address */</font></tt><br><tt><font size=2>#define E2BIG &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;7
&nbsp; &nbsp; &nbsp;/* Argument list too long */</font></tt><br><tt><font size=2>#define ENOEXEC &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;8
&nbsp; &nbsp; &nbsp;/* Exec format error */</font></tt><br><tt><font size=2>#define EBADF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;9
&nbsp; &nbsp; &nbsp;/* Bad file number */</font></tt><br><tt><font size=2>#define ECHILD &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;10
&nbsp; &nbsp; &nbsp;/* No child processes */</font></tt><br><tt><font size=2>#define EAGAIN &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;11
&nbsp; &nbsp; &nbsp;/* Try again */</font></tt><br><tt><font size=2>#define ENOMEM &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;12
&nbsp; &nbsp; &nbsp;/* Out of memory */</font></tt><br><tt><font size=2>#define EACCES &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;13
&nbsp; &nbsp; &nbsp;/* Permission denied */</font></tt><br><tt><font size=2>#define EFAULT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;14
&nbsp; &nbsp; &nbsp;/* Bad address */</font></tt><br><tt><font size=2>#define ENOTBLK &nbsp; &nbsp; &nbsp; &nbsp; 15 &nbsp;
&nbsp; &nbsp;/* Block device required */</font></tt><br><tt><font size=2>#define EBUSY &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 16
&nbsp; &nbsp; &nbsp;/* Device or resource busy */</font></tt><br><tt><font size=2>#define EEXIST &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;17
&nbsp; &nbsp; &nbsp;/* File exists */</font></tt><br><tt><font size=2>#define EXDEV &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 18
&nbsp; &nbsp; &nbsp;/* Cross-device link */</font></tt><br><tt><font size=2>#define ENODEV &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;19
&nbsp; &nbsp; &nbsp;/* No such device */</font></tt><br><tt><font size=2>#define ENOTDIR &nbsp; &nbsp; &nbsp; &nbsp; 20 &nbsp;
&nbsp; &nbsp;/* Not a directory */</font></tt><br><tt><font size=2>#define EISDIR &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;21
&nbsp; &nbsp; &nbsp;/* Is a directory */</font></tt><br><tt><font size=2>#define EINVAL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;22
&nbsp; &nbsp; &nbsp;/* Invalid argument */</font></tt><br><tt><font size=2>#define ENFILE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;23
&nbsp; &nbsp; &nbsp;/* File table overflow */</font></tt><br><tt><font size=2>#define EMFILE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;24
&nbsp; &nbsp; &nbsp;/* Too many open files */</font></tt><br><tt><font size=2>#define ENOTTY &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;25
&nbsp; &nbsp; &nbsp;/* Not a typewriter */</font></tt><br><tt><font size=2>#define ETXTBSY &nbsp; &nbsp; &nbsp; &nbsp; 26 &nbsp;
&nbsp; &nbsp;/* Text file busy */</font></tt><br><tt><font size=2>#define EFBIG &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 27
&nbsp; &nbsp; &nbsp;/* File too large */</font></tt><br><tt><font size=2>#define ENOSPC &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;28
&nbsp; &nbsp; &nbsp;/* No space left on device */</font></tt><br><tt><font size=2>#define ESPIPE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;29
&nbsp; &nbsp; &nbsp;/* Illegal seek */</font></tt><br><tt><font size=2>#define EROFS &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 30
&nbsp; &nbsp; &nbsp;/* Read-only file system */</font></tt><br><tt><font size=2>#define EMLINK &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;31
&nbsp; &nbsp; &nbsp;/* Too many links */</font></tt><br><tt><font size=2>#define EPIPE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 32
&nbsp; &nbsp; &nbsp;/* Broken pipe */</font></tt><br><tt><font size=2>#define EDOM &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;33
&nbsp; &nbsp; &nbsp;/* Math argument out of domain of func */</font></tt><br><tt><font size=2>#define ERANGE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;34
&nbsp; &nbsp; &nbsp;/* Math result not representable */</font></tt><br><br><font size=2 face="sans-serif"><br></font><br><br><img align=left src=cid:_1_0E516CEC0E516AAC0052E7FF85257F71 alt="Marc A Kaplan" style="border:0px solid;"><BR>