Commit Graph
68394 Commits
Author SHA1 Message Date
Jérôme Duval 431d197b7e kernel/fd: add inc_fd_open_count
Change-Id: I28a1b99a020cefb626dddca78cb7b7913cd1286c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9864
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-11-15 22:30:45 +00:00
Jérôme Duval 8dcdf257f9 network/stack: Add clone_ancillary_data.
Change-Id: I98a56344ffbf0c691a797ad7ce69ba1de08bbbee
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9859
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-11-15 22:30:45 +00:00
John Scipione 646294695d AboutSystem: Simplify updating colors.
Change-Id: Ide961bc25e6e84dcac41d6a2b62130e759762e8b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9773
Reviewed-by: nephele nephele <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-11-15 18:38:56 +00:00
Pascal Abresch afe2270c98 Bootloader: update copyright date
fixes #18992

Change-Id: Ifa673e40703b6f07d1a6008469f6a78e94b487fb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9880
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-11-15 18:37:30 +00:00
Pascal Abresch f2e67ee244 Mediaplayer: Infoview fix text color
Change-Id: I6263b5c0a474bd439a1f09233f621ae3eec1bf23
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9879
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-11-15 18:37:11 +00:00
John Scipione 0c041e8c47 Tracker: Pass workspaces activated message to Desktop on
... so that replicants can receive it to update their colors.

Forward a workspaces activated message when Desktop color changes
as well for the same reason.

Fixes #19816

Change-Id: I7b8bf8b7decc3ce088881ccb29492db6a41945b9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9772
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: John Scipione <[email protected]>
2025-11-15 11:34:51 +00:00
John Scipione 7d87f76306 Mail: Don't override default panel bg color in AddressTextControl.
Fixes #19818

Change-Id: I35cdad7593bb95119b3611b68fa6dcbdf731a136
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9861
Reviewed-by: John Scipione <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-11-15 09:33:08 +00:00
Autocomitter 0f320c5eb3 Update translations from Pootle 2025-11-15 08:14:03 +00:00
Augustin Cavalier dee9cb73c6 partitioning_systems: Move Intel-related classes back to the "intel" folder.
This partially reverts commit 61790bdb8a.

These aren't really "common", they're specific to the "Intel" partitioning
system, which GPT also interacts with. So, move them back to the "intel"
folder, but keep the static library setup the commit moving them
to the "common" folder created, which is indeed better and was most
of the advantage of that commit.
2025-11-14 19:24:22 -05:00
Augustin Cavalier 775449bef9 kernel/vm: Don't shrink commitment on precommit in VMAnonymousNoSwapCache.
Same change as was made for VMAnonymousCache.
2025-11-14 19:06:11 -05:00
Augustin Cavalier db168093dd kernel/vm: Adopt() in overcommitting caches needs to adopt commitment.
Fixes incorrectly low commitments causing assertion failures
under AddressSanitizer.
2025-11-14 18:48:25 -05:00
Augustin Cavalier 1dd462720e kernel/vm: Don't shrink commitment on precommit in VMAnonymousCache.
If we were "donated" some commitment (e.g. in copy_on_write_area)
then we don't want to drop it when pre-committing.

Fixes some commitments being too low in forked teams.
2025-11-14 18:48:25 -05:00
Augustin Cavalier 527f059fb1 kernel/vm: Adjust some out-of-date doc comments. 2025-11-14 18:48:24 -05:00
Augustin Cavalier d530817956 Debugger: Fix lock order inversion in CliContext::PrintCurrentThread.
Fixes some hangs in the CLI.
2025-11-13 15:22:57 -05:00
Augustin Cavalier 78e1c0f063 Debugger: Handle terminations occurring during WaitForThreadOrUser.
Otherwise we enter an infinite loop.
2025-11-13 15:22:22 -05:00
Jérôme Duval 5e0c933df0 Added ring_buffer_user_peek() similar to ring_buffer_peek()
Change-Id: Ife183989e0c031f648feb6a4b03f1a3ffc15503c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9858
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-11-13 14:11:35 +00:00
Jérôme Duval 22f4b0e5f8 network/stack: packet writes should reach the protocol at least once
notifications on packet protocols shouldn't ignored (for instance zero length packets).

Change-Id: I5ccf1ad492c32c50d59b9f9792456d70b29dbf32
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9781
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
2025-11-13 07:17:09 +00:00
Jérôme Duval 0cbc2cc115 network/stack: handle MSG_TRUNC in socket_receive_no_buffer()
unix: return the actual received length for datagrams

Change-Id: I7b4fe7f19ae77fffe1282b16af1ee49443d6ff88
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9777
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
2025-11-13 07:17:09 +00:00
Jérôme Duval d6cfa94572 unix: Implement sequenced-packet sockets
* implement `SOCK_SEQPACKET` sockets for `AF_UNIX` family.
* extend UnixStreamEndpoint to use atomic queues like UnixDatagramEndpoint
* UnixBufferQueue::Read() and Write(): makes the address optional
* UnixBufferQueue::SetCapacity(): actually makes the fifo smaller when possible
* UnixFifo::UnixFifo(): init fType
* UnixStreamEndpoint::UnixStreamEndpoint(): init fAtomic
* UnixStreamEndpoint::Connect(): uses the socket receive and send buffer size,
init the atomic/non-atomic queues.
* UnixStreamEndpoint::Send(): accept MSG_EOR for sequenced-packet sockets
* UnixStreamEndpoint::Receive(): accept MSG_WAITALL
* UnixStreamEndpoint::SetReceiveBufferSize(): succeeds if no queue yet

Change-Id: I57299f31e4d9ace79bf9baff0da9bae764c27929
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9775
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
2025-11-13 07:17:09 +00:00
Augustin Cavalier 82b9d8f1f7 bootloader: Make Partition::Size return the partition's size.
Partition::ReadAt() and WriteAt() already do bounds-checking
based on the size, but Size() was returning the underlying FD
size, which might be that of the entire disk, not just this
partition. So, move initialization around a bit, and return
the actual size.

Should fix the bootloader menu displaying the wrong sizes
for boot partitions.
2025-11-12 16:50:37 -05:00
Augustin Cavalier f4344e53b8 Interface Kit: Use computed spacing for tooltips.
B_USE_HALF_ITEM_SPACING is 6 with a 12pt font, so this increases
the insets slightly. B_USE_BIG_SPACING should be 20, so that
should be the same.

Improves tooltip appearance on HiDPI.
2025-11-12 16:40:25 -05:00
Augustin Cavalier a9cde90d40 IPv4 & TCP: Implement naive Path MTU Discovery.
* Set IP_DONTFRAG on all TCP sockets by default.

 * Handle receiving B_NET_ERROR_MESSAGE_SIZE, update MaxSegmentSize
   appropriately, and trigger retransmit.

Tested and verified as working.

Part of #1073. However this doesn't implement all of what's needed,
only the most basic form of the algorithm (we don't record MTUs
for reuse later for instance, right now we only store routing
information for the LAN, it appears, so we will need somewhere else
to store that.)

Change-Id: I37a24b50db18af908c6f6257c6fb6d72127d2787
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9402
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-11-12 20:48:08 +00:00
Augustin Cavalier b1231e164d nvme_disk: Add include to fix the build on RISC-V.
Seems this is implicitly included on other architectures somehow.
2025-11-12 14:48:08 -05:00
Augustin Cavalier eb3cdab6e6 nvme_disk: Use IORequestOwners to avoid recursion.
Should fix #19505.
2025-11-12 14:30:07 -05:00
Augustin Cavalier 0e9d580c73 IOScheduler: Rework IORequestOwner management.
* Make IORequestOwner an abstract (ish) class, and move details
   to the Scheduler implementations. This will allow other drivers
   (like NVMe) to use their own, separate IORequestOwner system.

 * Use an object_cache to allocate IOSchedulerSimple::RequestOwners.
   Previously, a single block large enough to store one for every
   thread at maximum thread count (4096) was allocated, meaning
   a few hundred KB per IOScheduler. In the case of low memory,
   a fallback IORequestOwner with a thread ID of -1 is used.

Tested with IDE and usb_disk drivers, seems to be working.
2025-11-12 14:30:06 -05:00
Humdinger db64673ebe Use proper Tracker messaging to show/select bookmark file
Send the proper message to open a file's parent folder and select
it, instead of employing a BMessageRunner to send the message after
0.3s in the hope the folder has finished populating by then.

Similar for the bookmarks as it was done in the Downloads window.
Changed both though to be more like Tracker's GetInfo window, which
has a bit more eleant code IMO.

