summaryrefslogtreecommitdiff
path: root/Userland/Utilities
AgeCommit message (Collapse)Author
2022-08-14Utilities/lsblk: Remove Interface Type columnLiav A
We are going to remove this slice of data from the SysFS later on, so lsblk must not try to read it.
2022-08-05LibJS: Let Shape store a Realm instead of a GlobalObjectAndreas Kling
This is a cautious first step towards being able to create JS objects before a global object has been instantiated.
2022-08-05LibWeb: Remove page_did_set_document_in_top_level_browsing_context()Andreas Kling
This PageClient callback was never used for anything.
2022-08-02wallpaper: Add pledge promisesnetworkException
2022-08-02Utilities+Base: Rename `pape` utility to `wallpaper`networkException
2022-08-01Userland+Base: Make the window titlebar font configurable separatelyAndreas Kling
Instead of defaulting to "bold variant of the system default font", let's allow the user to set any font they want as the titlebar font.
2022-07-28Utilities/lsusb: Allow the utility to work without existing USB IDs fileLiav A
In case we failed to open /res/usb.ids or the user requested to not use that file, we simply don't try to resolve the USB IDs and print them without any identification.
2022-07-27grep: Fix out of bounds StringView indexingMacDue
This is another case of out of bounds indexing exposed by 13406b8.
2022-07-27Everywhere: Make the codebase more architecture awareUndefine
2022-07-27less: Fix out of bounds StringView indexingMacDue
This fixes indexing the StringView before knowing if the index is valid. This did not crash until the changes from 13406b8 which added runtime checks for StringView indexing.
2022-07-25chown: Implement recursionTim Schumacher
2022-07-25chown: Add support for multiple file pathsTim Schumacher
2022-07-25ln: Implement correct handling of directories as link targetsTim Schumacher
2022-07-25ln: Rework to use LibCore syscall wrappersTim Schumacher
2022-07-25chmod: Implement the `--recursive` flagTim Schumacher
2022-07-25chmod: Port to ArgsParserTim Schumacher
2022-07-24du: Consolidate all "do not print" conditionsTim Schumacher
All of these conditions should make du just not report the file size individually, but it should still count them into the grand total. In the case of the `--threshold` option, this was actually implemented incorrectly before, as it would report size 0 for files that did not match the threshold.
2022-07-24du: Only use unmodified file sizes internallyTim Schumacher
This keeps us from repeatedly applying the block size calculation on already processed values.
2022-07-24du: Use 64-bit integers when handling file sizes or related valuesTim Schumacher
We may very well dip into files larger than 4G at some point, so 32-bit values are not enough, and the 64-bit sized `off_t` doesn't fully make sense either, as it features negative values. Instead, switch to the explicit type of `u64` everywhere, which is the same size on all platforms and is unsigned. The exception to this is the threshold, which needs to be signed instead of unsigned.
2022-07-24du: Fix a typo in the `--exclude-from` optionTim Schumacher
2022-07-24du: Don't stop descending even if the maximum depth is reachedTim Schumacher
The `--max-depth` option only controls until which depth individual file sizes are printed, it does not stop the utility from traversing that branch further (as the file sizes would be wrong otherwise). Restructure the program to track the current depth, and return early if the current depth is higher than the maximum allowed depth, which skips all parts of the logic that are concerned with user output.
2022-07-21Utilities+LibELF: Temporary promises for dynamic linker in "pledge"Itamar
This adds a "temporary promises for the dynamic-linker" flag ('-d') to the "pledge" utility. Example usage: pledge -d -p "stdio rpath" id Without the '-d' flag, id would crash because the dynamic linker requires 'prot_exec'. When this flag is used and the program to be run is dynamically linked, "pledge" adds promises that are required by the dynamic linker to the promise set provided by the user. The dynamic linker will later "give up" the pledge promises it no longer requires.
2022-07-21du: Implement the 1k block size short optionTim Schumacher
2022-07-21du: Invert apparent-size behaviourTim Schumacher
The apparent size is what `stat` says what we use. The non-apparent size is the blocks that we actually use on-disk.
2022-07-21du: Implement custom block sizesTim Schumacher
2022-07-21du: Replace home-grown block-based size calculation with `ceil_div`Tim Schumacher
2022-07-20js: Don't pass error strings as the format argument to outln()Ali Mohammad Pur
This fixes a crash when the error contains '{}', or an invalid format string.
2022-07-19LibAudio: Rename ConnectionFromClient to ConnectionToServerkleines Filmröllchen
The automatic nomenclature change for IPC sockets got this one wrong.
2022-07-19Utilities: Remove the edid-dump utilityLiav A
This short-lived utility was essential when we had to use the ioctl interface to fetch the EDID from a DisplayConnector, but now that we can simply read it from SysFS, this utility is no longer needed and can be removed.
2022-07-19Utilities/lspci: Don't unveil /res/pci.ids if not asked to resolve IDsLiav A
I tested the grub image under VirtualBox and it appeared that the image didn't have pci.ids file included in the /res directory. In that case it would be expected that lspci can still function correctly if the -n parameter is passed, but then the unveil syscall failed because the file didn't exist. To cope with this, we should allow lspci to work without the pci.ids file being present at the filesystem, so let's not unveil this file if the -n parameter is passed.
2022-07-19LibC: Remove the `LibPthread` interface targetTim Schumacher
2022-07-19headless-browser: Simplify the arguments used to select resourcesDexesTTP
We can just infer the favicon, fonts and palette from the location of the /res folder, no need to ask each of the resources one by one.
2022-07-19headless-browser: Split the setters for the screen and the viewport rectDexesTTP
These two represent different things, and should be handled by different methods.
2022-07-19headless-browser: Use port 443 as default for HTTPS requestsDexesTTP
2022-07-15Userland: Introduce the lsblk utility to show list of storage devicesLiav A
2022-07-14Utilities: Add "pledge" utility for launching a sandboxed commandAndreas Kling
This new command allows you to run any command with an initial set of pledge promises. Note that dynamically linked executables won't be able to bootstrap without at least "stdio rpath prot_exec". Inspired by http://justine.lol/pledge/ :^)
2022-07-14cp: Implement the granular `--preserve` flagTim Schumacher
2022-07-14LibCore: Make copying permissions, ownership and timestamps combineableTim Schumacher
2022-07-14LibCore: Replace the ArgsParser option argument setting with an enumTim Schumacher
Replacement conditions for `requires_argument` have been chosen based on what would be most convenient for implementing an eventual optional argument mode.
2022-07-13LibJS+js: Parse new constructor options from Intl.NumberFormat V3Timothy Flynn
This contains minimal changes to parse newly added and modified options from the Intl.NumberFormat V3 proposal, while maintaining main spec behavior in Intl.NumberFormat.prototype.format. The parsed options are reflected only in Intl.NumberFormat.prototype.resolvedOptions and the js REPL.
2022-07-12AK+Userland+Tests: Remove URL(char const*) constructorsin-ack
The StringView(char const*) constructor is being removed, and there was only a few users of this left, which are also cleaned up in this commit.
2022-07-12Everywhere: Use default StringView constructor over nullptrsin-ack
While null StringViews are just as bad, these prevent the removal of StringView(char const*) as that constructor accepts a nullptr. No functional changes.
2022-07-12Everywhere: Replace single-char StringView op. arguments with charssin-ack
This prevents us from needing a sv suffix, and potentially reduces the need to run generic code for a single character (as contains, starts_with, ends_with etc. for a char will be just a length and equality check). No functional changes.
2022-07-12Everywhere: Add sv suffix to strings relying on StringView(char const*)sin-ack
Each of these strings would previously rely on StringView's char const* constructor overload, which would call __builtin_strlen on the string. Since we now have operator ""sv, we can replace these with much simpler versions. This opens the door to being able to remove StringView(char const*). No functional changes.
2022-07-12Everywhere: Split Error::from_string_literal and Error::from_string_viewsin-ack
Error::from_string_literal now takes direct char const*s, while Error::from_string_view does what Error::from_string_literal used to do: taking StringViews. This change will remove the need to insert `sv` after error strings when returning string literal errors once StringView(char const*) is removed. No functional changes.
2022-07-12Everywhere: Explicitly specify the size in StringView constructorssin-ack
This commit moves the length calculations out to be directly on the StringView users. This is an important step towards the goal of removing StringView(char const*), as it moves the responsibility of calculating the size of the string to the user of the StringView (which will prevent naive uses causing OOB access).
2022-07-12Userland: Remove erroneous String -> char* -> StringView conversionssin-ack
These were accidental (or leftover) uses of String::characters() to construct StringViews through its StringView(char const*) constructor. Since this constructor is due to be removed, this will no longer work. Plus this prevents strlen from being run on these strings unnecessarily.
2022-07-12Userland: Convert command line arguments to String/StringViewsin-ack
StringView was used where possible. Some utilities still use libc functions which expect null-terminated strings, so String objects were used there instead.
2022-07-10js: Add missing built-in functions to help() outputLinus Groh
2022-07-10js: Remove load() built-in functionLinus Groh
This is no longer needed now that we have ES modules.