Commit Graph

65426 Commits

Author SHA1 Message Date
PulkoMandy
69657d9d4f ACPI: remove unused-but-set variable
Change-Id: I8095cb13c51c3891cc36dca1b7667041cb6c9df0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6711
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2023-07-24 18:13:52 +00:00
PulkoMandy
45311bd6f9 usb_rndis: synchronize writes
The write function can be called concurrently by multiple threads. The
way it is implemented now means this desn't work, since there is no
guarantee the correct thread will be released from the semaphore by the
USB completion callback.

I tried to allow mutiple requests to run "in parallel" (really letting
the USB stack schedule them) by having he callback track which thread to
wake up (using send_message/receive_message as a synchronization tool)
but that still resulted in lockups.

The simplest solution is to ensure there is only a single thread doing a
write transaction at a time, which is achieved here with an extra mutex.

Fixes #18521.

Change-Id: I0b737acab6f5665cbe5b0e40a20ce99c16bdf21c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6707
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2023-07-24 14:47:23 +00:00
Niels Sascha Reedijk
fef51dedd8 mail_daemon: warn about unused return value
GCC 13 warns that using the `begin()` method on a container is marked as
`[[nodiscard]]`. This makes sure that this warning is not treated as an error.

The code actually looks like it does not do much if anything of use. As a
follow-up ticket #18478 is raised.

Change-Id: Ie149f7e02cacda2bcd0be59617583605d5905747
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6655
Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-07-23 16:48:21 +00:00
Autocomitter
26bda37ca5 Update translations from Pootle 2023-07-22 08:20:18 +00:00
Humdinger
a4e4beafe5 IOM: Localization/String improvements
* Switching mis-used B_TRANSLATE_CONTEXT to B_TRANSLATE_COMMENT
* Use B_TRANSLATE_SYSTEM_NAME for "Icon-O-Matic"
* Remove remnants of old localization system
* Rename "Control Points" to vertex/vertices
* Add a ":" after Undo/Redo
* Sentence casing
* Avoid Yes/No buttons in BAlert

Change-Id: Ibb299925bce1f6ca1cf03216a36df7c44f10bdc6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6704
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-07-21 20:07:46 +00:00
Jérôme Duval
18d6122240 Terminal: support for underline color and styles
the text is now printed above the underline.

Change-Id: I1a3a7713bf514830106532e1534793e0fe158bc2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6706
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-07-21 18:12:41 +00:00
Zardshard
c5abd6a796 libicon: Notify Shape on transformer addition/removal
hrev57144 accidentally made Shape be notified only if the library was
compiled for Icon-O-Matic.
Also includes some miscellanious improvements.

Fixes #18510

Change-Id: Ie4ae7f9b8b1a5b39f87db2dbf79064fa875b644c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6705
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-07-19 18:04:23 +00:00
Trung Nguyen
b7b57869e8 unix: Implement datagram sockets
Implement `SOCK_DGRAM` sockets for `AF_UNIX` family.

Change-Id: If3d6f408a7d881635ccf04b080391905fdc94b13
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6617
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-07-19 17:16:16 +00:00
PulkoMandy
5a86b40e33 xres: fix extracting resources
Regression introduced in hrev51641 which added braces to fix a
misleading indentation warning. The code was behaving correctly and the
indentation was wrong.

Change-Id: I378ff3ed6209917b44387fc29459b6e492c5eb9c
2023-07-18 21:26:03 +02:00
Trung Nguyen
8e8250e9dd headers: Explicitly hide BAlert functions
Explicitly hide some BAlert functions that ought to have been
deleted. This prevents binding generators from thinking that these
functions are available, causing undefined symbol errors during
link time.

Change-Id: I56f53808851b82a10f31015d2351d4e2c29b6f33
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6718
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-07-18 16:43:33 +00:00
Pascal Abresch
f11b304632 Document Launch flags and Preference directory for findpath
Change-Id: I150c0ca1e0deb5749689bb1019a48efdcdc99def
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6701
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: nephele nephele <nep-git@packageloss.eu>
2023-07-18 16:43:20 +00:00
Alexander von Gluck IV
425ac1b60a refactor: Swap %Ld for %lld in all format usages
* %Ld is an undocumented alias for %lld in glibc.
* muslc doesn't implement it for this reason.
* While we will likely never drop %Ld support,
  lets clean house and set a better example.

Change-Id: Id46dad3104abae483e80cc5c05d1464d3ecd8030
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6636
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-07-17 11:26:21 +00:00
Joachim Mairböck
d110ee8cc1 Icon-O-Matic: properly pluralize command names using BStringFormat
There are languages which have different plural forms than singular for one
and plural for everything else, and even if the number is not shown, having
the correct form looks nicer.

For NudgePointsCommand a helper function was introduced because there the name
is given as a constructor parameter.

Change-Id: I19a4984cf83af6612f2eafbf0920c9ad947d52ce
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6703
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-07-17 11:21:10 +00:00
Augustin Cavalier
71bba69f8a Interface Kit: Add casts to int32 following previous commit. 2023-07-15 09:29:08 -04:00
X512
da70563f7f interface/Size: fix -Wdeprecated-enum-float-conversion warning
Change-Id: I8ca131f57495f974a79292a42ba5ce42a47d2437
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6702
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-07-15 13:10:33 +00:00
Autocomitter
5c868338ec Update translations from Pootle 2023-07-15 08:19:41 +00:00
Augustin Cavalier
1efb33617f Move DeviceList class to hid_shared.
It was shared among 3 different HID drivers, now
there is just one common copy.
2023-07-14 17:07:40 -04:00
Vladimir Serbinenko
e16045db2c i2c_elan: Support I2C Elan devices
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>
2023-07-14 20:58:01 +00:00
Zardshard
6427935280 Icon-O-Matic: Generalize some classes
* 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>
2023-07-14 20:56:49 +00:00
Zardshard
a75a222b35 Icon-O-Matic: Remove dead homebrew translation system
Icon-O-Matic uses Locale.h now.

