summaryrefslogtreecommitdiff
path: root/Userland/Utilities
AgeCommit message (Collapse)Author
2022-01-15LibCore+LibIPC+Everywhere: Return Stream::LocalSocket from LocalServersin-ack
This change unfortunately cannot be atomically made without a single commit changing everything. Most of the important changes are in LibIPC/Connection.cpp, LibIPC/ServerConnection.cpp and LibCore/LocalServer.cpp. The notable changes are: - IPCCompiler now generates the decode and decode_message functions such that they take a Core::Stream::LocalSocket instead of the socket fd. - IPC::Decoder now uses the receive_fd method of LocalSocket instead of doing system calls directly on the fd. - IPC::ConnectionBase and related classes now use the Stream API functions. - IPC::ServerConnection no longer constructs the socket itself; instead, a convenience macro, IPC_CLIENT_CONNECTION, is used in place of C_OBJECT and will generate a static try_create factory function for the ServerConnection subclass. The subclass is now responsible for passing the socket constructed in this function to its ServerConnection base; the socket is passed as the first argument to the constructor (as a NonnullOwnPtr<Core::Stream::LocalServer>) before any other arguments. - The functionality regarding taking over sockets from SystemServer has been moved to LibIPC/SystemServerTakeover.cpp. The Core::LocalSocket implementation of this functionality hasn't been deleted due to my intention of removing this class in the near future and to reduce noise on this (already quite noisy) PR.
2022-01-14Utilities: Port ifconfig to LibMainalexmajor
2022-01-14Utilities/aplay: Print progress in seconds and minutes by defaultkleines Filmröllchen
By default, aplay now prints the played time, the remaining time and the total duration of the file in seconds and minutes. This is much more intuitive. The old sample-based format is kept and hidden behind the -s flag.
2022-01-14Utilities/aplay: Print format name under "Format"kleines Filmröllchen
This is not only nice to see, but it additionally tells developers that the correct loader plugin was selected.
2022-01-14hostname: Port to LibMainLucas CHOLLET
2022-01-14host: Port to LibMainLucas CHOLLET
2022-01-14hexdump: Port to LibMainLucas CHOLLET
2022-01-14head: Port to LibMainLucas CHOLLET
2022-01-14gunzip: Remove StringView assignment on rhs-valueLucas CHOLLET
2022-01-14gunzip: Port to LibMainLucas CHOLLET
2022-01-14grep: Port to LibMainLucas CHOLLET
2022-01-14gml-format: Port to LibMainLucas CHOLLET
2022-01-14false: Port to LibMainLucas CHOLLET
2022-01-14disasm: Port to LibMainLucas CHOLLET
2022-01-14Everywhere: Use my new serenityos.org e-mail :^)kleines Filmröllchen
2022-01-13LibELF: Accept Span instead of Pointer+Size in validate_program_headersIdan Horowitz
2022-01-13LibELF: Use StringBuilders instead of Strings for the interpreter pathIdan Horowitz
This is required for the Kernel's usage of LibELF, since Strings do not expose allocation failure.
2022-01-13js: Pretty-print the Intl.DisplayNames [[LanguageDisplay]] internal slotTimothy Flynn
2022-01-13LibIMAP+Userland: Convert LibIMAP::Client to the Serenity Stream APIssin-ack
You now cannot get an unconnected LibIMAP::Client, but you can still close it. This makes for a nicer API where we don't have a Client object in a limbo state between being constructed and being connected. This code still isn't as nice as it should be, as TLS::TLSv12 is still not a Core::Stream::Socket subclass, which would allow for consolidating most of the TLS/non-TLS code into a single implementation.
2022-01-13test-imap: Convert test-imap to LibMainsin-ack
2022-01-12Meta: Fix Markdown lintingkleines Filmröllchen
The new help://man links were linted incorrectly, and they're now skipped by the markdown linter, such as in the pre-commit hook
2022-01-11LibCore+flock: Make Core::System::waitpid more ergonomicJunior Rantila
2022-01-11Meta: Convert new help page link styles for the man page websitekleines Filmröllchen
The special URL links (help://man) and the application opening links now work on the man page website. While the page links are translated correctly, the application launch can't be implemented. For this reason, an explanatory error page is shown instead.
2022-01-09Userland: Port wasm to LibMainFederico Guerinoni
2022-01-09Userland: Port tac to LibMainFederico Guerinoni
2022-01-09beep: Port to LibMain :^)Junior Rantila
2022-01-09Everywhere: Add `serenity_dev_{makedev,major,minor}`Michel Hermier
Add them in `<Kernel/API/Device.h>` and use these to provides `{makedev,major,minor}` in `<sys/sysmacros.h>`. It aims to be more in line with other Unix implementations and avoid code duplication in user land.
2022-01-08LibJS: Convert Interpreter::run() to ThrowCompletionOr<Value>Linus Groh
Instead of making it a void function, checking for an exception, and then receiving the relevant result via VM::last_value(), we can consolidate all of this by using completions. This allows us to remove more uses of VM::exception(), and all uses of VM::last_value().
2022-01-08Kernel: Remove EWHYTHO error code :^)Andreas Kling
This error code was a hack for catching error handling mistakes in the kernel. It's no longer used anywhere.
2022-01-08gzip: Don't fail when trying to compress empty filesRummskartoffel
Given an empty file, gzip would try to create a zero-size memory mapping of that file, which would fail with EINVAL.
2022-01-08gzip: Port to LibMainRummskartoffel
2022-01-08jp: Use File::standard_input() when reading from stdinMarcus Nilsson
Trying to open '/dev/stdin' resulted in ENOENT. Instead use the standard_input() helper to get the File.
2022-01-08Userland: Introduce the pmemdump utilityLiav A
This utility helps to dump the physical memory space from /dev/mem. It supports both read(2) and mmap(2) on it so we could use mmap(2) for fast dumping of the memory, or read(2) when we need to read unaligned physical regions.
2022-01-08less: Fix crash on empty inputRummskartoffel
2022-01-07man: Fix error handling when section is specifiedJulian Eigmüller
Previously, man would only check if a path is not associated with a manpage when no section was specified via the command line. So `man gibberish` would fail with "no man page for gibberish", but `man 2 gibberish` would fail with a runtime error and still open a pipe to the pager leading to a nasty crash. Moving the check outside the "if (!section)" block fixes this. Also: if a section is specified, the error message now echoes it back (no manpage for foo in section bar).
2022-01-07Everywhere: Fix spelling mistakesmjz19910
2022-01-07run-tests: Make reproducing test failures behave closer to selftest modeBrian Gianforcaro
In CI / or local testing when you run `serenity.sh tests`, the system will boot itself in self test mode, and the test runner will be launched by SystemServer. Previously we were setting up settings for that environment in the `SystemServer.ini`. This makes reproducing CI failures a bit confusing, as the system will behavior differently if you run in self-test mode, vs running `run-tests-and-shutdown.sh` or `run-tests` manually in a session. This change moves the settings to `run-tests`, so no matter how you try to run the test runner, it will always behave the same.
2022-01-06du: Display true size of directory instead of 4 KiBLucas CHOLLET
For each directory, we now go through each file and sum-up the contents.
2022-01-06LibKeyboard: Change some Optional<T> returns to ErrorOr<T>RasmusNylander
Makes CharacterMapFile::load_from_file and CharacterMap::load_from_file return ErrorOr instead of Optional. This makes them a little nicer to use and a little easier to read, as they seem to have been approximating this.
2022-01-06Utilities/ln: Port to LibMainJun Zhang
This patch simply ports the utility ln to LibMain :^)
2022-01-06LibJS: Replace the custom unwind mechanism with completions :^)Linus Groh
This includes: - Parsing proper LabelledStatements with try_parse_labelled_statement() - Removing LabelableStatement - Implementing the LoopEvaluation semantics via loop_evaluation() in each IterationStatement subclass; and IterationStatement evaluation via {For,ForIn,ForOf,ForAwaitOf,While,DoWhile}Statement::execute() - Updating ReturnStatement, BreakStatement and ContinueStatement to return the appropriate completion types - Basically reimplementing TryStatement and SwitchStatement according to the spec, using completions - Honoring result completion types in AsyncBlockStart and OrdinaryCallEvaluateBody - Removing any uses of the VM unwind mechanism - most importantly, VM::throw_exception() now exclusively sets an exception and no longer triggers any unwinding mechanism. However, we already did a good job updating all of LibWeb and userland applications to not use it, and the few remaining uses elsewhere don't rely on unwinding AFAICT.
2022-01-04unzip: Remove useless .characters() callsmjz19910
2022-01-04Utilities/CMakeList: Remove duplicate target_link_libraries(...)mjz19910
2022-01-04Utilities/CMakeList: Sort target_link_libraries(...)mjz19910
2022-01-04js: Remove uses of TRY_OR_DISCARD()Linus Groh
Slightly more verbose, but that's the last user of TRY_OR_DISCARD gone!
2022-01-04ls: Fix duplicated error message when opening a directory failsMarco Cutecchia
2022-01-04stat: Print an error if 'stat' failsMarco Cutecchia
2022-01-05LibCrypto: Make `Digest`s able to return `bytes`Michel Hermier
2022-01-05checksum: Use `:hex-dump` to format `digest` valueMichel Hermier
2022-01-05checksum: Make name detection working even with a pathMichel Hermier