Commit Graph

64970 Commits

Author SHA1 Message Date
X512
a23ac85fa9 bus_managers/pci: split PCI controller to separate add-on
busses/pci/x86: add
Other add-ons are in following commits.

Change-Id: I7a77bfaef0e8995917b4b54c8369d7075533ec26
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6220
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-04-25 15:54:32 +00:00
X512
97b7c7719d bus_managers/pci: move MSI handling to generic code
Change-Id: I6194838b7b46222f720fc328bb4512fdb88a9c8a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6222
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-04-25 15:54:32 +00:00
X512
e942269a1f pci: generic MSI interrupts support
Change-Id: Ib4fd23f6bca867a2b428bf2651234d719ee08672
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6221
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-04-25 15:54:32 +00:00
John Scipione
26704b5974 Tracker: undo Model.h changes from previous commit
This changes more than just style, put enum values back.
In practice this makes no difference but the change was
unintentional so put it back like it was before.

Change-Id: I46c782c441d72e77a2897683f54ba7fcefbd5b63
2023-04-23 23:46:06 -04:00
John Scipione
a63a67392b Tracker: Whitespace, alphabetize style fixes
No functional change intended.

Change-Id: Ib47f6b04e372923a5d2a1774ce4e3f56d8b05792
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6370
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-04-24 02:47:43 +00:00
mbrumbelow
3f06b49ad3 fs_shell: cleaned up of a few unused variables
Change-Id: I58e91b634d8d32247c2f37a2518d4234397e8a6f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6378
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-04-22 09:03:29 +00:00
Jessica Hamilton
4d8698c300 duplocale: fix missing locale magic when creating a new locale.
Fixes #18345.

Change-Id: Ibedfa973b371b65a502dc655eae65f4ed0833144
2023-04-20 04:45:42 +00:00
Zardshard
44daad619e Debugger: improve command help text
Improve the help text of the db, dw, ds, dl, and string commands.

This is accomplished by
* Splitting CliDumpMemoryCommand into CliDumpMemoryCommand and
  CliDumpStringCommand
* Moving code shared between the two into CliContext
* Removing functions in CliContext that were replaced by this movement
* Allowing customizing the help text for CliDumpMemoryCommand for each
  command it represents
* Changing the help text for CliDumpStringCommand

Change-Id: If4f9e0c20f00f3e3d6c6769216fabb3160aea0a4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6332
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-04-19 09:01:04 +00:00
Zardshard
92f36c4a61 Debugger: Remove unused function
Change-Id: I92b7260d4b5b7d187ec9ecd9f9f602c317410aa6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6362
Reviewed-by: Rene Gollent <rene@gollent.com>
2023-04-18 17:36:49 +00:00
Augustin Cavalier
c4737dcb22 freebsd_network: Be lenient, do not assert if the callout mutex is &Giant.
Same as FreeBSD. Should fix #18356.
2023-04-17 22:47:14 -04:00
Augustin Cavalier
97d55ad49d freebsd_network: Add missing LOCKGIANT to the close() hook.
Should fix #18363.
2023-04-17 21:51:29 -04:00
Freaxed
81d3bc02bf BMenuItem: use unicode character for B_SPACE shortcut
Change-Id: If3e9b1232538f50e15fb8f5b249a7584f23a46db
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6360
Reviewed-by: Stefano Ceccherini <stefano.ceccherini@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-04-17 18:53:34 +00:00
Jérôme Duval
7c58a5a3fb tcp: avoid overflow of the advertised window with window scaling enabled
tcp_segment_header.advertised_window is 16 bits.

Previously, instead of using the maximum window, zero would be sent, thus
the partner wouldn't send anything.

fix #18337

Change-Id: Ibff98ee58b84bdf52527a7821648a5faf20c5589
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6359
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-04-16 18:53:41 +00:00
Trung Nguyen
7bfc9c6fc7 libroot: Fix bad pointer access in __init_stack_protector
The address of the variable should be taken instead of the
variable itself being casted to `void*`.

This fixes a rare segfault bug when any Haiku binary runs in
a `chroot`ed environment without a `/dev` mount.

Change-Id: I2fdacac62fadbcce8006bbf0a5350f6ec95133ae
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6377
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2023-04-16 15:57:12 +00:00
Trung Nguyen
50a5eed083 app_server: Fix potential infinite loop
Return `B_ENTRY_NOT_FOUND` instead of -1 when `/dev/graphics`
is not found.

Otherwise, `app_server` would run into an infinite loop
while waiting `fCardFD` to equal `B_ENTRY_NOT_FOUND` in some
specific environments such as a `chroot` where `/dev` is missing.

Change-Id: Ice23a82f58811f1258c58826c2488ae5c5c29cee
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6376
Reviewed-by: X512 <danger_mail@list.ru>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2023-04-16 13:09:36 +00:00
vaibhavg20comp
b5ff580afb btrfs: btrfs_shell build errors fixed
Change-Id: I05c4d489f9227b94c00648c7a22569b2902ef325
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6309
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-04-14 11:11:15 +00:00
John Scipione
3e37877f10 BButton: Remove button label margins
... to prevent label truncation on BeControlLook,
BDH Calc, and some other places.

