Jesse Buhagiar
01cd474930
Userland/Libraries: Add LibUSBDB library
...
Simple clone of LibPCIDB to support USB IDs instead of PCI
ones. The format is basically identical, besides a few changes
of the double tab fields.
2021-06-18 17:04:57 +04:30
Jesse Buhagiar
119b8a2692
Userland: Add lsusb
:^)
2021-06-18 17:04:57 +04:30
Jesse Buhagiar
f2ff55dd09
Kernel: Add /proc/bus/usb to store information about connected devices
2021-06-18 17:04:57 +04:30
Jesse Buhagiar
71c9572e74
USB: Store device descriptor on enumeration
...
We now store the device descriptor obtained from the device
during enumeration in the device's object in memory instead
of exposing all of the different members contained within it.
2021-06-18 17:04:57 +04:30
Jesse Buhagiar
7b42146f33
USB: Store devices in globally accessible array
...
USB Devices are now stored so that they may be later retrieved and
operated on (i.e, fetching their assigned device address via
ProcFS)
2021-06-18 17:04:57 +04:30
Sam Atkins
0e680cb17a
Meta: Ensure long messages fit in commit tweet
...
Abbreviating the commit message to 240 characters was not always enough.
As a bonus, we now add an ellipsis to abbreviated messages.
2021-06-18 13:34:17 +01:00
Gunnar Beutner
22b0cbe1fe
Kernel: Fix crash when changing screen resolution
...
Steps to reproduce:
1. Change resolution to 640x480.
2. Change resolution to 1280x1024.
3. Observe the following kernel panic:
Kernel::__panic(char const*, unsigned int, char const*) +0x55
Kernel::handle_crash(Kernel::RegisterState&, char const*, ...) +0x112
page_fault_handler +0x1130
page_fault_asm_entry +0x26
Kernel::VirtualConsole::refresh_after_resolution_change() +0x35e4
Kernel::ConsoleManagement::resolution_was_changed() +0x38b
Kernel::Graphics::FramebufferConsole::set_resolution(...) +0x3e1
Kernel::BochsGraphicsAdapter::try_to_set_resolution(...) +0x319
.L4213 +0x40a
Kernel::Process::sys$ioctl(int, unsigned int, unsigned int) +0x2fa
Kernel::Syscall::handle(Kernel::RegisterState&, ...) +0xfdc
syscall_handler +0x19c0
Kernel::syscall_asm_entry_dummy() +0x31
2021-06-18 13:45:21 +02:00
Luke
02de3cbce3
LibJS: Add Number.parseInt
...
This is initialized to be the same function object as the initial value
of the parseInt function on the global object.
2021-06-18 10:29:33 +01:00
Idan Horowitz
b6a74b6bd9
LibJS: Use existing attributes if any are missing in the new descriptor
...
The specification defines that we should only change attributes that
exist in the incoming descriptor, but since we currently just overwrite
the existing descriptor with the new one, we can just set the missing
attributes to the existing values manually.
2021-06-18 10:22:09 +02:00
Luke
50f33bb98e
LibJS: Add missing exception check in Date.prototype.toJSON
...
It was missing an exception check on the call to to_primitive.
This fixes test/built-ins/Date/prototype/toJSON/called-as-function.js
from test262 crashing, but does not fix the test itself.
2021-06-18 10:21:29 +02:00
Stéphane Travostino
35e7c44dd4
Documentation/WSL: add a workaround for slow emulation on HiDPI screens
2021-06-18 10:21:09 +02:00
Marco Cutecchia
24c243942d
Browser: Add setting to change homepage URL
2021-06-18 10:20:24 +02:00
Gavin Downard
3c6d99f696
Ports: Fix less by disabling wctype
...
The commit c2b47c067
(LibC: Add stubs for wctype and iswctype,
2021-05-27) introduced the wctype.h header, which caused the less port
to try to build with wchar support. This patches the header generated by
the configure script to remove wchar support.
2021-06-18 10:19:00 +02:00
Kyle Ambroff-Kao
d173945dad
Tests: Add a test for ProcFS fd interaction
...
Co-authored-by: Tim Schumacher <timschumi@gmx.de>
2021-06-18 10:15:14 +02:00
Tim Schumacher
9559ac9dd6
Kernel: Correctly decode proc_file_type from identifier
...
inode identifiers in ProcFS are encoded in a way that the parent ID is
shifted 12 bits to the left and the PID is shifted by 16 bits. This
means that the rightmost 12 bits are reserved for the file type or the
fd.
Since the to_fd and to_proc_file_type decoders only decoded the
rightmost 8 bits, decoded values would wrap around beyond values of 255,
resulting in a different value compared to what was originally encoded.
2021-06-18 10:15:14 +02:00
Jean-Baptiste Boric
8cd96f031d
Kernel: Fix CPUID usage inside cpu_detect()
...
Since no features inside the 0x80000001 leaf are required for
SerenityOS to work, don't assert if it's unavailable.
2021-06-18 01:02:25 +02:00
Jean-Baptiste Boric
fb3447f7ec
Kernel: Use FXSR feature only if supported by CPU
...
If FXSR is not present, fall back to fnsave and frstor instructions.
These instructions aren't available on the canonical i686 CPU which is
the Pentium Pro processor.
2021-06-18 01:02:25 +02:00
Jean-Baptiste Boric
fea23d0ec1
Kernel: Detect support for CPUID FXSR
...
The fxsave and fxrstor instructions are available only if the FXSR
feature is present.
2021-06-18 01:02:25 +02:00
Elliot Maisl
90873781c1
PixelPaint: Add new selection moving modes
...
If you press "spacebar" while moving a selection, it will now move the
origin point of the selection; and if you press "control" it will move
it relatively to the center.
2021-06-17 23:02:53 +02:00
sin-ack
e2215cc0e1
Lagom: Add an install target
...
This is used by libjs-test262-runner to be able to copy the libraries
within its own build directory in order to link with them.
2021-06-17 21:20:24 +01:00
brapru
c62804df46
passwd: Do not allow empty passwords
...
The user should use the delete flag when wanting to issue an empty
password. passwd should return an error after receiving empty input.
2021-06-17 19:54:38 +02:00
brapru
1a9d0dee2c
passwd: Provide more verbose output regarding status of changed passwd
...
passwd should explicitly indicate the status of the password change.
2021-06-17 19:54:38 +02:00
brapru
4fd842f566
passwd: Retype password to confirm
...
Previously passwd would accept the first password input by the user. It
should ask the user to re-type the password to check for mismatches and
prevent typos in the password.
2021-06-17 19:54:38 +02:00
brapru
b0f8bccd08
passwd: Prompt for the current password before setting new password
...
This changes passwd to authenticate non-root users before prompting for
new password.
2021-06-17 19:54:38 +02:00
Erik Sommer
96588adbd4
PixelPaint: Update debug message in the copy action to the used method ( #8113 )
2021-06-17 19:53:45 +02:00
Gunnar Beutner
58c182b19e
Kernel: Update check in Inode::read_entire
...
The nread variable can't be less than zero anymore.
2021-06-17 19:52:54 +02:00
Gunnar Beutner
bf779e182e
Kernel: Remove obsolete size_t casts
2021-06-17 19:52:54 +02:00
Gunnar Beutner
9b14a8605a
Kernel: Add a VERIFY() to make sure our DMA address is valid
...
This checks whether the address we're trying to use for DMA is low
enough so as not to overflow the I/O register.
2021-06-17 19:52:13 +02:00
Gunnar Beutner
017c5fc7d9
Kernel: Move super_pages section into the bottom 16MB
...
This ensures that pages returned by
MM.allocate_supervisor_physical_page() have a physical address that
is in the bottom 16MB and can thus be used by the SB16 driver for DMA.
Fixes #8092 .
2021-06-17 19:52:13 +02:00
Gunnar Beutner
b007898c35
Kernel: Make sure the kernel is re-linked when the linker script changes
2021-06-17 19:52:13 +02:00
Gunnar Beutner
67c2d39422
Kernel: Fix incorrect argument name
2021-06-17 19:52:13 +02:00
Idan Horowitz
cc5c1df64b
LibJS: Add the TypedArray.of() method
2021-06-17 18:13:20 +01:00
Liav A
b91df26d4a
Kernel/Interrupts: Return boolean on whether we handled the interrupt
...
If we are in a shared interrupt handler, the called handlers might
indicate it was not their interrupt, so we should not increment the
call counter of these handlers.
2021-06-17 16:53:25 +02:00
Liav A
7a6d5a7b8b
Kernel/VirtIO: Indicate we handling unknown interrupt early when called
2021-06-17 16:53:25 +02:00
Liav A
c802b1a363
Kernel/Interrupts: Add sensible purposes to VirtIO and USB devices
...
When we enumerate the interrupt handlers, it's a good idea to show a
meaningful name to the user instead of "IRQ Handler".
2021-06-17 16:53:25 +02:00
Liav A
030999d269
Kernel/Interrupts: Enumerate nested handlers in a shared handler
...
When asked to enumerate all interrupt handlers, display all shared
handlers within it instead of just returning the responsible handler of
them.
2021-06-17 16:53:25 +02:00
Idan Horowitz
dcb55db99b
LibJS: Replace boolean without_side_effects parameters with an enum
2021-06-17 16:52:15 +02:00
Idan Horowitz
864beb0bd5
LibJS: Remove the unused IndexedProperties::append_all method
2021-06-17 16:52:15 +02:00
stelar7
22851287b1
Spreadsheet: Pledge 'fattr' to avoid crashing after exporting as csv
2021-06-17 18:49:44 +04:30
Ali Mohammad Pur
ac6a3d068d
AK: Add some tests for hexdump formatting
2021-06-17 18:44:00 +04:30
Ali Mohammad Pur
2fe9c81b30
Everywhere: Replace the multiple impls of print_buffer() with :hex-dump
2021-06-17 18:44:00 +04:30
Ali Mohammad Pur
7eda164c25
AK: Add a :hex-dump mode to AK::Format
...
This will just hexdump the given value.
Note that not all formatters respect this, the ones that do are:
- (Readonly)Bytes: formatter added in this commit
- StringView / char const*
- integral types
2021-06-17 18:44:00 +04:30
sin-ack
10f56166e5
LibJS: Cast to i64 for is_integral_number
...
This fixes the built-ins/Number/isInteger/integers.js test.
9007199254740991 is still an integer, though not a safe one.
2021-06-17 13:44:01 +01:00
Idan Horowitz
a85a95fe8d
LibJS: Stop overwriting existing accessors in Object::define_property
2021-06-17 13:20:18 +01:00
Idan Horowitz
1cf5663e38
LibJS: Add the Object.prototype.__lookup{Getter, Setter}__ methods
...
These are a part of the Annex B extension of the specification.
2021-06-17 13:20:18 +01:00
Idan Horowitz
f98c0ca528
LibJS: Add the Object.prototype.__define{Getter, Setter}__ methods
...
These are a part of the Annex B extension of the specification.
2021-06-17 13:20:18 +01:00
Idan Horowitz
37340aa599
LibJS: Add the Object.prototype.__proto__ native accessor property
...
This is part of the Annex B extension of the specification.
2021-06-17 13:20:18 +01:00
Linus Groh
d1c109be96
LibJS: Fix .length attributes of various native functions
...
Namely the Proxy revocation, Promise resolving, Promise then/catch
finally, and Promise GetCapabilitiesExecutor functions.
They were all missing an explicit 'Attribute::Configurable' argument
and therefore incorrectly used the default attributes (writable,
enumerable, configurable).
2021-06-17 13:10:06 +01:00
Gunnar Beutner
631d36fd98
Everywhere: Add component declarations
...
This adds component declarations so that users can select to not build
certain parts of the OS.
2021-06-17 11:03:51 +02:00
Gunnar Beutner
6e094b8dbe
Meta: Increase additional space for disk images
...
Previously we'd add 100MB on top of what du returned for the Root
directory. This increases that to 500MB.
2021-06-17 11:03:51 +02:00