Skip to content

Commit

Permalink
errors_h: explicitely add the value for each error
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeal8bit committed Nov 23, 2024
1 parent c847e14 commit 0baeb9e
Showing 1 changed file with 43 additions and 43 deletions.
86 changes: 43 additions & 43 deletions include/errors_h.asm
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
; SPDX-FileCopyrightText: 2023 Zeal 8-bit Computer <[email protected]>
; SPDX-FileCopyrightText: 2023-2024 Zeal 8-bit Computer <[email protected]>
;
; SPDX-License-Identifier: Apache-2.0

IFNDEF ERRORS_H
DEFINE ERRORS_H
IFNDEF ERRORS_H
DEFINE ERRORS_H

DEFGROUP
{
ERR_SUCCESS = 0,
ERR_FAILURE,
ERR_NOT_IMPLEMENTED,
ERR_NOT_SUPPORTED,
ERR_NO_SUCH_ENTRY,
ERR_INVALID_SYSCALL,
ERR_INVALID_PARAMETER,
ERR_INVALID_VIRT_PAGE,
ERR_INVALID_PHYS_ADDRESS,
ERR_INVALID_OFFSET,
ERR_INVALID_NAME,
ERR_INVALID_PATH,
ERR_INVALID_FILESYSTEM,
ERR_INVALID_FILEDEV,
ERR_PATH_TOO_LONG,
ERR_ALREADY_EXIST,
ERR_ALREADY_OPENED,
ERR_ALREADY_MOUNTED,
ERR_READ_ONLY,
ERR_BAD_MODE,
ERR_CANNOT_REGISTER_MORE,
ERR_NO_MORE_ENTRIES,
ERR_NO_MORE_MEMORY,
ERR_NOT_A_DIR,
ERR_NOT_A_FILE,
ERR_ENTRY_CORRUPTED,
ERR_DIR_NOT_EMPTY,
ERR_SPECIAL_STATE, ; Used when a special key is received on the keyboard
; This error code is a special value that can only be used
; by the drivers. It can be returned by the driver's init
; routine in order to tell the kernel to NOT register the
; driver in the accessible list. Thus, the users won't be
; able to retrieve its program. (useful for block drivers
; for example or target's routines needed to be executed at
; boot)
ERR_DRIVER_HIDDEN = 255
}
DEFGROUP
{
ERR_SUCCESS = 0,
ERR_FAILURE = 1,
ERR_NOT_IMPLEMENTED = 2,
ERR_NOT_SUPPORTED = 3,
ERR_NO_SUCH_ENTRY = 4,
ERR_INVALID_SYSCALL = 5,
ERR_INVALID_PARAMETER = 6,
ERR_INVALID_VIRT_PAGE = 7,
ERR_INVALID_PHYS_ADDRESS = 8,
ERR_INVALID_OFFSET = 9,
ERR_INVALID_NAME = 10,
ERR_INVALID_PATH = 11,
ERR_INVALID_FILESYSTEM = 12,
ERR_INVALID_FILEDEV = 13,
ERR_PATH_TOO_LONG = 14,
ERR_ALREADY_EXIST = 15,
ERR_ALREADY_OPENED = 16,
ERR_ALREADY_MOUNTED = 17,
ERR_READ_ONLY = 18,
ERR_BAD_MODE = 19,
ERR_CANNOT_REGISTER_MORE = 20,
ERR_NO_MORE_ENTRIES = 21,
ERR_NO_MORE_MEMORY = 22,
ERR_NOT_A_DIR = 23,
ERR_NOT_A_FILE = 24,
ERR_ENTRY_CORRUPTED = 25,
ERR_DIR_NOT_EMPTY = 26,
ERR_SPECIAL_STATE, ; Used when a special key is received on the keyboard
; This error code is a special value that can only be used
; by the drivers. It can be returned by the driver's init
; routine in order to tell the kernel to NOT register the
; driver in the accessible list. Thus, the users won't be
; able to retrieve its program. (useful for block drivers
; for example or target's routines needed to be executed at
; boot)
ERR_DRIVER_HIDDEN = 255
}

ENDIF
ENDIF

0 comments on commit 0baeb9e

Please sign in to comment.