some ops want an integer value instead of a pointer as arg parameter ( #15058 ).
http://pubs.opengroup.org/onlinepubs/9699919799/functions/ioctl.html clearly specifies that:
"The type of arg depends upon the particular control request, but it shall be either an
integer or a pointer to a device-specific data structure."
add a test for functions which should return ENOTTY as errno.
Change-Id: I4a98af73b17c79c3460123d3794ee866f8719898
Reviewed-on: https://review.haiku-os.org/c/1447
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
According to the HID Usage Tables document (Hut1_12.pdf), the In Range
usage is a Momentary Control (MC) (par. 16.3.1). A MC has a Logical
Minimum of 0 and a Logical Maximum of 1 (par. 3.4.1.3).
As the In Range usage is a bit quantity, the value can't be outside
the Logical Minimum and Maximum and therefore can't be in an invalid
state.
Now the inRange boolean value properly changes.
The pointer still moves to the upper left corner when the pen is out
of range, though. Maybe the input_server add-on doesn't use this value?
Change-Id: Idf511ac237158e90eb2e8f01422757655a7eea3a
Reviewed-on: https://review.haiku-os.org/c/1449
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
When the pen is moved out of range, the Wacom tablet sends one last
message with all values set to 0 and the In Range value set to false.
Don't send mouse event messages in this case.
Change-Id: I419d57cede47a6ef40a160322f3025ef372ecaa3
Reviewed-on: https://review.haiku-os.org/c/1448
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
Repository processing triggers HAIKU_REVISION computation, and it
is intended that the UserBuildConfig can override or set HAIKU_REVISION.
Fixes#14834.
Just does what the name says
Change-Id: I6cf23f997ce544df83d4ef2f73a3b130dea8825c
Reviewed-on: https://review.haiku-os.org/c/1432
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
Very simple for now, just reuses the Haiku one with some gradients
removed.
Add it to the haiku_extras package.
Change-Id: I41729ed65b147fed72bf56e7c5c89367b75563bb
Reviewed-on: https://review.haiku-os.org/c/1431
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
app_server just passes the add-on path around.
Maybe we should make sure the add-on can be loaded when setting it.
Change-Id: I3acd3299782a22c1666bd5435dbf3d8053e359fa
Reviewed-on: https://review.haiku-os.org/c/1430
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This makes the output much easier to read (e.g. "write(...)" vs.
"_kern_write(...)") and similar to strace/dtrace/etc. output
on other platforms.
Change-Id: Iac8e32aae0dcf3731a348c6192203f8d5b54da7a
Reviewed-on: https://review.haiku-os.org/c/1451
Reviewed-by: Bruno Albuquerque <bga@bug-br.org.br>
- Did not see his comments before pushing my previous change.
- clear owning flag when passed value is NULL.
Change-Id: I493973aff2b107785c3734847c85a52f0f9da360
Reviewed-on: https://review.haiku-os.org/c/1443
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Fixes#15056.
Change-Id: I48c00b955346971aa88b731ccad1953a4044983d
Reviewed-on: https://review.haiku-os.org/c/1442
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
- Keep track if the softc was allocated externally or not.
- Only try to deallocate it if it was allocated internally.
Do not try to free the softc if we were not the ones allocating it.
- Avoid a double free on consecutive calls to device_set_softc.
Change-Id: Ibb38e54e9dfd2a80dbb53920970bead626da8ba1
Reviewed-on: https://review.haiku-os.org/c/1441
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Since not everyone likes the default, make it an option in the vesa
settings file. Note setting a mode with the Screen prefs overwrites
the file so it will discard the option.
Also move the code to get_mode_from_settings() since we can't load driver
settings as early as vesa_init().
Change-Id: I93080bd1fbc064dab053624ad37935268b1ed17d
It is very, very rarely used, and is extremely wide on some locales
(i.e. almost 2x the width of the other buttons combined), making it
appear out of place. Now that it can be done from Debugger, having
it here does not seem to make a lot of sense.
As requested and discussed in #14777.
* mutex_destroy() only checked wether or not there were waiters,
not if the lock itself was presently held by another thread.
Now we do, which should make #15015 panic much earlier instead
of trying to use freed memory.
* mutex_transfer_lock() and recursive_lock_transfer_lock() did
not check that the calling thread actually owned the lock.
Now it does, which should trigger asserts if anyone tries
to do this.
We need to call pci_ram_address() on the whole address, not just the
lower 32 bits, and then store both components inside the PCI info
(previously we were leaving the high bits unset.)
Very few drivers bother to check if the address is 64-bit or not,
and for the most part they don't need to care, since the PCI bus
is at 0x0 physically and will pretty much never get anywhere near
4GB in size. But the XHCI driver read these, and so would get
bogus values for the high 32 bits, as we were never setting those.
Probably fixes#15040.
cache_io() did some bounds checking, but for uncached reads it was
entirely on the filesystem. Now we are more consistent: do all the
bounds checking for reads in the file cache, and do all bounds
checking for writes in the filesystems.
This makes sense as nearly all file systems were doing the exact
same logic for read() but of course all have different logic
for write(), due to block allocation, etc.
This potentially fixes#14993.
Change-Id: Iaf3e549001344cf375c7b8de549fc169d77bdbb2
Reviewed-on: https://review.haiku-os.org/c/1420
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This makes the behavior more standard, is still to be used with libroot_debug.so
for instance.
The old behavior is obtained with "LD_PRELOAD_ADDONS"; in fact a runtime_loader add-on
needs to be entirely loaded before the executable to be effective. To be used with
libltrace_stub.so for instance.
Change-Id: I8536c5b8873f975405bea9eb4e2b92febabfc78a
Reviewed-on: https://review.haiku-os.org/c/1409
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>