Commit Graph

802 Commits

Author SHA1 Message Date
Kenneth Myhra
62ddd7613c config: Port to LibMain :^) 2021-12-11 15:10:42 -08:00
Kenneth Myhra
65f4d868e5 dd: Port to LibMain :^) 2021-12-11 15:10:42 -08:00
Kenneth Myhra
00dbac9d16 date: Port to LibMain :^) 2021-12-11 15:10:42 -08:00
Kenneth Myhra
5c15b97ca4 cut: Port to LibMain :^) 2021-12-11 15:10:42 -08:00
Kenneth Myhra
7cb19b2965 cpp-processor: Port to LibMain :^) 2021-12-11 15:10:42 -08:00
Kenneth Myhra
121fe820d9 cpp-parser: Port to LibMain :^) 2021-12-11 15:10:42 -08:00
Kenneth Myhra
1a81d79705 cpp-lexer: Port to LibMain :^) 2021-12-11 15:10:42 -08:00
Kenneth Myhra
601b60324a comm: Port to LibMain :^) 2021-12-11 15:10:42 -08:00
Kenneth Myhra
d86c84a700 clear: Port to LibMain :^) 2021-12-11 15:10:42 -08:00
Kenneth Myhra
6e066bf1cd cksum: Port to LibMain :^) 2021-12-11 15:10:42 -08:00
Kenneth Myhra
67a18d51c7 chres: Port to LibMain :^) 2021-12-11 15:10:42 -08:00
Kenneth Myhra
cc3710e19f chown: Port to LibMain :^) 2021-12-11 15:10:42 -08:00
Kenneth Myhra
c8080fc2ca chgrp: Port to LibMain :^) 2021-12-11 15:10:42 -08:00
Kenneth Myhra
59d299955e checksum: Port to LibMain :^) 2021-12-11 15:10:42 -08:00
Kenneth Myhra
6b6d7286b5 cal: Port to LibMain :^) 2021-12-11 15:10:42 -08:00
David Lindbom
235a2b35d6 passwd: Port to LibMain 2021-12-11 13:16:55 -08:00
bugreport0
8a4b9c0926 passwd: Remove redundant pledge() 2021-12-11 03:17:11 -08:00
Linus Groh
038d354b5d LibJS: Remove Object::value_of()
Being really close to Object.prototype.valueOf() name wise makes this
unnecessarily confusing - while it sometimes serves as the
implementation of a valueOf() function, it's an abstraction which the
spec doesn't have.
Use the appropriate getters to retrieve specific internal slots instead,
most commonly [[FooData]] from the primitive wrapper objects.
For the Object class specifically, use the Value(Object*) ctor instead.
2021-12-10 22:52:36 +00:00
James Puleo
dd25dfbc20 js: Improve usage of TRY when executing a file program 2021-12-08 17:17:35 -08:00
Ben Wiederhake
9f91f610e2 test-crypto: Avoid implicitly copying ByteBuffer 2021-12-08 09:46:13 -08:00
Ben Wiederhake
152d455143 strace: Handle strings more gracefully
In particular, strace can now stomach memory errors while copying
invalid strings.

Example with a valid string:
    dbgputstr("95.976 traceme(38:38) Well, Hello Friends!") = 55
Example with an invalid string:
    dbgputstr(Error(errno=14){0x00012345, 678b}) = -14 EFAULT