Change-Id: I9722ee76fda47821bf27e6195f8f6ec3d3e1b43e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6700
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-07-11 18:27:10 +00:00
X512
1d9ad3fad7 mmu/riscv64: implement global page mapping support
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>
2023-07-11 17:34:31 +00:00
Augustin Cavalier
ed3d3b1023 drivers/pty: Destroy TTYs when usage is complete.
Otherwise, they will be "reused" and persist settings
and buffers, which we don't want.

Fixes the remaining part of #18488.
2023-07-11 11:33:00 -04:00
Augustin Cavalier
4b02e067a6 generic/tty: Add an assertion and a comment about references.
No functional change.
2023-07-11 11:32:59 -04:00
Augustin Cavalier
5193c8cd2f drivers/pty: Close "slave" TTYs when the "master" is closed.
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.
2023-07-11 11:32:59 -04:00
Trung Nguyen
3cb845283e headers/os: Make headers generator-friendly
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>
2023-07-11 14:40:02 +00:00
jiceland
14a0c87fd9 Tracker: Set and clear background image when switching directories.
Fixes #15784 and #16436.

Change-Id: Ia9baff083b3a8d4f4e8c5314f12fafeef6d01f7a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6717
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-07-11 14:35:15 +00:00
Humdinger
623fc35a33 Mail: Slightly improved attachment handling, layout, strings
* 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>
2023-07-11 02:53:26 +00:00
Humdinger
a8030ecec6 Mail: Accept dropped files on window
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>
2023-07-11 02:53:03 +00:00
PulkoMandy
899e0ef82b userlandfs: use std::bitset for FSCapabilities
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>
2023-07-10 06:27:18 +00:00
Autocomitter
9aa43979f8 Update translations from Pootle 2023-07-08 08:24:47 +00:00
PulkoMandy
a6957d9ff4 fifo_poll_test: add handling of EINTR signal
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
2023-07-04 20:19:02 +02:00
Stian Skjelstad
243ac0b9a6 USB ACM serial driver did not take maxPacketSize provided by the device into account
Change-Id: Ic93d420012d757088b20936e6c8d942ccbc0e5bf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6668
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-07-04 18:02:19 +00:00
Humdinger
a5afae7f96 mail_daemon filter: Fix "Move target" setting
Fix copy&paste error to use correct setting keyword "move target".

Change-Id: If1d555f56529b11ab87a5be330af88c1f346e6ee
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6667
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-07-04 16:38:07 +00:00
Trung Nguyen
4313795d2e network/stack: socketpair for non-stream sockets
`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>
2023-07-04 15:09:20 +00:00
Humdinger
419466254d Mail prefs: fix window title
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>
2023-07-03 12:27:42 +00:00
PulkoMandy
311dc3ca7d tty: notify read in addition to write when the other tty is closed
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>
2023-07-03 09:38:33 +00:00
PulkoMandy
037c2257f9 Export liblinprog symbols in libalm
Appls using libalm (mainly the Aukland Layout Editor) expect to find
these symbols in libalm.

Change-Id: I9ed72ce9fb63510351ab8b50643c3eace2c2953b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6664
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
2023-07-02 16:51:56 +00:00
Autocomitter
c568ba76b1 Update translations from Pootle 2023-07-01 08:15:08 +00:00
Augustin Cavalier
7a3f924a62 idualwifi7260: Synchronize with OpenBSD. 2023-06-30 15:41:13 -04:00
Augustin Cavalier
f89692a376 BMessage: Define getters/setters for BAlignment.
Fixes #18469.
2023-06-30 15:20:01 -04:00
Humdinger
f4f9c81086 Mail: fix "Set status" layout, localization
* Use layouting flag for Mail's "Set status..." window
  to avoid cut-off buttons.
* Added localization.

Change-Id: I6e075f162b02ddd98bbde8346cc2f9e84f4e5976
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6662
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-06-30 18:15:10 +00:00
Theodore Wang
0f293bd7b6 PowerStatus: Implemented sound cues for low battery and charging
* 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>
2023-06-30 06:53:04 +00:00
Augustin Cavalier
1676a41ec5 zip: Remove last remnants.
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.
2023-06-29 21:32:21 -04:00
Augustin Cavalier
a41f112b07 libroot: Downgrade lock assertion into a syslog print.
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.
2023-06-29 21:26:07 -04:00
Augustin Cavalier
30fda09a95 kernel: Rewrite KDEBUG_RW_LOCK_DEBUG.
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
2023-06-29 21:04:40 -04:00
Augustin Cavalier
50330091b0 bfs: Disable asynchronous IO routine when KDEBUG_RW_LOCK_DEBUG is enabled.
See inline comment: it relies on behavior that the assertions
cannot track.
2023-06-29 20:51:08 -04:00
Niels Sascha Reedijk
0a8972bbea Cortex: initialize the log message
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>
2023-06-30 00:30:58 +00:00
X512
5d39116f10 fdt: copy FDT data from kernel_args to kernel heap
Change-Id: Id7b18c582357b8eeaa2e6b7956da3db35ebded3a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6599
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-06-30 00:29:58 +00:00
X512
2075595c78 fdt: expose FDT data to userland
Change-Id: I05c935735f54874630c641bf8ab7cbd378b71ba0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6598
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
2023-06-30 00:29:58 +00:00
Niels Sascha Reedijk
bb2b9b02aa btrfs: use global namespace
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>
2023-06-28 07:11:17 +00:00