Commit Graph
68589 Commits
Author SHA1 Message Date
Augustin Cavalier 61c7d7e4ee Package Kit: Move a number of headers into the source directory.
These classe aren't used, and probably shouldn't be used, outside
Package Kit itself.

Also drop some files from libpackage_build that are not needed.
2026-03-03 17:45:28 -05:00
Augustin Cavalier 5f0f0b02b4 Package Kit, pkgman, SoftwareUpdater: Offer to delete old state directories.
This adds a new job to the Package Kit, and an invocation
in pkgman after changes are applied. The job takes a time_t before,
and an int32 minToKeep, and (after confirmation) deletes all state
directories which were last modified before that time, but also
keeps at least the minimum specified.

pkgman defaults to calling it with (now - 30 days, minimum 10).
SoftwareUpdater does the same, but without bothering the user
and just defaults to doing the cleanup.

Change-Id: I15f5232b11daba5955e7fa07f696ad7785507931
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10404
Reviewed-by: waddlesplash <[email protected]>
2026-03-03 22:14:57 +00:00
Augustin Cavalier 79ab5081b2 Package Kit: Rename InstallationLocationInfo::OldState to ActiveState.
It doesn't refer to some random old state, but the currently active
one. (If the currently active state is the default one, then it will
return nothing.) So, this should make things clearer.

Change-Id: Ib3fe842f5fb51eaf2ef2f31bad8b292b47a3fb36
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10403
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2026-03-03 22:14:57 +00:00
Humdinger 1b43451034 Fix build. Renamed ProviderInfo disroot.org.rdef
Turning one simple commit in to three. What an embarrassment…

Change-Id: I482b806100acd890f17d7a8523a89931d75dacce
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10407
Reviewed-by: waddlesplash <[email protected]>
2026-03-03 14:37:54 +00:00
Humdinger 7c2ea2e950 Add Disroot provider info to jam file
…forgot that one in the previous commit. Sorry.

Change-Id: Ib27442c0b8322320f162a4b73592b8118166b02f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10406
Reviewed-by: humdinger humdinger <[email protected]>
2026-03-03 07:57:38 +00:00
Humdinger 4891afb99e Add Disroot.org to email ProviderInfo
Change-Id: I197c8f69bea09a644381e4dd6bec61c07f001b0e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10405
Reviewed-by: humdinger humdinger <[email protected]>
2026-03-03 07:55:14 +00:00
Augustin Cavalier 418769d64b BResources: Mark deprecated methods _DEPRECATED. 2026-03-02 21:11:39 -05:00
Augustin Cavalier dc4a606f5e Clock: Use BResources::LoadResource instead of FindResource.
The latter is deprecated.
2026-03-02 21:11:23 -05:00
Augustin Cavalier f071ee419d BMimeType: Use the new _DEPRECATED to mark SetType deprecated.
This is the first use of this new macro.
2026-03-02 21:03:25 -05:00
Augustin Cavalier a3be73a455 BTokenSpace: Add cast to appease GCC2. 2026-03-02 20:35:01 -05:00
Augustin Cavalier 9e3e304057 BLocale: Name the BLocker. 2026-03-02 20:22:14 -05:00
Augustin Cavalier b6441edfac BLooperList: Use rw_lock.
Improves efficiency, as some functions can use a read lock
instead of a write lock.

Eliminates another statically-created BLocker.
2026-03-02 20:17:51 -05:00
Augustin Cavalier 5eef2f1d00 BTokenSpace: Use pthread_mutex instead of BLocker.
This header gets included in the build platform, so we can't use
the private recursive_lock.

Eliminates another statically created BLocker, due to gDefaultTokens.
2026-03-02 20:16:32 -05:00
Augustin Cavalier f9850b561c kernel/user_mutex: Panic instead of failing due to OOM.
This is not an expected failure condition for most applications,
so try to avoid propagating it to userspace.

(If necessary, it should be possible to avoid even the possibility
of this by just allocating necessary datastructures upfront
instead of "lazily". But that seems unnecessary at the moment.)
2026-03-02 19:38:26 -05:00
Augustin Cavalier ae70142168 BBlockCache: Use a pthread_mutex instead of BLocker.
The lighter "struct mutex" is in a private header, so we can't
inline it in a public one, so just use pthread_mutex here.

