Commit Graph

31043 Commits

Author SHA1 Message Date
Sam Atkins
2aa0885220 DHCP4Client: Cast unused Timer return values to void
Timers attach themselves to the provided parent, so they are safely kept
alive.
2021-12-05 15:31:03 +01:00
Sam Atkins
d2024f04bd Userland: Cast unused BackgroundAction::construct() results to void
User code does not need to keep this alive, so casting to void is safe.
But maybe a bit weird.
2021-12-05 15:31:03 +01:00
Sam Atkins
92f8514a85 Services: Cast unused IPC::new_client_connection() results to void
These ones all manage their storage internally, whereas the WebContent
and ImageDecoder ones require the caller to manage their lifetime. This
distinction is not obvious to the user without looking through the code,
so an API that makes this clearer would be nice.
2021-12-05 15:31:03 +01:00
Sam Atkins
c67c1b583a LibELF: Cast unused smart-pointer return value to void 2021-12-05 15:31:03 +01:00
Sam Atkins
a0f6da7ceb LibDSP: Cast unused smart-pointer return value to void 2021-12-05 15:31:03 +01:00
Sam Atkins
081d9bd010 LibCpp: Cast unused smart-pointer return values to void 2021-12-05 15:31:03 +01:00
Sam Atkins
b138070da9 Shell: Cast unused smart-pointer return values to void 2021-12-05 15:31:03 +01:00
Sam Atkins
9e3a786a64 Tests: Cast unused smart-pointer return values to void 2021-12-05 15:31:03 +01:00
Idan Horowitz
b2464cf4c0 Kernel: Define PT_WRITE_I and PT_WRITE_D
These are aliases for PT_POKE that are used in some *BSDs.
2021-12-05 12:53:29 +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
265764ff2f Kernel: Add support for the POLLWRBAND poll event 2021-12-05 12:53:29 +01:00
Idan Horowitz
f2fef049e1 Kernel: Define the POLLRDNORM alias for POLLIN
This flag is equivalent to POLLIN.
2021-12-05 12:53:29 +01:00
Idan Horowitz
05aa764402 Kernel: Define the POLLWRNORM alias for POLLOUT
This is defined by posix to be equivalent to POLLOUT
2021-12-05 12:53:29 +01:00
Idan Horowitz
d68242ba2f LibC: Stub out the rest of the getnameinfo flags
These are required for the compilation of some ports.
2021-12-05 12:53:29 +01:00
Idan Horowitz
8074157c10 Kernel: Add the IPPROTO_{IGMP, IPIP, RAW} protocol macros
These are not implemented currently, but are required for some ports to
compile.
2021-12-05 12:53:29 +01:00
Idan Horowitz
2860637ff3 Kernel: Add the IP_{BLOCK_SOURCE, UNBLOCK_SOURCE, OPTIONS} macros
These are not implemented currently, but are required for some ports to
compile.
2021-12-05 12:53:29 +01:00
Idan Horowitz
d18b3eb53d Kernel: Add the SO_OOBINLINE SOL_SOCKET-level option macro
This is not actually implemented, as we don't have any support for
out-of-band right now, but this is required for some ports to compile.
2021-12-05 12:53:29 +01:00
Idan Horowitz
613ade9dec Kernel: Implement the SO_DONTROUTE SOL_SOCKET-level option 2021-12-05 12:53:29 +01:00
Idan Horowitz
641498954f Kernel: Implement the SO_ACCEPTCONN SOL_SOCKET-level option 2021-12-05 12:53:29 +01:00
Idan Horowitz
a0e2fedc20 Kernel: Stub out the SO_DEBUG SOL_SOCKET-level option 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
Idan Horowitz
1f16250de9 Kernel: Add the SIOCATMARK ioctl request macro
This is not actually implemented at the moment, as we do not support
sending or receiving out-of-band data at all currently, but it is
required for some ports to compile.
2021-12-05 12:53:29 +01:00
Idan Horowitz
0a36d1459a Kernel: Return EINVAL on unsupported LocalSocket ioctl
ENOTTY is used to signify that no ioctl interface is provided at all,
but LocalSockets do support the FIONREAD ioctl.
2021-12-05 12:53:29 +01:00
Elyse
8595fd585d SoundPlayer: Port to LibMain :^) 2021-12-04 15:07:18 -08: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
Kenneth Myhra
0d76d15f9d LibCore: Add syscall wrapper for chmod() 2021-12-04 15:05:46 -08:00
Daniel Bertalan
294cb3cef4 Kernel: Wrap x86 assembly behind ARCH(...) in Syscall.h
Unlike GCC, Clang parses assembly eagerly, and immediately rejects
inline assembly that's not for the right architecture.
2021-12-04 11:59:59 -08:00
Daniel Bertalan
9b90f1fed5 Kernel: Do not do integer to pointer conversion in constexpr functions
Creating pointers from arbitrary values is not a valid thing to do in
constexpr functions. Furthermore, this functions is always called with
runtime values anyways, so there's no use in having it be constexpr.
Instead, make it ALWAYS_INLINE.
2021-12-04 11:59:59 -08:00
Daniel Bertalan
8e2d0c8d5c Kernel: Do not return a null ref in Processor::current on aarch64
Clang rejects binding a reference to a null pointer at compile-time.
Let's just crash explicitly, instead of waiting for a null dereference
to mess things up.
2021-12-04 11:59:59 -08:00
Jan de Visser
c369626ac1 LibSQL: Gracefully react to unimplemented valid SQL
Fixes a crash that was caused by a syntax error which is difficult to
catch by the parser: usually identifiers are accepted in column lists,
but they are not in a list of column values to be inserted in an INSERT.

