mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
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:
parent
e5da1cc566
commit
c06d5ef114
Notes:
sideshowbarker
2024-07-19 07:44:54 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/c06d5ef114a
4 changed files with 4 additions and 5 deletions
|
@ -49,7 +49,7 @@ public:
|
|||
operator int() 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(); }
|
||||
|
||||
private:
|
||||
|
|
|
@ -3978,7 +3978,7 @@ int Process::sys$halt()
|
|||
dbg() << "attempting system shutdown...";
|
||||
IO::out16(0x604, 0x2000);
|
||||
|
||||
return ESUCCESS;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Process::sys$reboot()
|
||||
|
@ -3998,7 +3998,7 @@ int Process::sys$reboot()
|
|||
dbg() << "attempting reboot via KB Controller...";
|
||||
IO::out8(0x64, 0xFE);
|
||||
|
||||
return ESUCCESS;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Process::sys$mount(const Syscall::SC_mount_params* user_params)
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#define ESUCCESS 0
|
||||
#define EPERM 1
|
||||
#define ENOENT 2
|
||||
#define ESRCH 3
|
||||
|
|
|
@ -654,7 +654,7 @@ Vector<size_t, 2> Editor::vt_dsr()
|
|||
do {
|
||||
auto nread = read(0, buf + length, 16 - length);
|
||||
if (nread < 0) {
|
||||
if (errno == ESUCCESS) {
|
||||
if (errno == 0) {
|
||||
// ????
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue