Kernel+LibC: Remove ESUCCESS

There's no official ESUCCESS==0 errno code, and it keeps breaking the
Lagom build when we use it, so let's just say 0 instead.
This commit is contained in:
Andreas Kling 2020-04-10 12:58:27 +02:00
parent e5da1cc566
commit c06d5ef114
Notes: sideshowbarker 2024-07-19 07:44:54 +09:00
4 changed files with 4 additions and 5 deletions

View file

@ -49,7 +49,7 @@ public:
operator int() const { return m_error; } operator int() const { return m_error; }
int error() const { return m_error; } int error() const { return m_error; }
bool is_success() const { return m_error == ESUCCESS; } bool is_success() const { return m_error == 0; }
bool is_error() const { return !is_success(); } bool is_error() const { return !is_success(); }
private: private:

View file

@ -3978,7 +3978,7 @@ int Process::sys$halt()
dbg() << "attempting system shutdown..."; dbg() << "attempting system shutdown...";
IO::out16(0x604, 0x2000); IO::out16(0x604, 0x2000);
return ESUCCESS; return 0;
} }
int Process::sys$reboot() int Process::sys$reboot()
@ -3998,7 +3998,7 @@ int Process::sys$reboot()
dbg() << "attempting reboot via KB Controller..."; dbg() << "attempting reboot via KB Controller...";
IO::out8(0x64, 0xFE); IO::out8(0x64, 0xFE);
return ESUCCESS; return 0;
} }
int Process::sys$mount(const Syscall::SC_mount_params* user_params) int Process::sys$mount(const Syscall::SC_mount_params* user_params)

View file

@ -26,7 +26,6 @@
#pragma once #pragma once
#define ESUCCESS 0
#define EPERM 1 #define EPERM 1
#define ENOENT 2 #define ENOENT 2
#define ESRCH 3 #define ESRCH 3

View file

@ -654,7 +654,7 @@ Vector<size_t, 2> Editor::vt_dsr()
do { do {
auto nread = read(0, buf + length, 16 - length); auto nread = read(0, buf + length, 16 - length);
if (nread < 0) { if (nread < 0) {
if (errno == ESUCCESS) { if (errno == 0) {
// ???? // ????
continue; continue;
} }