Fixes #16570

Change-Id: I68d8b64a631e116d3180c96be1fb5681de86fda6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6310
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-04-12 15:17:34 +00:00
John Scipione
27b3dee8b3 Revert "Deskbar: Use hvif window icons & scale with font"
This reverts commit 2b65e2d808.
2023-04-11 14:19:11 -04:00
wszdexdrf
a2755521d5 Rewrite header ISA.h
partially fixes #1576

Change-Id: I245f55ab466222279e74df7f206a609d3b913ed5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6298
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2023-04-11 16:32:56 +00:00
X512
0ec55fb069 framebuffer: fix NULL framebuffer address for non-x86
Change-Id: Ib24d4c04da102f40907002f59550635616b9a290
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6313
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-04-11 15:57:01 +00:00
John Scipione
55d8d19ea9 BeControlLook: Implement DrawStatusBar
Fix drawing issue with DrawTextControlBorder().
Update text control border and status bar border colors
to match BeOS R5 better.

Fixes #17889

Change-Id: I3eeb9898b538456aec751f9b57d19b9910506325
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6271
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: John Scipione <jscipione@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-04-11 15:28:39 +00:00
Jérôme Duval
fc5d11e9ab busses: remove unneeded PCI_x86.h
Change-Id: Ia231eadc02856f68daa0184c12e7d54853ac9322
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6326
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2023-04-11 15:01:20 +00:00
John Scipione
4f97a431b9 Deskbar: Make Vulcan Death Grip work in mini-mode
Refactor so that ExpandoMenuBar and TeamMenu both call the menu item
TeamMenuItem::HandleMouseDown() method to do the actual work and then
send a message to cleanup.

Fixes #17761

Change-Id: I0e13e5fc6c90236936120ff0dda1246123576d37
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6311
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-04-10 15:54:14 +00:00
Augustin Cavalier
6347519ab1 pthread_once: Add static assertions for ONCE_INITs.
Both of these need to be here, they cannot be in the C sources,
as the static assertions throw "non-constant expression" when
placed there.
2023-04-10 11:51:43 -04:00
Augustin Cavalier
d9e8ef7f66 threads.h: Fix value of ONCE_FLAG_INIT.
Fixes #18348.
2023-04-10 11:50:33 -04:00
Augustin Cavalier
5cbb772a4d libroot: Fix handling of n=0 in mbrtowc.
Fixes #18350.
2023-04-10 11:25:15 -04:00
Emir SARI
f6395def52 PowerStatus: Use BNumberFormat for percentage value
This provides automatic percentage formatting according to the locale
setting.

Change-Id: I022331866acc2e20d819625c6d070807f476c745
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6209
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: Máximo Castañeda <antiswen@yahoo.es>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2023-04-10 09:54:08 +00:00
Jérôme Duval
6239b2a907 libroot/glibc: apply upstream fix for printf_fphex: Fix up long double fphex.
a53b7a4e4b
fix #18353
2023-04-09 18:38:30 +02:00
John Scipione
2b65e2d808 Deskbar: Use hvif window icons & scale with font
Add rdef vector icons for shown, hidden, shown switch and
hidden switch. Reuse resource ids for vector icons. Remove
unused bitmap resources.

Fixes #17918.

Change-Id: I2ba1b126422f679c91f3272991c78d236198a358
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6260
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-04-09 04:50:56 +00:00
Augustin Cavalier
33dd436f25 kernel/team: Fix race condition in team loading wait.
The condition variable that the load_image'ing thread is waiting on
is also owned by that same thread, so as soon as it wakes up, it
will soon return, thus destroying it. Under high load or other unlucky
scheduling conditions, it seems this could occur before the other thread
had even returned from the condition variable's NotifyAll.

Since team->loading_info is protected by the team lock, simply
acquire the team lock once more after being awoken and returning,
to synchronize and prevent this race.

Should fix #18352.
2023-04-08 15:10:35 -04:00
Augustin Cavalier
23e3c5fa0c libroot/icu: Add missing include of assert.h.
Needed everywhere other than GCC2.
2023-04-08 15:06:13 -04:00
Augustin Cavalier
adc3561bed libroot: Suppress signed-unsigned comparison warning. 2023-04-08 14:50:13 -04:00
Augustin Cavalier
c3c213810b libroot: Do not include terminating NULL byte in result of [wc]strxfrm.
Fixes #18347.
2023-04-08 14:48:48 -04:00
Augustin Cavalier
3e1163d6af libroot: Disambiguate parameters of ICUCollateData::Strxfrm.
Same thing that was done for wcsxfrm in 218604196a.
2023-04-08 14:17:15 -04:00
Augustin Cavalier
e69e1b2b3a libroot: Remove glibc's random.c.
Not used anywhere.
2023-04-08 13:51:41 -04:00
Augustin Cavalier
87be02e12a libroot: Replace rand() and rand_r() implementations with musl versions.
These functions are obsolete, anyway. We should probably remove
them from the kernel at some point...
2023-04-08 13:50:37 -04:00
Augustin Cavalier
05a0671dde libroot: Synchronize random() implementation with upstream FreeBSD.
Specifically, FreeBSD 12 (newer versions refactored this API into
more than just one file.)

