Subversion Repositories Spectranet

Compare Revisions

Rev 426 → Rev 442

/errno.inc
0,0 → 1,68
;The MIT License
;
;Copyright (c) 2011 Dylan Smith
;
;Permission is hereby granted, free of charge, to any person obtaining a copy
;of this software and associated documentation files (the "Software"), to deal
;in the Software without restriction, including without limitation the rights
;to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
;copies of the Software, and to permit persons to whom the Software is
;furnished to do so, subject to the following conditions:
;
;The above copyright notice and this permission notice shall be included in
;all copies or substantial portions of the Software.
;
;THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
;IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
;FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
;AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
;LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
;OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
;THE SOFTWARE.
 
; Error number definitions.
SUCCESS equ 0x00 ; Not an error, success return code
EPERM equ 0x01 ; Operation not permitted
ENOENT equ 0x02 ; No such file or directory
EIO equ 0x03 ; IO error
ENXIO equ 0x04 ; No such device or address
E2BIG equ 0x05 ; Too many arguments
EBADF equ 0x06 ; Bad file descriptor
EAGAIN equ 0x07 ; Operation would block
ENOMEM equ 0x08 ; Out of memory
EACCES equ 0x09 ; Permission denied
EBUSY equ 0x0A ; Device or resource busy
EEXIST equ 0x0B ; File exists
ENOTDIR equ 0x0C ; Not a directory
EISDIR equ 0x0D ; Is a directory
EINVAL equ 0x0E ; Invalid argument
ENFILE equ 0x0F ; File table overflow
EMFILE equ 0x10 ; Too many open files
EFBIG equ 0x11 ; File too large
ENOSPC equ 0x12 ; Filesystem full
ESPIPE equ 0x13 ; Attempt to seek on a pipe
EROFS equ 0x14 ; Read only filesystem
ENAMETOOLONG equ 0x15 ; Filename too long
ENOSYS equ 0x16 ; Not implemented
ENOTEMPTY equ 0x17 ; Directory not empty
ELOOP equ 0x18 ; Too many symbolic links
ENODATA equ 0x19 ; No data available
ENOSTR equ 0x1A ; Out of streams
EPROTO equ 0x1B ; Protocol error
EBADFD equ 0x1C ; File descriptor bad
EUSERS equ 0x1D ; Too many users
ENOBUFS equ 0x1E ; Out of buffer space
EALREADY equ 0x1F ; Operation already running
ESTALE equ 0x20 ; Stale filesystem handle
EOF equ 0x21 ; End of file
 
; Non-protocol/non core FS errors
TTIMEOUT equ 0x22 ; Operation timed out
TNOTMOUNTED equ 0x23 ; Filesystem not mounted
TBADLENGTH equ 0x24 ; Incorrect header length
TBADTYPE equ 0x25 ; Invalid block type
TUNKTYPE equ 0x26 ; Unknown file type
TMISMCHLENGTH equ 0x27 ; Data block length mismatch
TBADURL equ 0x28 ; Bad URL
TBADFS equ 0x29 ; Bad FS number
 
/fcntl.inc
31,50 → 31,6
OFFSET_CHKSUM equ 20 ; "checksum" byte
ZX_HEADERLEN equ 17 ; Length of ZX header excl. check byte
 
; FS error codes - not surprisingly, nearly all the same as POSIX...
ESUCCESS equ 0x00
EPERM equ 0x01
ENOENT equ 0x02
EIO equ 0x03
ENXIO equ 0x04
E2BIG equ 0x05
EBADF equ 0x06
EAGAIN equ 0x07
ENOMEM equ 0x08
EACCES equ 0x09
EBUSY equ 0x0A
EEXIST equ 0x0B
ENOTDIR equ 0x0C
EISDIR equ 0x0D
EINVAL equ 0x0E
ENFILE equ 0x0F
EMFILE equ 0x10
EFBIG equ 0x11
ENOSPC equ 0x12
ESPIPE equ 0x13
EROFS equ 0x14
ENAMETOOLONG equ 0x15
ENOSYS equ 0x16
ENOTEMPTY equ 0x17
ELOOP equ 0x18
ENODATA equ 0x19
ENOSTR equ 0x1A
EPROTO equ 0x1B
EBADFD equ 0x1C
EUSERS equ 0x1D
ENOBUFS equ 0x1E
EALREADY equ 0x1F
ESTALE equ 0x20
EOF equ 0x21
 
; FS related wire protocol errors
TTIMEOUT equ 0x22
TNOTMOUNTED equ 0x23
TBADLENGTH equ 0x24
TBADTYPE equ 0x25
TUNKTYPE equ 0x26
TMISMCHLENGTH equ 0x27
 
; File mode and flag definitions
O_RDONLY equ 0x01
O_WRONLY equ 0x02