faxe1008
f47d92af72
arp: Port to LibMain
2021-11-23 22:54:25 +01:00
Andreas Kling
6386b54746
dmesg: Port to LibMain :^)
2021-11-23 15:44:59 +01:00
Andreas Kling
e6579e7029
ps: Port to LibMain :^)
2021-11-23 15:44:59 +01:00
Andreas Kling
120168203e
keymap: Port to LibMain :^)
2021-11-23 15:44:59 +01:00
Andreas Kling
8b5c0e8e71
pmap: Port to LibMain :^)
2021-11-23 15:44:59 +01:00
Andreas Kling
03b6ff2bf0
utmpupdate: Port to LibMain :^)
2021-11-23 15:44:59 +01:00
Andreas Kling
d117c4cccc
truncate: Add a basic set of pledge promises
2021-11-23 12:31:21 +01:00
Andreas Kling
9eb7030b55
truncate: Port to LibMain and use LibCore syscall wrappers :^)
2021-11-23 12:27:33 +01:00
Andreas Kling
58fb3ebf66
LibCore+AK: Move MappedFile from AK to LibCore
...
MappedFile is strictly a userspace thing, so it doesn't belong in AK
(which is supposed to be user/kernel agnostic.)
2021-11-23 11:33:36 +01:00
Andreas Kling
21a5fb0fa2
LibCore+LibSystem: Move syscall wrappers from LibSystem to LibCore
...
With this change, System::foo() becomes Core::System::foo().
Since LibCore builds on other systems than SerenityOS, we now have to
make sure that wrappers work with just a standard C library underneath.
2021-11-23 11:33:36 +01:00
Mustafa Quraish
2fbcab46bf
Everywhere: Use ArgsParser::parse() with Main::Arguments directly
...
Use the updated API everywhere we are currently manually passing in
`arguments.argc` and `arguments.argv`.
2021-11-22 21:13:42 -08:00
Linus Groh
8fa5dc7241
js: Use pledge()
...
It is now no longer possible to make network connections from a hijacked
js(1) :^)
2021-11-22 23:07:43 +01:00
Linus Groh
cfecfbb214
js: Port to LibMain :^)
...
This wasn't particularly difficult, and there's not much use for the
nicer interface yet either. While unveil() is of limited use in js(1)
as it should be able to open arbitrary files, I feel like we should be
able to add a pledge() call.
2021-11-22 23:07:43 +01:00
Tim Schumacher
75978d5fff
tar: Support extracting symlinks
...
We can now extract GitHub's LLVM tarballs. :^)
2021-11-22 21:57:42 +01:00
Andreas Kling
f5927f167b
nproc: Port to LibMain :^)
2021-11-22 19:43:26 +01:00
Andreas Kling
561e50108d
w: Port to LibMain :^)
...
This unlocked a bunch of TRY() opportunities. Not just system calls, but
also Core::File::open() and JsonValue::from_string().
2021-11-22 19:40:27 +01:00
Andreas Kling
843262497a
id: Port to LibMain :^)
...
This is a first port of a simple program to LibMain. A bunch of code is
immediately simplified thanks to the LibSystem wrappers and ability to
use TRY(). This is pretty cool!
2021-11-22 19:28:31 +01:00
Tim Schumacher
0d679bf348
tar: Implement usage of prefixes when extracting
2021-11-22 09:03:47 +01:00
Ben Wiederhake
d5c687b50f
kcov-example: Print helpful error if kcov feature is missing
2021-11-21 13:52:25 +01:00
Ben Wiederhake
253d62cb18
SystemServer+kcov-example: Make /dev/kcov0 available again
...
Apparently this device entry got lost while converting to DevTmpFS.
2021-11-21 13:52:25 +01:00
Ben Wiederhake
f22c0ffe0c
LibGUI+Everywhere: Make sync requests to Clipboard server more obvious
2021-11-21 11:49:06 +00:00
Itamar
7950f5cb51
LibDebug: Add ProcessInspector base class
...
ProcessInspector is an abstract base class for an object that can
inspect the address space of a process.
Concrete sub classes need to implement methods for peeking & poking
memory and walking the loaded libraries.
It is currently only implemented by DebugSession.
2021-11-20 21:22:24 +00:00
Pankaj Raghav
0e873464ed
Hexdump: Add verbose option
...
Verbose option overrides the default coalescing
behaviour by displaying the complete output.
2021-11-19 12:17:57 +03:30
Pankaj Raghav
d72158045c
Hexdump: Allow identical lines to coalesce
...
Coalesce feature is enabled by default when using
the program. Any number of lines identical to the preceding line
will be replaced by a single asterik.
2021-11-19 12:17:57 +03:30
davidot
22e679d844
LibJS + js: Rethrow exception on the vm after bytecode interpreter run
...
When the bytecode interpreter was converted to ThrowCompletionOr<Value>
it then also cleared the vm.exception() making it seem like no exception
was thrown.
Also removed the TRY_OR_DISCARD as that would skip the error handling
parts.
2021-11-17 13:12:05 +00:00
Andreas Kling
216e21a1fa
AK: Convert AK::Format formatting helpers to returning ErrorOr<void>
...
This isn't a complete conversion to ErrorOr<void>, but a good chunk.
The end goal here is to propagate buffer allocation failures to the
caller, and allow the use of TRY() with formatting functions.
2021-11-17 00:21:13 +01:00
Andreas Kling
587f9af960
AK: Make JSON parser return ErrorOr<JsonValue> (instead of Optional)
...
Also add slightly richer parse errors now that we can include a string
literal with returned errors.
This will allow us to use TRY() when working with JSON data.
2021-11-17 00:21:10 +01:00
faxe1008
06cb526feb
config: Add option to remove config key
2021-11-14 22:42:52 +01:00
Tim Schumacher
2e8330f78c
Utilities/tr: Rework squeezing to be supported during more operations
2021-11-13 23:34:49 +01:00
Tim Schumacher
6fe37a1e52
Utilities/grep: Implement using multiple patterns
2021-11-13 11:42:26 +01:00
Tim Schumacher
c94574d313
Utilities/tar: Ignore directory entry if it already exists
2021-11-13 11:42:08 +01:00
Tim Schumacher
c81cef614a
Utilities/grep: Implement line-counting mode
2021-11-12 21:29:18 +00:00
Tim Schumacher
7ce693840b
Utilities/tr: Implement squeezing repeated characters
2021-11-12 21:23:29 +00:00
Ali Mohammad Pur
070d2eaa51
LibJS+LibTest+js: Convert BC::Interpreter::run to ThrowCompletionOr<>
...
Note that this is just a shallow API change.
2021-11-12 13:01:59 +00:00
Tim Schumacher
ba29798039
Utilities: cut: Implement field-based cutting
2021-11-11 09:47:41 +01:00
Tim Schumacher
96ea4f71bd
Utilities: cut: Split up into file and line processing
2021-11-11 09:47:41 +01:00
Tim Schumacher
4d18b21fb5
Utilities: cut: Work exclusively with ranges
2021-11-11 09:47:41 +01:00
Tim Schumacher
ed3a5f6b9d
Utilities: cut: Move string splitting into expand_list
2021-11-11 09:47:41 +01:00
Tim Schumacher
2358f6cbda
Utilities: cut: Migrate to ArgsParser
2021-11-11 09:47:41 +01:00
Andreas Kling
8b1108e485
Everywhere: Pass AK::StringView by value
2021-11-11 01:27:46 +01:00
Andreas Kling
a15ed8743d
AK: Make ByteBuffer::try_* functions return ErrorOr<void>
...
Same as Vector, ByteBuffer now also signals allocation failure by
returning an ENOMEM Error instead of a bool, allowing us to use the
TRY() and MUST() patterns.
2021-11-10 21:58:58 +01:00
Tim Schumacher
bd6c48f6ea
Utilities: tar: Always create parent directory when extracting
2021-11-10 14:48:20 +01:00
Ben Wiederhake
4512e89159
strace: Interpret errno codes for pointer-like return codes
2021-11-10 14:47:31 +01:00
Ben Wiederhake
81b6be4bf4
strace: Switch to new flag handler, support more flags
...
In particular, strace now supports all O_*, MSG_*, MAP_*, and PROT_*
flags, as well as a more context-dependent default value (e.g.
"PROT_NONE").
2021-11-10 14:47:31 +01:00
Ben Wiederhake
491ed375fc
strace: Better support for bitflags, show unrecognized flags
2021-11-10 14:47:31 +01:00
faxe1008
100e25d1d3
pape: Add set-random option
2021-11-08 16:36:02 -08:00
Andreas Kling
e76b21a66f
LibCore: Use ErrorOr<T> for Core::get_password()
2021-11-08 00:35:27 +01:00
Andreas Kling
a7f1f1c34b
LibCore: Use ErrorOr<T> for Core::File::open()
2021-11-08 00:35:27 +01:00
Andreas Kling
4a2b718ba2
LibCore: Use ErrorOr<T> for Core::File::copy_file()
2021-11-08 00:35:27 +01:00
Andreas Kling
c7e62d448c
LibCore: Use ErrorOr<T> for Core::File::remove()
...
This function returns a subclass of Error, which is now possible.
2021-11-08 00:35:27 +01:00