Change-Id: I0cda6981500e62b81c2c2998d1cf132874eab1c2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9857
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2025-11-12 16:10:12 +00:00
Jérôme Duval 45ec6479d2 libs/bsd: update arc4random with OpenBSD sources.
Change-Id: I68970d44677a0628681b033f1832fa7afc37d031
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9856
Reviewed-by: waddlesplash <[email protected]>
2025-11-12 07:12:54 +00:00
Augustin Cavalier 0ae42c46b1 kernel/vm: Don't change commitment in the Rebase step in the middle-cut case.
As we may have stolen some commitment from the first cache already,
so it will try to increase it here, which won't work if the system
is low on memory.

Should fix #19813.
2025-11-11 20:43:40 -05:00
Oscar Lesta aecb079606 libuserlandfs_fuse.so: propagate read-only flag if set in statvfs.
While fuse.h says that the `f_flag` field of statvfs (from the statfs() op)
is ignored, taking it into account (by setting B_FS_IS_READONLY in
fs_info's flag) allows Tracker to properly "hide" the "space bar", and on
new enough hrevs, to also use the "read-only background" on the windows
for such a read-only fuse-based volume.

To test this, I've modified sqshfs (from sqsh-tools)  to add a "missing"
statfs() op, which amongh other things, sets f_flag to ST_RDONLY.

(the lack of statfs() was causing Tracker to not show a volume icon for
"sqshfs Volume"s)

Change-Id: I8e3758c32579218a100fde1ab20c3381649f90ce
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9797
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-11-11 17:11:32 +00:00
John Scipione 756b7aa7ca HaikuControlLook: Restore colors in DrawLabel().
Change-Id: I031aab9fdb0b648d5285beb64893fdd5f00b62a8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9771
Reviewed-by: nephele nephele <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-11-11 17:11:00 +00:00
John Scipione be16e7f768 BSlider: Fix text color and also on Desktop replicant.
desklink: Set view color transparent on media volume replicant,
redraw when switching workspaces as background color may change.

HaikuControlLook and BeControlLook: Update label text color on
Desktop to black or white depending on background color. Ignore
passed in text color on Desktop. Disabled text tinting also
applies to Desktop text color.

Fixes #19700 (properly), #19800

Change-Id: I351bc046721297e85166dd8bd3a2ba63fe2cd09f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9770
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: nephele nephele <[email protected]>
2025-11-11 17:10:13 +00:00
John Scipione 6c9c1b32e0 BControl: Don't set colors in AttachedToWindow().
BButton background drawing issues from hrev49993 has been fixed
by nephele's recent control color updates. This frees BControl
classes to be able to draw their background transparent.

Change-Id: Ic739782807f91deb11f7e1a3c3c9e2ef60734334
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9782
Reviewed-by: nephele nephele <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-11-11 17:10:13 +00:00
Andrew Lindesay 0f45d8d27e HaikuDepot: Implement native and desktop filters
Change-Id: Ia461fd10230631ec8b32ec9a6047d36e13ef77d3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9798
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: humdinger humdinger <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
2025-11-11 17:09:14 +00:00
John Scipione 142022d4c8 Appearance & Terminal: Cleanup cruft and fix minor style issues.
Change-Id: I1b1d50763f2058870d5cfd1600f6f67f0b4733f5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9778
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-11-11 17:03:00 +00:00
Jérôme Duval b739532218 POSIX: add ffsl and ffsll from musl sources.
appeared in issue 8:
https://pubs.opengroup.org/onlinepubs/9799919799/functions/ffs.html
Change-Id: Ic382498c3e2d6138aedbeb88578882457ee875ee
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9836
Reviewed-by: waddlesplash <[email protected]>
2025-11-11 16:50:29 +00:00
Jérôme Duval 11d8ab2a71 kernel/socket: recv/send should accept a NULL buffer with a zero length
for instance on udp and unix datagram sockets.

Change-Id: I010faf1147b0e6b3d89aa47b1f846f3b948008fc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9780
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-11-11 11:04:38 +00:00
Jérôme Duval 91acc3028f kernel/team: use child-forked thread signal_mask
when creating ThreadCreationAttributes. Otherwise defaults to zero.
this fixes golang TestForegroundSignal.

Change-Id: I98e372d2e89ca9ea4bd65e5017b732023a811143
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9816
Reviewed-by: waddlesplash <[email protected]>
2025-11-10 22:07:25 +00:00
Jérôme Duval 4e7b65c689 kernel/team: exec_team() is now allowed with other threads
these other threads are killed. This match with the POSIX description:

"A call to any exec function from a process with more than one thread
shall result in all threads being terminated and the new executable image
being loaded and executed. No destructor functions or cleanup handlers shall be called."

Change-Id: I55c25d2e785e25d444f63c646d901d64e6333750
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9799
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-11-10 21:34:23 +00:00
nipos 9691bc57d2 notification_server: Immediately change notification position on preferences change
Fixes #15547

Change-Id: I74f33c3a549e79992885cc85c30fbc4ecaf2d504
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9759
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: nephele nephele <[email protected]>
2025-11-09 17:02:47 +00:00
Oscar Lesta b98a74c912 Terminal: only sync clibpoard for the initial tab.
Fixes a regression introduced in hrev59090 (see ticket #19780).

Change-Id: Iabced47d8a4cab907eb379d71533350f820c55c5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9779
Reviewed-by: Jérôme Duval <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-11-08 18:41:41 +00:00
Andrew Lindesay a05bcfe24e HaikuDepot: Fixes for pkg view and network
This change addresses a number of issues around the synchronization
of data from the server when the user is viewing a package.
Handling of issues when the server is not network accessible is
improved. The user is also given the option is disable network
communications as problems are reported to them.

Resolves #19802

Change-Id: Iaa8214ba279a6bbf0f196643468d0f86a23ead1c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9714
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
2025-11-07 09:40:43 +00:00
Jérôme Duval 9003873f8b network/stack: handle SOCK_SEQPACKET
Change-Id: Ic97783fc79dfbeaed07246366ca49b17a879feb8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9776
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-11-05 21:12:18 +00:00
Jérôme Duval df31a4abfa strace: dump setsockopt/getsockopt
Change-Id: Icd54603fa96ec27c6bd43b19434f5a3a0af5849e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9774
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-11-05 21:12:18 +00:00
Jérôme Duval 8956939c43 strace: dump stat structure
Change-Id: I816d4c5cf844e844cde373278505c4e55f90a42b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9766
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-11-04 07:39:15 +00:00
nipos 817ac9c240 NetworkStatus: Add support for installing the replicant while window is open
Fixes #15262

Change-Id: I86d2f05896a82baf076ace1006030e85f33ee483
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9769
Reviewed-by: John Scipione <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-11-03 17:48:33 +00:00
Oscar Lesta b238dfa0f9 ActivityMonitor: fix Temperature presentation if no sensor is available.
On machines with no acpi_thermal sensor, enabling the thermal readings
was showing the value as "-2.077.252.342 °C".

Let's show "No thermal sensor" / "0 °C" instead.

Change-Id: I4ba74e648b8826635cb4f4145540c833d1058220
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9764
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
2025-11-03 17:39:37 +00:00
nipos abb6b4896e BListView: Fix keyboard navigation after new items are added
Fixes #15446

Change-Id: If6e5fbf53076277df949e67e766fc9ff774b5c64
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9768
Reviewed-by: John Scipione <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-11-03 03:52:52 +00:00
nipos 7f3fee8e94 libshared: Fix CalendarView return values for Year(), Month() and Date()
Fixes #15397

Change-Id: If7d9908d6b3cb3caf1e5678aca859f8902e44038
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9767
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: John Scipione <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-11-03 03:52:52 +00:00
Oscar Lesta 61f89fbfcf libuserlandfs_fuse.so: add a stub for fuse_get_session().
This allows to build the sqshfs fuse module that is part of:
https://github.com/Gottox/sqsh-tools

With this change in, I'm able to mount a >200 MB squash file containing
the Linux sources.

Change-Id: I8ae37cfa376d96c1985776f9731988a4cf96c431
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9765
Reviewed-by: waddlesplash <[email protected]>
2025-11-01 19:17:34 +00:00
Augustin Cavalier 21e1997980 kernel/vm: Previously-shared caches may have a different base or size.
Than the one used by the area, anyway, so we need to call Rebase
as well as Resize in all cases where the cache is getting reused.

This case happens (rarely) with the bdwgc's gctest, with mprotect VBD
enabled (which still doesn't work reliably, it sometimes crashes userland
or trips asserts in the kernel, but it seems to trip less after this
change.)

Also, let the CacheChainLocker take care of releasing and unlocking
the cache even in the onlyCacheUser case.
2025-10-31 21:55:57 -04:00