By adjusting padding, the class size stays the same (72 bytes
on 32-bit, 96 bytes on 64-bit; confirmed via static_assert.)

A quick benchmark running "new/delete BMessage" in a loop on 4
threads at once goes from 30-36 seconds before this commit
to around 13-17 seconds, sometimes as low as 3 seconds, afterwards,
so clearly this is a significant improvement.

This also eliminates another BLocker allocated on application startup.
2026-03-02 19:37:13 -05:00
Augustin Cavalier 184b57aa71 BBlockCache: Rewrite header for style. 2026-03-02 18:01:56 -05:00
John Davis 65fdc967c8 hyperv: Fix improper interrupt cleanup
Change default interrupt value to be invalid, current default is a
valid interrupt on x86 platforms.

Change-Id: Ieecf7bcbc6b0aeb4fe62a505ae9765c73ecaa74c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10401
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
2026-03-02 17:33:22 +00:00
John Davis 36021a5a3d hyperv: Check for required features during VMBus probing
Some hypervisors claim to implement/advertise Hyper-V i.e. Xen and
VirtualBox. Check for all required features when probing to prevent
loading on hypervisors that do not fully comply with Hyper-V
specifications.

Change-Id: I7c1188a433cad5eff91dcffe9520a55926d0f4b5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10400
Reviewed-by: Jérôme Duval <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2026-03-02 17:33:22 +00:00
Fruit De La Passion f0fd023b4b drivers: Enable Werror for kernel driver add-ons pty, sensor, timer.
* Activate Werror
* Part of ticket #9460

There seems to be no related warnings. Hence, there are no further changes.

Change-Id: I2bee39eaa90cbe3805f5c79725e6f622368fcac9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10398
Reviewed-by: nephele nephele <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2026-03-01 08:50:27 +00:00
Augustin Cavalier 8cc48bf580 QueryParser: Don't divide by zero on empty attributes.
Fixes a KDL.
2026-02-28 22:16:43 -05:00
Augustin Cavalier f3fd885731 Game & Media Kits: Avoid some usages of static BLockers.
Saves some semaphores.
2026-02-28 22:16:15 -05:00
Augustin Cavalier 4d055d982a BGameSoundDevice: Cleanup.
* Use new-style header comments.

 * Put globals inside class or make static, instead of exporting
   unnecessarily.
2026-02-28 21:52:05 -05:00
Augustin Cavalier 6a4a02907a EHCI: Disable the physical buffers logic, at least for now.
It seems it may have caused serious regressions on some hardware,
see #19949 and #19945.
2026-02-28 20:34:12 -05:00
Augustin Cavalier 4d9bb0a399 LaunchBox: Style cleanup after previous change. 2026-02-28 20:31:30 -05:00
Pascal Abresch 234a85bb17 launchbox: remove ::Pulse, simplify settings storage
Change-Id: Ie1a6ccb083498f7405909911e4f202ee11a8ac0b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9878
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: nephele nephele <[email protected]>
2026-02-28 20:23:21 +00:00
John Scipione 8d82659f43 Tracker: Fix Desktop window vs. actual Desktop menu items.
Fixes menu item portion of #19947.

Change-Id: If6e55eb16649d54008056b451d5e57e2dcd52c1c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10395
Haiku-Format: Haiku-format Bot <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2026-02-28 13:20:52 +00:00
John Scipione 1d20c1fb5c Tracker: Disallow background image on Desktop windows.
Custom background image is disallowed on the Desktop folder and Root
aka "Disks" folder. However, you may use a default background image.

We store the background image on the node, Desktop window and the
actual Desktop share the same node so we have to explicitly disallow
background images from showing on Desktop windows.

Make UpdateBackgroundImage() protected.

Remove unused BDeskWindow::UpdateDesktopBackgroundImages();

Handle all background image code in ContainerWindow. BPoseView calls
its window if targetted to update its background image.

Fixes Desktop background portion of #19947.

