Skip to content

Commit c6d6ba7

Browse files
committed
Minor errno fixups.
1 parent 39444c5 commit c6d6ba7

File tree

3 files changed

+37
-34
lines changed

3 files changed

+37
-34
lines changed

VirtualFileSystem/Ext2FileSystem.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <cstdio>
66
#include <cstring>
77
#include <AK/kmalloc.h>
8+
#include "sys-errno.h"
89

910
//#define EXT2_DEBUG
1011

VirtualFileSystem/FileHandle.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include "FileHandle.h"
22
#include "FileSystem.h"
33
#include "CharacterDevice.h"
4+
#include "sys-errno.h"
45

56
FileHandle::FileHandle(RetainPtr<VirtualFileSystem::Node>&& vnode)
67
: m_vnode(std::move(vnode))

VirtualFileSystem/sys-errno.h

Lines changed: 35 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,38 @@
11
#pragma once
22

3-
#define EPERM 1 // Operation not permitted
4-
#define ENOENT 2 // No such file or directory
5-
#define ESRCH 3 // No such process
6-
#define EINTR 4 // Interrupted system call
7-
#define EIO 5 // I/O error
8-
#define ENXIO 6 // No such device or address
9-
#define E2BIG 7 // Argument list too long
10-
#define ENOEXEC 8 // Exec format error
11-
#define EBADF 9 // Bad file number
12-
#define ECHILD 10 // No child processes
13-
#define EAGAIN 11 // Try again
14-
#define ENOMEM 12 // Out of memory
15-
#define EACCES 13 // Permission denied
16-
#define EFAULT 14 // Bad address
17-
#define ENOTBLK 15 // Block device required
18-
#define EBUSY 16 // Device or resource busy
19-
#define EEXIST 17 // File exists
20-
#define EXDEV 18 // Cross-device link
21-
#define ENODEV 19 // No such device
22-
#define ENOTDIR 20 // Not a directory
23-
#define EISDIR 21 // Is a directory
24-
#define EINVAL 22 // Invalid argument
25-
#define ENFILE 23 // File table overflow
26-
#define EMFILE 24 // Too many open files
27-
#define ENOTTY 25 // Not a typewriter
28-
#define ETXTBSY 26 // Text file busy
29-
#define EFBIG 27 // File too large
30-
#define ENOSPC 28 // No space left on device
31-
#define ESPIPE 29 // Illegal seek
32-
#define EROFS 30 // Read-only file system
33-
#define EMLINK 31 // Too many links
34-
#define EPIPE 32 // Broken pipe
35-
#define EDOM 33 // Math argument out of domain of func
36-
#define ERANGE 34 // Math result not representable
3+
#define EPERM 1 // Operation not permitted
4+
#define ENOENT 2 // No such file or directory
5+
#define ESRCH 3 // No such process
6+
#define EINTR 4 // Interrupted system call
7+
#define EIO 5 // I/O error
8+
#define ENXIO 6 // No such device or address
9+
#define E2BIG 7 // Argument list too long
10+
#define ENOEXEC 8 // Exec format error
11+
#define EBADF 9 // Bad file number
12+
#define ECHILD 10 // No child processes
13+
#define EAGAIN 11 // Try again
14+
#define ENOMEM 12 // Out of memory
15+
#define EACCES 13 // Permission denied
16+
#define EFAULT 14 // Bad address
17+
#define ENOTBLK 15 // Block device required
18+
#define EBUSY 16 // Device or resource busy
19+
#define EEXIST 17 // File exists
20+
#define EXDEV 18 // Cross-device link
21+
#define ENODEV 19 // No such device
22+
#define ENOTDIR 20 // Not a directory
23+
#define EISDIR 21 // Is a directory
24+
#define EINVAL 22 // Invalid argument
25+
#define ENFILE 23 // File table overflow
26+
#define EMFILE 24 // Too many open files
27+
#define ENOTTY 25 // Not a typewriter
28+
#define ETXTBSY 26 // Text file busy
29+
#define EFBIG 27 // File too large
30+
#define ENOSPC 28 // No space left on device
31+
#define ESPIPE 29 // Illegal seek
32+
#define EROFS 30 // Read-only file system
33+
#define EMLINK 31 // Too many links
34+
#define EPIPE 32 // Broken pipe
35+
#define EDOM 33 // Math argument out of domain of func
36+
#define ERANGE 34 // Math result not representable
3737

38+
#define EOVERFLOW 75 // Value too large for defined data type

0 commit comments

Comments
 (0)