Fixed this by putting in a heuristic check; we probably need a better
way to do this.

Included tests for this case.

Also introduced a new SQL Error code, `NotYetImplemented`, and return
that instead of crashing when encountering unimplemented SQL.
2021-12-04 20:49:22 +03:30
Jan de Visser
001949d77a LibSQL: Improve error handling
The handling of filesystem level errors was basically non-existing or
consisting of `VERIFY_NOT_REACHED` assertions. Addressed this by
* Adding `open` methods to `Heap` and `Database` which return errors.
* Changing the interface of methods of these classes and clients
downstream to propagate these errors.

The constructors of `Heap` and `Database` don't open the underlying
filesystem file anymore.

The SQL statement handlers return an `SQLErrorCode::InternalError`
error code if an error comes back from the lower levels. Note that some
of these errors are things like duplicate index entry errors that should
be caught before the SQL layer attempts to actually update the database.

Added tests to catch attempts to open weird or non-existent files as
databases.

Finally, in between me writing this patch and submitting the PR the
AK::Result<Foo, Bar> template got deprecated in favour of ErrorOr<Foo>.
This resulted in more busywork.
2021-12-04 20:49:22 +03:30
Andreas Kling
108de5dea0 LibWeb: Stop sending "load" event twice to iframes
The "completely finish loading" algorithm (from the HTML spec) is
responsible for sending a "load" event to nested browsing context
containers (iframes).

This patch removes the old mechanism for sending "load" events, which we
had mistakenly kept around, causing two events to be sent instead of
one. :^)
2021-12-04 14:47:24 +01:00
Andreas Kling
58309444d7 LibWeb: Fix DOMImplementation changing content type of wrong document
DOMImplementation.createDocument() should set the content type of the
newly created document, not replace the content type of the
DOMImplementation's own host document.
2021-12-04 14:38:16 +01:00
Andreas Kling
d7a116bb0e groups: Port to LibMain :^) 2021-12-04 14:24:04 +01:00
Andreas Kling
96e4077c38 SystemMonitor: Port to LibMain :^)
There's a lot more work to do on this application to take full advantage
of TRY() etc. This patch just scratches the surface.
2021-12-04 14:24:04 +01:00
Andreas Kling
01228bf4ef CrashReporter: Port to LibMain and use TRY() while building the UI :^) 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
c3733bea92 Applets/ClipboardHistory: 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
Andreas Kling
1640445cb2 LibCore: Add lstat() syscall wrapper 2021-12-04 14:24:04 +01:00
Daniel Bertalan
21acebd372 HackStudio: Fix cursor not jumping to column 1 in the embedded terminal
Normally, it's the TTY layer's job to translate '\n' into the separate
'\r' and '\n' control characters needed by the terminal to move the
cursor to the first column of the next line.
(see 5d80debc1f).

In HackStudio, we directly inject data into the TerminalWidget to
display command status. This means that this automatic translation
doesn't happen, so we need to explicitly give it the '\r' too.
2021-12-04 14:44:00 +03:30
Lady Gegga
a5548a97f1 Base: Add some Chinese characters to Katica Regular 10
https://www.unicode.org/charts/PDF/U4E00.pdf
4E00, 4E0A, 4E0D, 4E16, 4E28, 4E29, 4E2A, 4E2B, 4E2D, 4E3B,
4E3C, 4E3F, 4E42, 4E4B, 4E85, 4E86, 4EBA, 516C, 518B, 5727,
5728, 572D, 5927, 5928, 5929, 592B, 592D, 594C, 5B50, 5B51,
5F00
2021-12-03 08:55:27 -08: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
Itamar
c3c2fe153b LibCpp: Add "ignore invalid statements" option to Preprocessor
When we run the Preprocessor from the CppComprehensionEngine of
the language server, we don't want the preprocessor to crash if it
encounters an invalid preprocessor statement (for example, an #endif
statement without an accompanying previous #if statement).

To achieve this, this commit adds an "ignore_invalid_statements" flag
to the preprocessor which is set by the CppComprehensionEngine.

Fixes #11064.
2021-12-03 15:38:21 +01:00