Change-Id: I4b104340b5a69807961b99bde7b0455d7d58065a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10392
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2026-02-28 13:20:52 +00:00
John Davis 0c6100feb2 Implement initial Hyper-V support on x86 platforms
Haiku currently does not have any form of Hyper-V guest support, and
this change begins work toward #16664.

This change implements initial VMBus bus/device structure and functions.

Change-Id: I2d081f55e99da479d9bc5084f1815ade6cc77fe2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10333
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2026-02-28 10:00:04 +00:00
vighnesh-sawant b097619769 netresolv: Add support for AI_V4MAPPED in ai_flags in getaddrinfo
Ports over the following commits from FreeBSD:
https://github.com/freebsd/freebsd-src/commit/b848a37d4eddb432629a799713cf6fb6f0fd8c3c
https://github.com/freebsd/freebsd-src/commit/2cff354f1a56af10ad02164a9ee38c013ac80688

Fixes #14323.

Change-Id: If75642a45fc76b50d4377e5a11cdb1ee64ab40ab
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10396
Tested-by: Commit checker robot <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
2026-02-28 09:59:06 +00:00
Autocomitter cdc0044398 Update translations from Pootle 2026-02-28 08:10:06 +00:00
John Scipione a89c4cc6e9 Tracker: Revert SortPoses() change from hrev59185. Fixes #19946.
Change-Id: I0d4ab3a15c13ad1dd81b52a6f588d2ed09772a4d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10394
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2026-02-27 21:14:42 +00:00
John Scipione 4021001fa2 Tracker: Pedantic attrHash int32 => uint32 type fix.
Should have no practical effect.

Change-Id: I5160e8a670c9f36c00d513e60e519148406e1715
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10393
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2026-02-27 21:14:42 +00:00
Kacper Kasper dfa51c4fb8 Don't add extra packages to test image
* Test inherits from minimum target.
2026-02-27 20:09:37 +01:00
Fruit De La Passion 0f5086ade4 wmi: Enable Werror for kernel driver add-on wmi
* Activate Werror
* Part of ticket #9460

There seems to be no related warnings. Hence, there are no further changes.

Change-Id: If19794a5c6294f621360fcc0e58dc7fd8551d5db
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10391
Reviewed-by: Jérôme Duval <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2026-02-27 15:30:52 +00:00
Augustin Cavalier aa939503b6 AppServerLink: Use the correct static initializer for recursive_lock.
Interestingly, the modern GCC accepted the "wrong" one, only GCC 2 didn't.
2026-02-27 10:26:25 -05:00
Augustin Cavalier 66d85d702b Terminal & Expander: Replace exit() with _exit() in fork+exec failure path.
This is necessary to avoid destructors being called in the child,
potentially messing up parent state.
2026-02-27 10:17:40 -05:00
Augustin Cavalier 1380d03a42 time_stats: Replace fork+exec with posix_spawn. 2026-02-27 10:16:51 -05:00
Augustin Cavalier 8cf5bd97a2 launch_daemon: Replace fork+exec with posix_spawn. 2026-02-27 10:16:35 -05:00
Augustin Cavalier 23ef8b89c6 net_server: Replace fork+exec with posix_spawn.
Uses POSIX_SPAWN_SETSID, so needs the previous commit to work.
2026-02-27 10:16:21 -05:00
Augustin Cavalier 27e95c346a posix_spawn: Fix implementation of POSIX_SPAWN_SETSID.
setsid() returns -1 in case of error, and a pid_t in case of success.
2026-02-27 10:13:46 -05:00
Augustin Cavalier 9b5a7d7612 AppServerLink: Switch to a recursive lock.
It seems in some applications (though not most of the ones I
initially tested) this can get used recursively, so we need
a recursive_lock in order to not deadlock.

Also commit a missed change from the previous commit.
2026-02-27 09:22:21 -05:00
Augustin Cavalier fb543b61ba AppServerLink: Use a mutex.
X512 pointed out that ServerLink is inherited by PortLink which is
used by all windows, so the original change had the unintended effect
of allocating another semaphore for every window, which isn't wanted.
So, just use a static mutex here also.
2026-02-27 09:15:48 -05:00
Nathan Patrizi 3f8cbb026f Save file panel: Handle DEL key in filename control correctly
* Currently the DEL key is intercepted by a shortcut registration for
  the Tracker "Move To Trash" menu option.