Fixes #18346.
2023-04-08 13:49:03 -04:00
Augustin Cavalier
6d3d196648 getlogin_r: Make actually reentrant and fix error return value.
Fixes #18349.
2023-04-08 13:04:11 -04:00
Augustin Cavalier
fcd82d3dc3 math.h: Change definition of FP_ILOGB0 to match the specification.
See #18351 for details on the specifications.

This is the same thing NetBSD does. BeOS R5 defined these values
differently than we did even before this commit, and it does not
seem to have caused problems then, so this should be fine.

While technically an ABI break, in practice these values are not
always differentiated on other platforms, and it appears musl's
code triggers divide-by-zero exceptions on purpose before it
returns this value, anyway.

Fixes #18351.
2023-04-08 12:30:15 -04:00
Augustin Cavalier
0f67b2ac2e uchar.h: Add missing include of stdint.h.
Fixes #17040.
2023-04-08 12:30:14 -04:00
Andrew Lindesay
86ee86f5a9 HaikuDepot: Nickname Length
HDS has increased the length of the nickname to
32 characters on version 1.0.147 and this change
supports that change in the desktop client.

Resolves to #18343

Change-Id: Iae07acc165165e91b04cef7ebc1190d241d9a053
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6307
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-04-08 15:55:28 +00:00
Freaxed
40e5560a3c BOutlineListView: fixed expansion causing items to disappear
On a multi-level list view, when expanding an item containing other collapsed lists, the last items disappear due to a wrong element counting.

Change-Id: I2313ad8efb23e8db54cd3563687bf0c2a775a12a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6259
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: Stefano Ceccherini <stefano.ceccherini@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-04-08 15:54:57 +00:00
Jessica Hamilton
8079adc050 libroot: fix path inconsistency in the find path API.
With the package kit merge, settings from packages were
placed into ~/config/settings/global for packages installed
into the PackageFS Home mount.

As a result, B_FIND_PATH_SETTINGS_DIRECTORY was returning a
user settings path different to the find directory API, making
transitioning from find directory to find path incompatible.

This change also updates the package_daemon and packagefs
to remove the remapping also occurring there.

Change-Id: Id5d077503e177a5f7cbc48779c132160b0d01890
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5941
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-04-08 15:54:33 +00:00
Zardshard
d8eeb8a4cc Debugger: explain target must be specified for CLI debugger
Previous behaviour was to exit without any explanation.

Change-Id: I3350a139fadffb197c7833f3c46861a401f86271
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6306
Reviewed-by: Rene Gollent <rene@gollent.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Automation <automation@haiku-os.org>
2023-04-06 02:56:16 +00:00
Zach Dykstra
9fe85f9688 mail: automatically scale toolbar icons
Change-Id: I756122de2f4ee99883a53d0d2163004328660c85
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6305
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-04-05 14:44:37 +00:00
Zach Dykstra
457e5ee245 mail: switch 'Set to' window to use layout lib
'File -> Close and -> Set to' used a hard-coded window size and
control/button layout. Switch this to use the layout library for proper
scaling.

Change-Id: Ieeed93da82fb6bdcca852e3bb2f5a3315222ec27
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6303
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-04-05 14:38:01 +00:00
John Scipione
863bf67d8d Deskbar: Scale leaf/team menu with bold font only
Note that this only affects the leaf and team menu item icon size
as we do not actually display any bold text here and this does not
cause any menu text to display as bold anywhere in Deskbar.

The reason to use bold font is because the leaf/team menu is set
to the same height as the window tab and the window tab is bold.

Fixes #17913

Change-Id: I8fd23e30e9a28e6aa24b4726c73863b9d0370010
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6297
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Automation <automation@haiku-os.org>
2023-04-04 18:39:40 +00:00
John Scipione
6781d35fcc Deskbar: Removed Utilities.h include from BarApp
There is no Utilities.h in Deskbar

Change-Id: If31a8eb0d36a62c9402c9d46e16891874e2d1aa2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6268
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-04-04 18:38:30 +00:00
PulkoMandy
095b381310 BitmapStream: fix grayscale AVIF decoding
BitmapStream creates a BBitmap without specifying a bytes per row, but
then check the bytes per row matches the header. It is better to ask
BBitmap for the desired bytes per row to avoid any difference in
padding.

Change-Id: Ie1facfd423ad888a14757a0fffc9e8cdf72ef832
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6301
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-04-04 18:37:03 +00:00
Emmanuel Gil Peyrot
cc889ed79a mime_db: Broaden AVIF filetype guess
The current version expects the first box to be exactly 32 bytes, but some
files found in the wild only have 28 bytes, so we now ignore the first four
bytes and it works.

Change-Id: I4c304bd6385bffd15f4adbb99cbf464f9767f7bf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6302
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: nephele <nep@packageloss.eu>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-04-03 21:51:35 +00:00