Commit Graph

746 Commits

Author SHA1 Message Date
Kenneth Myhra
430e231f5e copy: Port to LibMain :^) 2021-11-25 21:41:02 +01:00
Kenneth Myhra
507de4bc1d cat: Port to LibMain :^) 2021-11-25 21:40:52 +01:00
Andreas Kling
76cb6ddfcf man: Use LibCore syscall wrappers for pipe2() and dup2() 2021-11-24 23:07:31 +01:00
Andreas Kling
1682cd10be man: Port to LibMain :^) 2021-11-24 23:07:31 +01:00
Ben Wiederhake
3e7e503dee strace: Implement get_process_name and gettid 2021-11-24 22:56:39 +01:00
Ben Wiederhake
2dd5c7d2cc strace: Implement dbgputstr syscall 2021-11-24 22:56:39 +01:00
Jelle Raaijmakers
f97c9a5968 Kernel: Allow higher audio sample rates than 65kHZ (u16)
Executing `asctl set r 96000` no longer results in weird sample rates
being set on the audio devices. SB16 checks for a sample rate between 1
and 44100 Hz, while AC97 implements double-rate support which allows
sample rates between 8kHz and 96kHZ.
2021-11-24 19:08:13 +01:00
Idan Horowitz
58397f356f js: Add command line flag for disabling source line hints 2021-11-24 18:05:24 +00:00
Idan Horowitz
15fafdc645 js: Pretty-print custom error types 2021-11-24 18:05:24 +00:00
Idan Horowitz
11d1950e74 js: Add command line flag for disabling ANSI colors 2021-11-24 18:05:24 +00:00
Andreas Kling
ca23644397 logout: Port to LibMain :^) 2021-11-24 00:25:22 +01:00
faxe1008
02a7cfaad6 usermod: Port to LibMain 2021-11-23 22:54:25 +01:00
faxe1008
b49bed5152 userdel: Port to LibMain 2021-11-23 22:54:25 +01:00
faxe1008
b2e7102194 lsusb: Port to LibMain 2021-11-23 22:54:25 +01:00
faxe1008
097c1e5335 blockdev: Port to LibMain 2021-11-23 22:54:25 +01:00
faxe1008
b918e798e6 base64: Port to LibMain 2021-11-23 22:54:25 +01:00
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