(ANSI escapes removed for readability.)
2021-12-05 22:59:09 +01:00
Ben Wiederhake
49adebf0fc strace: Use new PT_PEEKBUF function
This necessarily introduces some usages (and benefits!) of the new
ErrorOr<> pattern. To keep commits atomic, I do not yet rewrite the
entire program to use ErrorOr<> correctly.
2021-12-05 22:59:09 +01:00
Idan Horowitz
13dec3cdde LibC: Add a couple of missing errno codes
These are required to compile a port.
2021-12-05 12:53:29 +01:00
Idan Horowitz
e521ffd156 Kernel: Add support for the MSG_WAITALL sys$recvmsg flag 2021-12-05 12:53:29 +01:00
Idan Horowitz
5514d60d8d Kernel: Add support for the MSG_DONTROUTE sys$sendmsg flag 2021-12-05 12:53:29 +01:00
Kenneth Myhra
d465d3a457 chmod: Port to LibMain :^)
This ports chmod to LibMain + changes input parameters on several
functions from raw C strings to StringView.
2021-12-04 15:05:46 -08:00
Andreas Kling
d7a116bb0e groups: Port to LibMain :^) 2021-12-04 14:24:04 +01:00
Andreas Kling
2511da1f57 gron: Use StringView literals more (instead of raw C strings) 2021-12-04 14:24:04 +01:00
Andreas Kling
855c425719 gron: Port to LibMain :^) 2021-12-04 14:24:04 +01:00
Andreas Kling
b0659b50dc jp: Port to LibMain :^) 2021-12-04 14:24:04 +01:00
Andreas Kling
de182d4b46 stat: Modernize slightly :^)
- Port to LibMain
- Use AK::Format instead of printf()
2021-12-04 14:24:04 +01:00
Andreas Kling
0de575ec11 ls: Port to LibMain :^) 2021-12-04 14:24:04 +01:00
Tim Schumacher
0ca63cfd6e find: Implement support for multiple directories 2021-12-03 15:39:00 +01:00
Tim Schumacher
5a21c3b389 find: Use a Vector for parsing instead of moving optind 2021-12-03 15:39:00 +01:00
Tim Schumacher
4ca35ac1b8 find: Port to LibMain 2021-12-03 15:39:00 +01:00
Andreas Kling
fd2ea6923c top: Use Core::System::ioctl() 2021-11-30 23:34:40 +01:00
Andreas Kling
9815ad556a fortune: Port to LibMain :^) 2021-11-30 23:34:40 +01:00
Andreas Kling
8ba9a54310 lspci: Port to LibMain :^) 2021-11-30 23:34:40 +01:00
Andreas Kling
6e7ff8cf1c netstat: Port to LibMain :^) 2021-11-30 23:34:40 +01:00
Andreas Kling
fbeebce4e3 whoami: Port to LibMain :^) 2021-11-30 23:34:40 +01:00
Andreas Kling
cac3f3c81f top: Port to LibMain :^) 2021-11-30 23:34:40 +01:00
Timothy Flynn
6ad00088c0 js: Implement pretty-printing of Intl.DateTimeFormat 2021-11-29 22:48:46 +00:00
kleines Filmröllchen
9c40311622 Utilites: Add abench utility
abench (audio benchmark) is an audio benchmarking utility that allows
testing decoder performance.
2021-11-28 13:33:51 -08:00
kleines Filmröllchen
96d02a3e75 LibAudio: New error propagation API in Loader and Buffer
Previously, a libc-like out-of-line error information was used in the
loader and its plugins. Now, all functions that may fail to do their job
return some sort of Result. The universally-used error type ist the new
LoaderError, which can contain information about the general error
category (such as file format, I/O, unimplemented features), an error
description, and location information, such as file index or sample
index.

Additionally, the loader plugins try to do as little work as possible in
their constructors. Right after being constructed, a user should call
initialize() and check the errors returned from there. (This is done
transparently by Loader itself.) If a constructor caused an error, the
call to initialize should check and return it immediately.

This opportunity was used to rework a lot of the internal error
propagation in both loader classes, especially FlacLoader. Therefore, a
couple of other refactorings may have sneaked in as well.

The adoption of LibAudio users is minimal. Piano's adoption is not
important, as the code will receive major refactoring in the near future
anyways. SoundPlayer's adoption is also less important, as changes to
refactor it are in the works as well. aplay's adoption is the best and
may serve as an example for other users. It also includes new buffering
behavior.

Buffer also gets some attention, making it OOM-safe and thereby also
propagating its errors to the user.
2021-11-28 13:33:51 -08:00
Brian Gianforcaro
cf4fa936be Everywhere: Use default execpromises argument for Core::System::pledge 2021-11-28 08:04:57 +01:00
Brian Gianforcaro
fcc00c9a27 LibCore+cat: Switch Core::System::read/write to take a Span of bytes
In the spirit of the Core::System name space having "modern" facades
for classically C functions / Kernel interfaces, it seems appropriate
that we should take Span's of data instead of raw pointer + length
arguments.
2021-11-28 08:04:57 +01:00
Kenneth Myhra
f25466ae08 bt: Port to LibMain :^) 2021-11-27 11:14:16 +01:00
Kenneth Myhra
8c4625e3b1 asctl: Port to LibMain :^) 2021-11-27 11:14:16 +01:00
Kenneth Myhra
880888fcc7 aplay: Port to LibMain 2021-11-27 11:14:16 +01:00
Kenneth Myhra
494f177d22 allocate: Port to LibMain :^) 2021-11-27 11:14:16 +01:00