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
Ben Wiederhake
70e96fb917
LibCore: Implement new ptrace_peekbuf wrapper for PT_PEEKBUF syscall
2021-12-05 22:59:09 +01:00
Ben Wiederhake
0f8483f09c
Kernel: Implement new ptrace function PT_PEEKBUF
...
This enables the tracer to copy large amounts of data in a much saner
way.
2021-12-05 22:59:09 +01:00
Ben Wiederhake
3e223185b3
Kernel+strace: Remove unnecessary indirection for PEEK
...
Also, remove incomplete, superfluous check.
Incomplete, because only the byte at the provided address was checked;
this misses the last bytes of the "jerk page".
Superfluous, because it is already correctly checked by peek_user_data
(which calls copy_from_user).
The caller/tracer should not typically attempt to read non-userspace
addresses, we don't need to "hot-path" it either.
2021-12-05 22:59:09 +01:00
Ben Wiederhake
6f37510a71
AK: Implement missing const getters in AK::Error, fix typo
...
Note that the return type for the non-const method error() changed. This
is most likely an accident, hidden by the fact that ErrorType typically
is Error.
2021-12-05 22:59:09 +01:00
Ben Wiederhake
dbd60f9ff4
AK: Implement Formatter for ErrorOr<>
...
As the Formatter for Error already exists, this apparently was just
accidentally omitted.
2021-12-05 22:59:09 +01:00
Lady Gegga
cf315635a8
Base: Add 1F9AC to font Katica Regular 10
...
1F9AC https://www.unicode.org/charts/PDF/U1F900.pdf
2021-12-05 11:07:26 -08:00
Lady Gegga
edf96ef15d
Base: Add some Vai characters to font Katica Regular 10
...
A578–A5A7 https://www.unicode.org/charts/PDF/UA500.pdf
2021-12-05 11:07:26 -08:00
Lady Gegga
95ba8e70e4
Base: Add OCR characters to font Katica Regular 10
...
2440-244A https://www.unicode.org/charts/PDF/U2440.pdf
2021-12-05 11:07:26 -08:00
Lady Gegga
2f5388d7c4
Base: Add Solresol characters to font Katica Regular 10
...
E770–E776* https://www.kreativekorp.com/ucsur/charts/PDF/UE770.pdf
* PUA based on Under-ConScript Unicode Registry
2021-12-05 11:07:26 -08:00
Lady Gegga
060ec90820
Base: Add some Bopomofo characters to font Katica Regular 10
...
3107, 3108, 3109, 310C, 310D, 310F, 3110, 3111, 3112, 3113,
3114, 3115, 3116, 3117, 311A
http://www.unicode.org/charts/PDF/U3100.pdf
2021-12-05 11:07:26 -08:00
Lady Gegga
10919421c2
Base: Add some Chinese characters to Katica Regular 10
...
91CC, 540E, 540C, 540A, 5409, 4E8E, 4E8D, 4E8C, 4E5A, 4E32,
5DF1, 5DF2, 5DF3, 5DF4, 5DE8, 5DE5, 8BA4, 4E43, 5341, 5344
https://www.unicode.org/charts/PDF/U4E00.pdf
2021-12-05 11:07:26 -08:00
Sam Atkins
c6a97ea843
Kernel: Mark kernel smart-pointer classes as [[nodiscard]]
...
And cast the unused return values to void.
2021-12-05 15:31:03 +01:00
Sam Atkins
5013a6480d
AK: Mark smart pointer classes as [[nodiscard]]
...
This makes it an error to not do something with a returned smart
pointer, which should help prevent mistakes. In cases where you do need
to ignore the value, casting to void will placate the compiler.
I did have to add comments to disable clang-format on a couple of lines,
where it wanted to format the code like this:
```c++
private : NonnullRefPtr() = delete;
```
2021-12-05 15:31:03 +01:00
Sam Atkins
3ca2aee054
Applications: Cast unused smart-pointer TRY return values to void
2021-12-05 15:31:03 +01:00
Sam Atkins
7e05ccaa70
Demos: Cast unused smart-pointer return values to void
2021-12-05 15:31:03 +01:00
Sam Atkins
7196570f9b
LibWeb: Cast unused smart-pointer return values to void
2021-12-05 15:31:03 +01:00
Sam Atkins
31ea222f97
LibVT: Cast unused smart-pointer return value to void
2021-12-05 15:31:03 +01:00
Sam Atkins
0e2fa09f52
Games: Cast unused smart-pointer return values to void
2021-12-05 15:31:03 +01:00
Sam Atkins
d95e50643e
LibGUI: Cast unused smart-pointer return values to void
2021-12-05 15:31:03 +01:00
Sam Atkins
907feb84a0
Kernel: Cast unused smart-pointer return value to void
2021-12-05 15:31:03 +01:00
Sam Atkins
16e5f24e64
Fuzzers: Cast unused smart-pointer return values to void
2021-12-05 15:31:03 +01:00
Sam Atkins
f3d8f80e9c
IPCCompiler: Cast return value of synchronous void IPC calls to void
...
The synchronous call returns a NonnullOwnPtr that we don't use, so we
have to cast to prevent a compiler warning once smart pointers become
[[nodiscard]].
2021-12-05 15:31:03 +01:00
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