From a08310ff5e1a873c3c29d4eee107e4e8b47749df Mon Sep 17 00:00:00 2001 From: apio Date: Sun, 18 Dec 2022 18:09:52 +0100 Subject: [PATCH] Add some more errno definitions --- luna/include/luna/SystemError.h | 2 ++ luna/src/SystemError.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/luna/include/luna/SystemError.h b/luna/include/luna/SystemError.h index 0c952b57..4c93724b 100644 --- a/luna/include/luna/SystemError.h +++ b/luna/include/luna/SystemError.h @@ -15,6 +15,7 @@ #define ENOMEM 12 // Cannot allocate memory #define EACCES 13 // Permission denied #define EFAULT 14 // Bad address +#define ENOTBLK 15 // Block device required #define EBUSY 16 // Device or resource busy #define EEXIST 17 // File exists #define EXDEV 18 // Invalid cross-device link @@ -25,6 +26,7 @@ #define ENFILE 23 // Too many open files in system #define EMFILE 24 // Too many open files #define ENOTTY 25 // Inappropriate ioctl for device +#define ETXTBSY 26 // Text file busy #define EFBIG 27 // File too large #define ENOSPC 28 // No space left on device #define ESPIPE 29 // Illegal seek diff --git a/luna/src/SystemError.cpp b/luna/src/SystemError.cpp index 2e1f63ad..79279044 100644 --- a/luna/src/SystemError.cpp +++ b/luna/src/SystemError.cpp @@ -19,6 +19,7 @@ const char* error_string(int error) case ENOMEM: return "Cannot allocate memory"; case EACCES: return "Permission denied"; case EFAULT: return "Bad address"; + case ENOTBLK: return "Block device required"; case EBUSY: return "Device or resource busy"; case EEXIST: return "File exists"; case EXDEV: return "Invalid cross-device link"; @@ -29,6 +30,7 @@ const char* error_string(int error) case ENFILE: return "Too many open files in system"; case EMFILE: return "Too many open files"; case ENOTTY: return "Inappropriate ioctl for device"; + case ETXTBSY: return "Text file busy"; case EFBIG: return "File too large"; case ENOSPC: return "No space left on device"; case ESPIPE: return "Illegal seek";