Age | Commit message (Collapse) | Author |
|
We are going to remove this slice of data from the SysFS later on, so
lsblk must not try to read it.
|
|
This is a cautious first step towards being able to create JS objects
before a global object has been instantiated.
|
|
This PageClient callback was never used for anything.
|
|
|
|
|
|
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.
|
|
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.
|
|
This is another case of out of bounds indexing exposed by 13406b8.
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
This keeps us from repeatedly applying the block size calculation on
already processed values.
|
|
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.
|
|
|
|
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.
|
|
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.
|
|
|
|
The apparent size is what `stat` says what we use. The non-apparent size
is the blocks that we actually use on-disk.
|
|
|
|
|
|
This fixes a crash when the error contains '{}', or an invalid format
string.
|
|
The automatic nomenclature change for IPC sockets got this one wrong.
|
|
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.
|
|
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.
|
|
|
|
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.
|
|
These two represent different things, and should be handled by different
methods.
|
|
|
|
|
|
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/ :^)
|
|
|
|
|
|
Replacement conditions for `requires_argument` have been chosen based
on what would be most convenient for implementing an eventual optional
argument mode.
|
|
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.
|
|
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.
|
|
While null StringViews are just as bad, these prevent the removal of
StringView(char const*) as that constructor accepts a nullptr.
No functional changes.
|
|
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.
|
|
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.
|
|
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.
|
|
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).
|
|
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.
|
|
StringView was used where possible. Some utilities still use libc
functions which expect null-terminated strings, so String objects were
used there instead.
|
|
|
|
This is no longer needed now that we have ES modules.
|