* Allow key event propagation to continue if a shortcut that does not
  use the CMD key is disabled.

Fixes #19870

Change-Id: If16d3858cee61dfd1862b379fbcfeffebe617341
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10226
Reviewed-by: waddlesplash <[email protected]>
2026-02-27 13:58:29 +00:00
iamdumb 4e5ee46880 btrfs: fixed comparison warnings in btree.
* Added static_cast<uint32> to resolve type mismatch warnings between
signed integer(fSlots[level] and slot) and unsigned integers(ItemCount()) during compile

* eliminated a potential unsigned underflow vunerability when a node
is empty in NextLeaf() traversal logic

Change-Id: I8534f31cac9dec41e04e16989427dc7d9abb26ef
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10363
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: Fruit De La Passion <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2026-02-27 12:49:55 +00:00
John Davis 05d6e44fc9 bootloader/arm64: Discover UART from DBG2 ACPI table
Fallback to DBG2 if SPCR is not present while discovering UART serial
devices. DBG2 is newer than SPCR but does not provide the same
information, and it appears that both can exist on the same system.
This has only been tested in Hyper-V which exposes DBG2.

Change-Id: I6a75114f4287b6db289b544c3b80a66a625fb6c6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10354
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2026-02-27 12:49:33 +00:00
Fruit De La Passion 53579f5004 display: Enable Werror for kernel driver add-on display
* Activate Werror
* Part of ticket #9460

There seems to be no related warnings. Hence, there are no further changes.

Change-Id: I0516856a4e7c2ee5c3f8503c4713075e07efbf63
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10390
Haiku-Format: Haiku-format Bot <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2026-02-27 12:49:03 +00:00
Oscar Lesta 6f22415c5f intel_gart: add Host Bridge with id 0x4641.
Should help with #19942.

Change-Id: I19251b8948c5a20ae4e0ac1e4d3fe1172aeffaac
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10389
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2026-02-27 09:26:43 +00:00
Fruit De La Passion 7ebad420e9 nvidia: Enable Werror for last (nvidia) and hence all graphics drivers.
* Fix warnings by adding two casts
* Activate Werror for all graphics drivers
* Remove options to disable Werror for individual graphics drivers, can later be re-introduced, if *really* necessary.
* Part of ticket #9460

uintptr_t is intentionally used although a physical address is concerned. Using phys_addr_t would require additional casts at other places.

Change-Id: Ife6dbcf809b6537427f318460e41cdc056e7d964
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10386
Haiku-Format: Haiku-format Bot <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2026-02-27 07:57:12 +00:00
Augustin Cavalier 91eb43cfc0 libbe.so: Prevent (re)using BApplication after fork.
The case where no BApplication has been created at the time of fork
is not blocked by this change (as it might be useful in fork-to-background
before creating a BApplication.)

Reinitializing or recreating a BApplication where one already exists,
though, is not supported by the kits, and just leads to problems.
And when the global destructors are invoked after a fork, such as by
exit(), then the parent team's state may be corrupted due to the
deletion of BLocker semaphores or other global state.

So, we thus set be_app to an invalid pointer, and if terminate_after()
is called with this pointer, we invoke debugger().

(We should really just prevent semaphores from being used across
processes unless explicitly specified, but that would be an
API compatibility break from BeOS, so we'll need to do it carefully,
or not until after R1.)

Would have clearly caught the problem in #18576 and the linked thread.
2026-02-26 17:26:08 -05:00
Augustin Cavalier 9cada02ee0 libbe.so: Avoid static BLockers.
They don't work properly after a fork, and if exit() is called
from the forked child, the parent won't be able to use them
anymore.

In BBitmap and BPicture, replace them with mutexes. For AppServerLink,
make the private ServerLink inherit from BLocker, and then use
that one directly.

This also is a slight efficiency gain, as we don't need to create
multiple semaphores from the static initializers now, which is
just a waste of time in the case of applications that don't
even need these locks but link to libbe.so (e.g. CLI tools.)

Part of #18576.
2026-02-26 17:15:53 -05:00