summaryrefslogtreecommitdiff
path: root/Userland/Utilities
AgeCommit message (Collapse)Author
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
2022-01-04unzip: Port to LibMainmjz19910
2022-01-04zip: Port to LibMain :^)mjz19910
2022-01-04profile: Specify the /proc/profile path in the help messageMathieu PATUREL
2022-01-04profile: Don't print anything when disabling profilingMathieu PATUREL
Just like when enabling profiling. Plus it's more unixy to not print anything on success
2022-01-04Userland: Resolve unused-but-set-varaible warningsAndrew Kaster
These are almost always bugs, so enable globally. Remove unused counter variables in SystemMonitor and disk_benchmark.
2022-01-04Userland: Fail Core::find_executable_in_path on empty inputsAndrew Kaster
Before this patch, `which ""` or `type ""` would say that the empty string is `/usr/local/bin/`. Convert callers to consistently call is_empty() on the returned string while we're at it, to support eventually removing the is_null() String state in the future.
2022-01-04wc: Port to LibMainmjz19910
2022-01-04which: Port to LibMainmjz19910
2022-01-04wsctl: Port to LibMainmjz19910
2022-01-04xargs: Port to LibMainmjz19910
2022-01-04yes: Port to LibMainmjz19910
2022-01-04uname: Port to LibMainmjz19910
2022-01-04uniq: Port to LibMainmjz19910
2022-01-04tar: Implement -C optioncircl
This allows specifying which directory to extract to or create from. I would have used the *at variants of the functions, but some weren't implemented yet.
2022-01-03LibJS: Return Optional<T> from Completion::{value,target}(), not TLinus Groh
In the end this is a nicer API than having separate has_{value,target}() and having to check those first, and then making another Optional from the unwrapped value: completion.has_value() ? completion.value() : Optional<Value> {} // ^^^^^^^^^^^^^^^^^^ // Implicit creation of non-empty Optional<Value> This way we need to unwrap the optional ourselves, but can easily pass it to something else as well. This is in anticipation of the AST using completions :^)
2022-01-02LibCore+id: Make more use of Core::System wrappers in Core::AccountAndreas Kling
2022-01-02rm: Check before removing '/'Lucas CHOLLET
A simple check to not erase '/' by mistake.
2022-01-02uptime: Port to LibMain :^)mjz19910
2022-01-01mkdir: Use FilePermissionsMask to handle mode optionXavier Defrang
2022-01-01chmod: Use FilePermissionsMask to handle mode argumentXavier Defrang
2022-01-01chown+chgrp: Add --no-dereference optioncircl
This option will change the ownership of the symlink rather than the file it points to.
2022-01-01fgrep: Port fgrep to LibMainKenneth Myhra
2022-01-01errno: Port to LibMainKenneth Myhra
2022-01-01du: Port to LibMainKenneth Myhra
This ports 'du' utility to LibMain. Also moves to use StringView and StringView literals more instead of raw C strings.
2021-12-30LibJS: Convert resolve_binding() to ThrowCompletionOrdavidot
The spec has a note stating that resolve binding will always return a reference whose [[ReferencedName]] field is name. However this is not correct as the underlying method GetIdentifierReference may throw on env.HasBinding(name) thus it can throw. However, there are some scenarios where it cannot throw because the reference is known to exist in that case we use MUST with a comment.
2021-12-30Utilities/lsusb: Propagate errors in JSON decodingcreator1creeper1
2021-12-30Utilities/arp: Propagate errors in JSON decodingcreator1creeper1
2021-12-30Utilities/netstat: Propagate errors in JSON decodingcreator1creeper1
2021-12-30Utilities/ifconfig: Propagate errors in JSON decodingcreator1creeper1
2021-12-30Utilities/notify: Propagate errors in Gfx::Bitmap loadingcreator1creeper1
2021-12-30Utilities/lsirq: Propagate errors in JSON decodingcreator1creeper1
2021-12-30Utilities/mount: Propagate errors in JSON decodingcreator1creeper1