They are not HID devices as they need special polling and interpreting. As
a result only descriptor is shared with other i2c HID devices. So it's easier
to have it as a separate driver.
Partially based on FreeBSD ietp driver
Change-Id: Iddc64d216eefeda235a1b15521cba9189dd2ffd8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6660
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
* Turns PathContainer, ShapeContainer, StyleContainer into Container.
* Makes Shape use Container for storing Tansformers instead of
reinventing the wheel yet again.
* Moves common logic from AddPathsCommand, AddStylesCommand,
AddShapesCommand, and AddTransformersCommand to AddCommand.
* Factors out common logic from two more commands similar to above.
This adds the MoveCommand and RemoveCommand classes.
* Cleans up some code style.
Change-Id: I59eca94a1c45eac608514f269f6e5f8628f93fab
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6640
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
ASID allocation is not supported yet, so always use ASID 0 for user pages for now.
Change-Id: I021e77dae692c22984bc625dd0588362bece45b7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6698
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
The old TTY driver did this, but it was not properly carried
over into this new driver.
Fixes the first part of #18488: the child bash process from the
first session is properly closed, but the TTY state isn't reset
and there can still be stale things left in its buffer, it appears.
Make Haiku headers a bit more friendly to binding generators by:
- Giving some `enum`s names (especially those that appear in
default arguments).
- Converting an internal `inline` function into a macro so that
the result could be evaluated in compile time.
Change-Id: I770674ad8fa7b24ac30b6b447d52a4b4c2530b8a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6716
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* In case the dropped file is a symlink, attach the actual file instead.
* Don't add a file, if it's already in the list of attachments.
* Add file size in brackets after the filename in the list of attacments.
* Add some spacing before the "Attachments" label.
* Consistently use "attachment" instead of the mixed in "enclosure".
"Attachment" also seems a more common term for this.
Change-Id: Id36d900216ce25c96ac1815889b8c7b6ec0e5f2c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6699
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Currently only files dropped on the mail contents view are added as
attachments. Since dropped text files get inserted into the contents,
it only worked for non-text files.
With this change, the header area and the empty space of the tool bar
react to file drops as well.
* Accept dropped files on the whole window area
* Forward dropped files on the address text controls to the
main window (if they aren't people files)
Change-Id: Ia92f1e34aaf98a3089b318947668f3df41af00ce
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6697
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
gcc 13 is confused by the custom bitset implementation, so use the C++
standard one instead.
However, this results in including the C++ <string> header in kernel
code. This doesn't work for gcc2, because of two problems:
- That header includes a declaration of atomic_add that doesn't match
the one in SupportsDefs.h (which can in some cases replace the function
with a #define for an inline version). Adjust the header to use the
be a problem because it creates a risk of circular inclusions.
Standard C++ headers shouldn't depend on BeAPI ones.
- It also leads to the inclusion of iostream which defined lock and
unlock functions in the global namespace. We don't want these, and they
are not part of the C++ standard, so just remove them.
Ideally we could use std::hash for the GetHashCode implementation, but
that doesn't work because it depends on an helper function that's in
libstdc++, and we can't link that from kernel add-ons.
Change-Id: Iee07280beb4dddf7a9b6160e37f3b816e4de89ae
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6663
Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
This is the test for #7859, the problem now is just that the SIGCHLD
signal is delivered before the file descriptor close event wakes up the
poll().
Change-Id: Iddf96e2830d5c7496ec3c6bd27cc235c5ce9d7d4
`socketpair` should skip the `listen` and `accept` step for
non-stream sockets. This allows the implementation to work for
UNIX domain datagram sockets.
Change-Id: I81ba826d605b77be5a4ec9046ea4c6bd556a35a0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6618
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Since the menu item says "Settings..." the window title should
use the same.
Change-Id: Iec3ff51f2b78eb0f3ffe63814b99a053c898d37b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6666
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reading a tty that's closed by the other side will return an end of file
error, but will not block.
Fixes#18486.
Change-Id: I8441becdcc8c83c08611684fa0a29216e9d04ec8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6665
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
* Added two beep events ("Low battery" and "Battery charged") to Sounds
* "Battery charged" is activated when the battery is fully charged to 100 percent
* "Low battery" is activated when the battery is less than 15 percent
or has less than 30 minutes of usage time left, whichever comes first
Change-Id: If95f812be7a0aa15d668a42fdcfaccd2995d2b4f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6481
Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
We still have "unzip" for some parts of the build involving attributes,
but "zip" we no longer have in-tree, so remove these last bits of it.
Fixes#18476.
It seems there has been a bug lurking for years that this exposed.
Rather than inconvenience users further, as it's not especially
hard to trigger, let's down-grade it into a message until it can
be properly investigated and fixed.
Related to #18451.
Previously this just turned the rw_lock into the equivalent of a
recursive_lock, which meant that reader vs. writer assertions
were of no use.
Now, we have a per-thread static array which stores the held read
locks, allowing ASSERT_READ_LOCKED_RW_LOCK to work properly,
and allowing multiple readers to be active at a time.
This probably should still remain disabled even on nightly builds,
but at least it's much more useful as a debugging tool than it was
beforehand.
Change-Id: I386b2bc2ada8df42f4ab11a05563ef22af58e77f
GCC 13 warns that the item could be initialized. From looking at the code, it
could very well be that the log message contained garbage. At least clear the
data before sending it out.
Change-Id: Id02bf314d0c02f852748bdac9cef010ebf073994
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6654
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
The module includes the C-style header file, thus all members are added in the
global namespace.
Change-Id: I5e82c8520b0495e3c437c43cfeea9cc454d39482
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6653
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
GCC 13 warns that this member could be unitialized. Now it is initialized
explicitly before it is used anywhere else.
Change-Id: Ia8d5e95cc247921c6ee240a106a80d73c54caee4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6652
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
The C++ standard in rule 3.3.7[basic.scope.class] determines how the compiler
should handle cases where a member shares the name of a type. It is up to the
compiler whether this requires a diagnostic warning. GCC 13 emits a warning
(changes-meaning). This fixes the issuing of this warning.
Change-Id: I9c58c0dd6298055959154f78d47ad9088e8225dc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6651
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
GCC 13 warns that the a pointer is taken from a member that according to the
rules is not yet initialized. Fix the declaration and order of initialization
to prevent us depending on undefined behavior.
Change-Id: Iab4644c33a3a286e083450da0b3575acfe284f29
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6650
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Just in case, adjust the buffer to format an int32 to a string as the maximum
length that it could be.
Change-Id: I00aede3f684211f9c860455063244422be1d0ee9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6649
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
With GCC13 the current code and its use of the `realloc` function triggers a
potential use after free warning. The code is most likely correct, but there
may be a bug in GCC13's use after free checking, or this is one of the cases
where it is not possible to accurately detect if there is really a chance that
it is used after free.
This rewrites the code in such a way that the warning is no longer triggered.
No functional change intended.
Change-Id: I85e145de2128d4b12a9b3016de33d9facaf0d758
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6648
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
In C++20 `requires` is a reserved keyword. GCC13 warns against its use. This
change removes the use of the keyword in our own code, and ignores it in the
external 'libsolv' code.
Change-Id: I3319d20c0a3fdad89630683cdff5ea3b17f04e99
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6647
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
GCC 13 is more strict about what C++ features are available in a freestanding
(= build without standard library) build. The `stdlib.h` and `math.h` headers
are redefined as part of libstdc++. If the object is built as freestanding, it
should be assumed that none of the standard library functions are available.
The solution in Haiku has been to add part of the standard library into the
kernel shared object. The method of exposing them has been to allow the
use of `stdlib.h` and `math.h` in the kernel and in kernel add-ons.
This change allows that approach to continue. What it does, is that it defines
specific headers which will be picked up when a module is built using private
kernel headers. When building for the kernel (or for the boot module), it will
bypass GCC 13's libstdc++ default behaviour of not including the POSIX/platform
header with all the function definitions.
An alternative to be considered for the longer term is to specifically define
the parts of the C/C++ standard library that is available in the kernel in
these headers, or create custom headers when building kernel modules (which is
how Linux approaches it).
Change-Id: Icab4614f642219fa77732b02401570708ee9a963
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6645
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
The query bin command is already added earlier in the file, and does not
actually require to be linked against localestub. Removing the duplicate, as
it caused all the include directives to gcc to be duplicated, which caused
trouble in gcc2 when using #include_next directives.
Similarly, urlwrapper.cpp is a duplicate entry and does not actually require
libbnetapi.so.
The clockconfig tool has moved to the launch daemon in c16361c4.
Change-Id: I266ada433448a96bee8de325133a548f0985da59
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6661
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
GCC 13 warns that the use of auto_ptr on an array can lead to undefined
behavior, because auto_ptr will use `delete` instead of `delete[]`.
Replaced the use with `std::vector` instead. Since the `data()` member was only
introduced in C++11, the solution uses the [] operator instead to get the
address of the beginning of the array.
Change-Id: Ib457580eedb03338a454fb96b27602c3830c1634
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6644
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
GCC's overflow checker gives a warning about the potential that the atomic
functions called in teams.cpp and threads.cpp will write to a null-pointer.
In this case, it is safe to assume that the values will never be null,
therefore these warnings can be safely ignored.
Relates to/fixes #17734
Change-Id: I777ff96f2812ed7d3ba57a46cad89ef6994cb08f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6643
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Chromebook elemi has no touchscreen but coreboot still declares one in ACPI
tables. Fail gracefully rather than hard crash
Change-Id: I3bad098e7c7887e86669143c0ccec5b46b1428d4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6659
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Currently internal keyboard is not detected. Turns out
that reset sequence doesn't respond in expected way. Comparing with
Linux implementation, it doesn't check the return value of reset command but
compensates it by checking get_device_id and set_leds. Try reset test if it
doesn't work check ID
Change-Id: I5506f69a7083ab8ea6c936c8016fd59311a16368
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6610
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>