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.
The documentation tooltip and parameters hint tooltip initialization
functions are now fallible and now call try_set_main_widget
instead of set_main_widget. They are only called by Editor's new
custom try_create function.
build_process_window now uses try_set_main_widget and might return an
error. process_properties_action handles a possible error by simply
not updating the process window if an error occured while building it.
Briefly flash the menubar menu containing the keyboard shortcut action
to give the user immediate visual feedback on their interaction with the
system.
Pressing the F2 key on files that the user doesn't have permission was
opening the file name for editing.
This patch fixes the issue disabling the file name editing when the user
doesn't have permission to do it.
To reproduce the issue:
1) Open the File Manager
2) Click on the /etc directory
3) Select any file
4) Press the F2 key
5) Update the file name
Not all drivers need the PhysicalPage output parameter while creating
a DMA buffer. This overload will avoid creating a temporary variable
for the caller
The cacheable parameter to allocate_kernel_region should be explicitly
set to No as this region is used to do physical memory transfers. Even
though most architectures ignore this even if it is set, it is better
to make this explicit.
Previously, we would clear it if there was still an editor open. This
was not obvious because it was only visible when an inactive tab was
closed, since closing an active tab would trigger an editor change
which would re-fill the layers widget.
This allows us to request any specific editor to close itself. Earlier,
this could only be done for the currently active editor, so trying to
close inactive tabs would not work properly.
Previously the save logic was hardcoded to only work for the active
editor, so closing editors in the background would not properly
handle the unsaved changes. This patch brings us closer to be able
to fix that problem.
This makes editing much easier, e.g. you don't need longer to copy
hundreds of glyphs one by one.
It has some flaws, e.g. it's not integrated with undo stack,
but we need to start with something!
This commit makes FontEditor displaying emojis in GlyphMapWidget. They
are not editable, what is marked by red background of a glyph.
Additionally, a proper information is displayed in statusbar.
Fixes#10900.
Two classes are added - HostBridge and MemoryBackedHostBridge, which
both derive from HostController class. This allows the kernel to map
different busses from different PCI domains in the same time. Each
HostController implementation doesn't take the Address object to address
PCI devices but instead we take distinct numbers of the PCI bus, device
and function as it allows us to specify arbitrary PCI domains in the
Address structure and still to get the correct PCI devices. This also
matches the hardware behavior of PCI domains - the host bridge merely
takes memory operations or IO operations and translates them to
addressing of three components - PCI bus, device and function.
These changes also greatly simplify how enumeration of Host Bridges work
now - scanning of the hardware depends on what the Host bridges can do
for us, so in case we have multiple host bridges that expose a memory
mapped region or IO ports to access PCI configuration space, we simply
let the code of the host bridge to figure out how to fetch data for us.
Another semantical change is that a PCI domain structure is no longer
attached to a PhysicalAddress, so even in the case that the machine
doesn't implement PCI domains, we still treat that machine to contain 1
PCI domain to treat that one host bridge in the same way, like with a
machine with one or more PCI domains.
`length` was inheriting `size_t` type of the `String::length()`, while
everywhere else in the Inspector we expect fixed 32-bit field. On the
architectures where `sizeof(size_t) != sizeof(u32)` this broke the
Inspector communication completely.
This commit fixes an issue where zero-alignment would lead to the
requested range being allocated outside of the total available range,
hitting an assert in RangeAllocator::allocate_anywhere().
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().
FixedArray now doesn't expose any infallible constructors anymore.
Rather, it exposes fallible methods. Therefore, it can be used for
OOM-safe code.
This commit also converts the rest of the system to use the new API.
However, as an example, VMObject can't take advantage of this yet,
as we would have to endow VMObject with a fallible static
construction method, which would require a very fundamental change
to VMObject's whole inheritance hierarchy.
When writing into a block via an O_DIRECT open file description, we
would first flush every dirty block *except* the one we're about to
write into.
The purpose of flushing is to ensure coherency when mixing direct and
indirect accesses to the same file. This patch fixes the issue by only
flushing the affected block.
Our behavior was totally backwards and could end up doing a lot of
unnecessary work while avoiding the work that actually mattered.
Since this function always returns a CacheEntry& (after potentially
evicting someone else to make room), let's call it "ensure" instead of
"get" to match how we usually use these terms.
These checks were added because macOS doesn't have `shadow.h`, so we
would end up including our own LibC's `shadow.h` when we built Lagom.
All inclusions of this header in our code base are now guarded by
`#ifndef AK_OS_BSD_GENERIC`, so these checks are now pointless.