Bananymous
5ad4340679
BAN: Use strerrordesc_np instead of strerror
2024-02-14 14:58:27 +02:00
Bananymous
250789aa20
Kernel: better handle kernel errors
2023-08-29 00:13:21 +03:00
Bananymous
1e075c248f
BAN: Errors now includes assert.h
2023-06-03 18:53:05 +03:00
Bananymous
03c64b950b
BAN: Errors.h can be included from userspace
2023-05-26 22:31:21 +03:00
Bananymous
05046d6e93
BAN: Error uses 64 bit error codes
2023-05-07 02:09:52 +03:00
Bananymous
3ca623349a
BAN: Add {TRY,MUST}_REF for references
...
It is annoying that we have to have separate macros for these but
I can't find a way to cleanly return lvalue reference from statement
expression. Currently we cast the reference to pointer and return
unreference the pointer outside of the expression.
This feature will probably not be used any time soon, but atleas
it is implemented if I need it one day
2023-04-19 00:31:15 +03:00
Bananymous
121f4bc1dd
BAN: TRY and MUST macros use rvalue references
2023-04-19 00:11:15 +03:00
Bananymous
8e31ef9905
BAN: Add specialization for ErrorOr<LValueReference>
...
ErrorOr can now return a reference :)
2023-04-18 22:02:47 +03:00
Bananymous
b41a8e2829
BAN: Variant now has variadic template types
2023-04-18 18:29:48 +03:00
Bananymous
aa2aee684b
Kernel: remove message from BAN::Error
...
We don't store the error message anymore in BAN::Error.
Instead we store a error code that can be mapped into a string.
This allows BAN::Error to only take 4 bytes instead of 128.
We should also make some kernel initialization just panic instead
of returning errors since they are required for succesfull boot
anyway.
2023-04-11 23:25:21 +03:00
Bananymous
371dfe8ef3
BAN: Formatter now uses perfect forwarding on its arguments
2023-03-08 21:31:26 +02:00
Bananymous
7458f68c38
BAN: Error can now be constructed from c_string or format string
...
If the resulting string would overflow, we just truncate it to fit
the error message buffer (128) bytes
2023-03-08 17:05:37 +02:00
Bananymous
81cb342c12
BAN: Remove #error macros
2023-03-02 22:30:32 +02:00
Bananymous
52aa98ba25
Kernel+LibC: Add some errno codes
...
Kernel now returns ENOMEM and other errnos, so we dont have to write
error messages
2023-03-02 21:10:44 +02:00
Bananymous
dc1a4614fb
BAN: Errors are now moved around with TRY()
2023-02-26 02:54:34 +02:00
Bananymous
5d31e89574
Kernel: Update ErrorOr API and add path find to VFS
...
These two are done on the same commit since Changes to Shell were
annoying to make work with only one change
2023-02-22 01:23:11 +02:00
Bananymous
247f03c79e
BAN: Make ErrorOr<> have attribute [[nodiscard]]
...
We don't have to specify it everytime we make function return ErrorOr
2023-02-19 20:10:30 +02:00
Bananymous
f68ae01d0c
BAN: Fix ErrorOr<void> to actually set error byte
2023-02-10 01:06:18 +02:00
Bananymous
9b8de5025a
All: rename every function from UpperCamelCase to snake_case
...
This was a mess since I didn't know which to use but now I decided
to go with snake_case :)
2023-02-01 21:05:44 +02:00
Bananymous
56d6b2af3d
BAN: TRY() now returns the error itself and not ErrorOr<>
...
This allows us to use TRY with different ErrorOr<> templates
2023-02-01 01:21:14 +02:00
Bananymous
cf63552b2a
BAN: Cleanup includes
2023-01-17 11:38:16 +02:00
Bananymous
065e23d307
BAN: fix include
2023-01-13 15:04:06 +02:00
Bananymous
c35181a92f
BAN: ASSERT now prints the condition
2023-01-13 00:57:47 +02:00
Bananymous
67308c36ad
BAN: ErrorOr<void> does not do an heap allocation anymore
2023-01-12 00:11:54 +02:00
Bananymous
1a65ea977d
BAN: Better ASSERT()
2023-01-10 17:43:18 +02:00
Bananymous
efd8638a96
Kernel: Improve kernel panic message and rename it 'panic'->'Panic'
2023-01-09 21:57:03 +02:00
Bananymous
fd4fdffd46
BAN::Formatter now takes putc like function as a parameter
...
This allows us to use capturing lambdas as a putc like function
2022-12-27 19:55:07 +02:00
Bananymous
4c559f50a4
BAN: StringView::Split() now precomputes number of elements
...
We dont have to resize vector on PushBack()'s if we reserve required size
2022-12-20 11:37:28 +02:00
Bananymous
941238830e
BAN: Now actually build libban :D
2022-12-13 16:13:38 +02:00
Bananymous
19307ce197
BAN: MUST() now returns the underlying value
2022-12-13 14:37:10 +02:00
Bananymous
3cda527987
BAN: Rename BAN::Formatter argument overload thing
2022-12-13 12:30:48 +02:00
Bananymous
334abe6b27
Kernel: lol
2022-12-13 12:12:15 +02:00
Bananymous
835430e7b0
BAN: Move Formatter to new project called BAN
...
I also implemented basic ErrorOr and Queue
2022-12-13 10:39:57 +02:00