Jérôme Duval
f90957116e
pthread: pthread_mutexattr_getprotocol default is PTHREAD_PRIO_NONE
...
see https://sortix.org/os-test/basic/pthread/pthread_mutexattr_setprotocol.c
Change-Id: I2969be22ea6c3ed360f8e91bb54528f25d9bf34b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11386
Reviewed-by: waddlesplash <[email protected] >
(cherry picked from commit baed5fcddd33f266804b7e27520e06609beab624)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11387
2026-07-29 17:18:44 +00:00
Jérôme Duval
d653556ecd
uchar/wchar/wctype: reorganize definitions
...
uchar.h: only define char32_t and char16_t before c++11
found while testing libc++
https://en.cppreference.com/cpp/keyword/char16_t
https://en.cppreference.com/cpp/keyword/char32_t
add _wint_t.h and _mbstate_t.h
Change-Id: Ia5529cc9aa7316e091297f9842c3007a855f813e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11346
Reviewed-by: Adrien Destugues <[email protected] >
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: Jérôme Duval <[email protected] >
(cherry picked from commit bf1e1da47d6181dbf8122bc52801c08968e1a4ed)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11374
Reviewed-by: waddlesplash <[email protected] >
2026-07-28 16:40:41 +00:00
Jérôme Duval
be4df85d25
kernel/x86: skip dumping non-boot cpu features if they are same
...
Change-Id: If10dbeb24d6a5bf602ae02ef1d18d3fd160bff11
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11289
Haiku-Format: Haiku-format Bot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
(cherry picked from commit 5488ba1717bf161c29ff4821d7511f2728aa470b)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11290
2026-07-21 19:12:52 +00:00
Jérôme Duval
46fb8f1ca3
BBufferIO: takes buffer start in account when using pos
...
inspired by some fixes in V/OS
Change-Id: I9bad77d0bce46c36ca80573ea4e77563071a8241
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11278
Reviewed-by: waddlesplash <[email protected] >
Haiku-Format: Haiku-format Bot <[email protected] >
(cherry picked from commit f00cbd3d2bf1f577953dac063f258848bbd06a70)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11279
2026-07-20 16:56:09 +00:00
Jérôme Duval
193c5910b1
Revert "HDA: enable HDMI/DP digital audio output"
...
This reverts commit 5b81e2470e . It seems to need more work on other parts of the driver.
Reason for revert: #20171 , No output/input settings in Media preferences for HD Audio after update to hrev59825
Change-Id: I44495413f63b4b40e51563e03e20d0cf372e2c8a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11244
Reviewed-by: Jérôme Duval <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2026-07-06 06:50:55 +00:00
Jérôme Duval
31c245ae13
Workspaces: allow switching by moving with Workspaces [left|right|down|up]
...
* -i to dump the layout
* Idea taken from workspacectl
Change-Id: I8d0c4abdffc63db14f3a4ecd590439fbbfe38ce4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11127
Reviewed-by: Jérôme Duval <[email protected] >
2026-06-16 04:57:27 +00:00
Jérôme Duval
528bb58299
BStringList: add Sort() with custom functions
...
fix #9268 and a TODO
Change-Id: I3148b32221f34f5fb270d8892a6fc80f69ba2e29
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11104
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2026-06-15 14:49:00 +00:00
Jérôme Duval
43453b6774
kernel: add memory barrier around cpu thread pinning
...
should avoid instruction reorder seen on #20100 ,
could lead to pinning happening after getting the cpu
_ZL15call_single_cpujPFvPviES_b before:
mov 0x90(%rbx),%rax
addl $0x1,0xa8(%rbx)
_ZL15call_single_cpujPFvPviES_b after:
addl $0x1,0xa8(%rbx)
mov 0x90(%rbx),%rax
Change-Id: I7759c5e086856a190aac21270601ae55c0b39fac
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11050
Haiku-Format: Haiku-format Bot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2026-06-01 18:27:26 +00:00
Jérôme Duval
f0b91b00ac
servers/registrar: typo fixes, no functional changes
...
found by codespell
Change-Id: I96c3f66300f4c71f8bf9ed8da8e8417b03fc7313
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10849
Reviewed-by: waddlesplash <[email protected] >
2026-04-27 18:10:19 +00:00
Jérôme Duval
dd467f8802
servers/app: typo fixes, no functional changes
...
found by codespell
Change-Id: I3f38711c06a4e0e1edd81ddbd7ae3c01496747ee
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10848
Reviewed-by: waddlesplash <[email protected] >
2026-04-27 18:10:19 +00:00
Jérôme Duval
d8b9ecc637
posix_error_mapper: add sigaction()
...
Change-Id: Ia60aa76f74f41c9f7a3e01734a8dedcba8b88ced
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10846
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2026-04-27 07:04:45 +00:00
Jérôme Duval
5eb6e9a77e
kernel/x86: add FRED MSR and CPUID definitions
...
also add CR4 bits
Change-Id: I51ee29e1cf8124e7d1ab722bfbf4e077e31a59f1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10498
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
Reviewed-by: Adrien Destugues <[email protected] >
2026-04-21 06:58:35 +00:00
Jérôme Duval
ab25c31526
BInvoker: SetTarget() should return BMessenger constructor result
...
The BeBook indicates SetTarget() can return B_OK, B_BAD_VALUE or B_MISMATCHED_VALUES,
which are the result values of the BMessenger constructor.
Change-Id: I30f8aa84d4fb0e065a56555889a6fc3f3882d8c7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10594
Reviewed-by: waddlesplash <[email protected] >
Haiku-Format: Haiku-format Bot <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2026-04-05 14:45:16 +00:00
Jérôme Duval
a645d9d409
network/stack: use the total length in socket_receive_no_buffer()
...
fix golang sys/unix/TestSendmsgBuffers
Change-Id: I70b5431a7223ed4143dcd0d6abce27d0b6c69bd5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10415
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2026-03-09 17:59:06 +00:00
Jérôme Duval
99fe0add21
kernel/fs: a path ending with slash means a directory
...
for get_dir_path_and_leaf: the leaf is .
for create_vnode: when a name is ., can't be created.
this means dir_create() can ignore trailing slashes (like #2016 )
this fixes golang test TestRootConsistencyCreate/file_symlink_slash
Change-Id: Ib0ee956a8e2d28b572d44ba1be25a6d1341b0dfa
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10387
Haiku-Format: Haiku-format Bot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2026-03-05 17:53:22 +00:00
Jérôme Duval
5877abb102
nvme_disk: add missing parameters to nvme_*_set_feature()
...
Change-Id: Ic2abce9bab42ad19250a0fe13dc1267ac9185e89
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10335
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2026-02-17 07:29:41 +00:00
Jérôme Duval
b0e37ca074
configure: add flags when building gcc2 cross tools with a newer gcc
...
tested with gcc 15.2.0
Change-Id: I0f4a57050581c2f2b39b903037689b5b137a57d4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10330
Reviewed-by: Jérôme Duval <[email protected] >
Haiku-Format: Haiku-format Bot <[email protected] >
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: Adrien Destugues <[email protected] >
2026-02-17 07:26:57 +00:00
Jérôme Duval
c5952db482
string_for_size: switch to the the next unit with 1000
...
this avoids having longer strings like 1,001.0MiB instead of 0.98GiB
Seen with ProcessController Memory menu.
Change-Id: Ief129f615fe6a560aebe560adebbe5ba989fd2ee
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10326
Reviewed-by: waddlesplash <[email protected] >
Haiku-Format: Haiku-format Bot <[email protected] >
Reviewed-by: Jérôme Duval <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2026-02-11 16:45:51 +00:00
Jérôme Duval
eacd2d9e6a
getentropy: define GETENTROPY_MAX
...
Change-Id: Ice89aa8c2bc191e09120f23cad9483ef082190c8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10323
Reviewed-by: waddlesplash <[email protected] >
Reviewed-by: Adrien Destugues <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2026-02-10 14:23:48 +00:00
Jérôme Duval
afbcaac486
POSIX-2024: add getresuid(), setresuid(), getresgid(), setresgid()
...
remove syscalls for getuid and getgid
Change-Id: Ic6608bb65a654ff7d8fa25c8f39b71777b62b99c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9339
Reviewed-by: waddlesplash <[email protected] >
2026-01-29 17:06:11 +00:00
Jérôme Duval
ac508fcb4a
tcp: _Receive: reset connection when received another ack packet
...
while finish acknowledged and zero receive window.
* SendQueued: try to get window update when send window is zero.
* Golang test TestServerGracefulClose now passes.
tcp_receive_data generates a RST packet with a random sequence, etc.
with _SendReset, the actual connection will be used to generate the segment information, like Linux, ie:
18:07:17.657812 IP localhost.localdomain.40009 > localhost.localdomain.40034: Flags [R.], seq 184, ack 69632, win 0, options [nop,nop,TS val 34750 ecr 33649], length 0
instead of:
18:10:50.816193 IP localhost.localdomain.40051 > localhost.localdomain.40062: Flags [R], seq 1736711, win 0, length 0
Change-Id: Ib621605f74cb6d1cbc2add050bcddbf471402254
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10223
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2026-01-16 17:42:33 +00:00
Jérôme Duval
e4b96f0721
libnetwork: use inet_net_ntop and inet_net_pton from OpenBSD
...
* also used by FreeBSD, they are maintained.
* adjust port_before.h after the musl switch
* tested OK manually with the FreeBSD tests
Change-Id: Id6555aecd4df742d4762d54dd1393f05656793a3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9711
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: Adrien Destugues <[email protected] >
2026-01-12 13:08:22 +00:00
Jérôme Duval
69e473411e
tcp: fix RFC reference
...
Change-Id: Icfcec5122745035cd6b5cb3d53e69fcc48bbbe73
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10222
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2026-01-11 09:59:53 +00:00
Jérôme Duval
1a163d0ce9
Terminal: support for hyperlinks ( #18827 )
...
* support for invisible text
* support for DECSTR - soft terminal reset
Change-Id: I5cc333c7409a16fb41bcd57c5ebf2f277bd31370
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9661
Reviewed-by: Adrien Destugues <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2025-12-13 21:25:16 +00:00
Jérôme Duval
9d587f4f3f
tcp: send RST instead of FIN, when user closed and received data get lost
...
this is the abort way of closing a connection.
tested with golang's http test TestTransportGzip. All TestTransport* pass.
Change-Id: Ib79516eb8a16480d7a4425675748ff76554e9c6c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10054
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2025-12-09 10:14:36 +00:00
Jérôme Duval
0200659132
Terminal: unmask signal SIGUSR1 for child processes
...
Terminal masks SIGUSR1 in TermApp for its own use, but doesn't unmask it for the processes it creates. The bug must have been exposed by 91acc30 (kernel/team: use child-forked thread signal_mask)
Change-Id: I4eed723b50bd92d23a3e7e43bfdd2c11162ce9d4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10047
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2025-12-02 07:54:21 +00:00
Jérôme Duval
c7c819c28f
strace: send_signal and sigaction now use signal names
...
Change-Id: I5080da504899c96642bb4695eada2805fcffd773
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10036
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2025-11-30 07:56:05 +00:00
Jérôme Duval
7b2f4ab767
kernel/socket: for accept()/recvmsg() invalid user addresses are not fatal
...
needed to align with FreeBSD and Linux.
FreeBSD Test: tools/regression/sockets/accept_fd_leak/accept_fd_leak.c
Change-Id: Ia87e1713f0fb2a8010257539d2fe62cef9331c56
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9382
Reviewed-by: Jérôme Duval <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2025-11-24 08:35:48 +00:00
Jérôme Duval
c548136748
strace: dump sigset_t, sigprocmask
...
Change-Id: Idbe11f05b5a254054b2d50091fefeaf43be8dd08
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9881
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
Reviewed-by: Jérôme Duval <[email protected] >
2025-11-23 14:02:58 +00:00
Jérôme Duval
139bf65f0d
unix: handle MSG_PEEK on receive.
...
fix #18653
Change-Id: Ideaba943644481ffd6cf3e1801069508b7362c9a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9860
Reviewed-by: Jérôme Duval <[email protected] >
2025-11-15 22:30:45 +00:00
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
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
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
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
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
Jérôme Duval
90fa6d12f0
kernel/team: move check in setpgid()
...
return earlier when the target team is a session leader
(even when the old and new process groups are the same ).
Change-Id: I0b06787f9a12948c7a0722c13819f32415a3cddf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9762
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2025-10-30 07:30:43 +00:00
Jérôme Duval
e0ccf1d924
POSIX: add CMPLX(), CMPLXF(), CMPLXL()
...
appeared in issue 8:
https://pubs.opengroup.org/onlinepubs/9799919799/functions/CMPLX.html
Change-Id: I037e7368611e201df28589172f926e7a9fc52be2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9758
Reviewed-by: Jérôme Duval <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2025-10-30 07:30:43 +00:00
Jérôme Duval
7fc80d5509
kernel/team: setpgid() should check the target team
...
the target team should be the calling process or a child process of the calling process.
Change-Id: I3c365268aea0ab54ab70ae6ae50e00d8ca949332
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9757
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2025-10-28 07:22:32 +00:00
Jérôme Duval
8da1843374
kernel/signal: send_signal_to_process_group() leaks a group reference
...
* this fixes a few tests of sortix/os-test/process.
Change-Id: Ia20fd9c6e18919ce3c09d1886899f5ef547a2af8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9756
Reviewed-by: waddlesplash <[email protected] >
2025-10-27 19:20:58 +00:00
Jérôme Duval
7c089760c6
efi: fix header guard comment
...
Change-Id: I5528185d0b130fa8095b62d7865e51f22a68d8b5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9692
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: Jérôme Duval <[email protected] >
Reviewed-by: Adrien Destugues <[email protected] >
2025-10-15 06:52:57 +00:00
Jérôme Duval
6ce67a5336
smbios: support getting address from EFI
...
* prefer v3 over v2
* adding efi attributes in gBootVolume KMessage is a bit of a hack, but
shouldn't hurt older kernels.
Change-Id: If5ea19dafa5a845872eb8d577e77a6935539ce20
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9685
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2025-10-15 06:52:57 +00:00
Jérôme Duval
4719b3c5c3
boot_loader: rename gBootVolume to gBootParams
...
this will be used to hold other boot parameters, for instance smbios root pointers.
Change-Id: I004a8abe553241816c0a004225e088bad1c11b47
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9691
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2025-10-15 06:52:57 +00:00
Jérôme Duval
ba952ac9c0
nvme: support 64 LBAF formats
...
Change-Id: Ia1cc446ba1985f5e3ce80a8046aac6947b20d710
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9688
Reviewed-by: waddlesplash <[email protected] >
2025-10-13 16:04:55 +00:00
Jérôme Duval
5cf29a22c5
ipv6: handle IPV6_V6ONLY
...
Haiku only accepts v6only. Fix #19773
Change-Id: Ica3788d097019fd00f83de02f44245896a4a01d8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9663
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2025-10-03 17:36:54 +00:00
Jérôme Duval
59a481a049
Terminal: support for overlined text
...
Change-Id: I7444acb1da4c225b4af5a527fb5b0cd2d5ac2b5d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9635
Reviewed-by: waddlesplash <[email protected] >
Reviewed-by: Adrien Destugues <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2025-09-10 11:06:52 +00:00
Jérôme Duval
2858af6540
Terminal: CSI REP min value is 1
...
Change-Id: I73666750b92ed64affb975dcba207c972567ea88
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9634
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: Adrien Destugues <[email protected] >
2025-09-10 11:06:52 +00:00
Jérôme Duval
6ec9699bb5
Terminal: add support for DECRQM
...
* report mouse state, report cursor blink, report bracketed state
* introduce modes for flags to simplify the code
* keep modes in TerminalBuffer, TermParse can then write responses.
Change-Id: Id9961e90a96420ee63aca17375bd7f0a748d083a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9633
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2025-09-10 11:06:52 +00:00
Jérôme Duval
0937305b84
gnu/sched.h: fix CPU_COUNT on gcc2 C89
...
Change-Id: Ia193e342d2bbac8060189f062e35aca47426444e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9626
Reviewed-by: Adrien Destugues <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2025-09-03 15:10:23 +00:00
Jérôme Duval
e1e1c75a1f
gnu/sched.h: fix CPU_* definitions to match glibc
...
add CPU_COUNT and cpu_set_t
Change-Id: I9b92cab27a8bb4fda71a99721801013647e02588
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9618
Reviewed-by: Jérôme Duval <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2025-09-01 08:00:26 +00:00
Jérôme Duval
ad49acb949
null: merge /dev/zero and add a /dev/full
...
present on both FreeBSD and Linux.
useful to test a "disk full" condition.
Change-Id: Ibac6b50e8063c90e3e324ec04ac136c34298cc7f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9617
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2025-08-29 06:57:40 +00:00
Jérôme Duval
843f2bcce4
ext2: fix inode blocks count after enlarge or shrink
...
Change-Id: I6ac6253b761f25d567b969d8303fbf0858e47221
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9616
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2025-08-28 13:12:23 +00:00
Jérôme Duval
2df6cc0b3b
ext2: don't put the root vnode in unmount hook
...
as the vfs already put all vnodes before calling unmount.
found with the guarded heap.
Change-Id: Ia8d9ea22db1eb4241efe470bea27a00a413bedb3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9615
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2025-08-28 13:12:23 +00:00
Jérôme Duval
795849800c
ext2: remove orphan list support
...
it's too easy to get a broken orphan list.
Change-Id: Ib84e84bd685017cb7e1d1a3ae34f0fa6897aacec
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9614
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2025-08-28 13:12:23 +00:00
Jérôme Duval
aa31f66532
ext2: fix htree first splitting and checksumming
...
fix #19665
Change-Id: Id4bba3541f750a7b4756a80ee0234f34c25dcf98
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9449
Reviewed-by: waddlesplash <[email protected] >
2025-07-09 18:46:01 +00:00
Jérôme Duval
334de37d58
udp: empty address is different from uninitialized address
...
* instead teach getpeername that family is to be checked.
* fix #19652
Change-Id: I0e2150820687ca08e339adaf111918adc83b9e6b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9397
Reviewed-by: waddlesplash <[email protected] >
2025-06-26 15:09:13 +00:00
Jérôme Duval
2b9fdf7847
ipv4: empty address should be a zero sa_len
...
UdpDomainSupport::ConnectEndpoint() uses SetToEmpty() to unconnect when used
with AF_UNSPEC.
checked against the output of the test sortix/os-test/udp/connect-unconnect-getpeername
Change-Id: Iccfa46399a0e14057459966a2f406469566bcbac
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9396
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2025-06-26 05:43:59 +00:00
Jérôme Duval
48e3aa8081
kernel/socket: allow sendto to an empty address
...
should return EDESTADDRREQ for UDP
checked against the output of the test sortix/os-test/udp/sendto-null
Change-Id: I3bc61e0cc9d75319d61f0395f1ae45d28171bfef
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9395
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2025-06-26 05:43:59 +00:00
Jérôme Duval
74be257edf
udp: send should return the error on the last send packet
...
checked against the output of the test sortix/os-test/udp/connect-send-error-send
* icmp: add more error codes
Change-Id: I7b1695d37cf5eae8cd09132047404b990f8791dd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9394
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2025-06-26 05:43:59 +00:00
Jérôme Duval
f2a0f2a3e0
udp: implement shutdown()
...
instead of returning B_NOT_SUPPORTED.
* this fixes a few tests of sortix/os-test/udp.
Change-Id: I961e71cc419ce7ab38419749a42df8737e272c83
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9392
Reviewed-by: waddlesplash <[email protected] >
2025-06-25 13:24:25 +00:00
Jérôme Duval
3aaa4c9d96
udp: a second bind on broadcast address should error with EADDRNOTAVAIL
...
Testcase: https://gitlab.com/sortix/os-test/-/blob/master/udp/bind-conflict-loopback-broadcast.c
Change-Id: I37c6d05910c3d9573610207b650f1957bccd1e47
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9390
Reviewed-by: waddlesplash <[email protected] >
2025-06-24 17:33:06 +00:00
Jérôme Duval
090519cfe5
network/stack: socket_accept: return B_NOT_SUPPORTED for non-stream sockets
...
Testcase: https://gitlab.com/sortix/os-test/-/blob/master/udp/accept.c
Change-Id: I9020292facb47339ede31a8d1c49d197e40d6ca9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9389
Reviewed-by: waddlesplash <[email protected] >
2025-06-24 17:33:06 +00:00
Jérôme Duval
3ef89f758f
network/stack: socket() can error with EPROTOTYPE/EPROTONOSUPPORT
...
as POSIX requires.
Change-Id: Iee15bd3db6283a52ac5bc68be99752f36e12f1ee
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9384
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2025-06-20 22:26:35 +00:00
Jérôme Duval
0b97e6ab9a
tcp: don't notify EPIPE/ENOTCONN when no connect or listen happened
...
Change-Id: I18bf8ceee7963729c5037e39fc1c23f243eba0bb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9380
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2025-06-20 11:55:44 +00:00
Jérôme Duval
0847894277
tests/storage: reorder tests
...
Change-Id: Ic57c14c8124778b01357ef1afe6c7de7ad7aca8c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9383
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2025-06-19 15:51:33 +00:00
Jérôme Duval
914d5aea44
kernel/events: event_queue shouldn't be kept after fork()
...
_user_event_queue_wait(): when no timeout is passed, it means infinite timeout
Change-Id: Ic064551251413da8f4788f91d92c13c40201548a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9379
Reviewed-by: waddlesplash <[email protected] >
2025-06-18 17:06:19 +00:00
Jérôme Duval
0b9af29d07
kernel/socket: shutdown() now checks argument how
...
Change-Id: I1d3c7b1e07588f712da094c1872cb63635e4eeee
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9378
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2025-06-17 22:33:08 +00:00
Jérôme Duval
5ac839cb94
kernel/fs: vnode_path_to_vnode(): check directory on trailing slash
...
fix #14352
Change-Id: I2fb7f0f455f46f0b5b2fe0eb487896f41b33a44b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9335
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2025-06-10 16:00:13 +00:00
Jérôme Duval
23f923bcaf
libbsd: add closefrom() and close_range()
...
Change-Id: I9c88948d6c4d5a32e3aa06cd696e2ce24c2d298f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9334
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2025-06-09 16:26:13 +00:00
Jérôme Duval
396ebbc16f
POSIX-2024: support for MSG_CMSG_CLOEXEC and MSG_CMSG_CLOFORK
...
Change-Id: I55551860fb7dac5d0c11a6d4201502fff9ab2d13
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9332
Reviewed-by: waddlesplash <[email protected] >
Reviewed-by: Jérôme Duval <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2025-06-09 16:26:13 +00:00
Jérôme Duval
904fd2abf0
POSIX-2024: support for O_CLOFORK, SO_CLOFORK
...
Change-Id: I4f3a961947eefdeafd5a249499899cc92d67c2d1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9330
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2025-06-09 16:26:13 +00:00
Jérôme Duval
7b2b77d482
kernel/x86: fix syscall parameters calling user_debug_post_syscall()
...
regression introduced in hrev58093
Change-Id: Ic1a508485c64964b0e2aab85db0989e3a707c958
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9325
Reviewed-by: waddlesplash <[email protected] >
2025-06-03 19:37:39 +00:00
Jérôme Duval
4bb864d0a6
ext2: enable the checksum_seed feature
...
Change-Id: I5a34ae9247220f3c40441623bef2b3806b56d934
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9312
Reviewed-by: Jérôme Duval <[email protected] >
2025-05-28 15:19:17 +00:00
Jérôme Duval
3646c0e4ed
tcp: retransmit SYN when not acknowledged after some time
...
* 4 times one second then exponential back off
* fix #19575
Change-Id: If9348191e1c8260f381e0e6fec338cfe83d53660
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9283
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
Reviewed-by: Jérôme Duval <[email protected] >
2025-05-15 08:00:38 +00:00
Jérôme Duval
bfce786a2e
nvme: actually pass parameters to nvme_admin_set_feature()
...
align len parameter type
noticed by waddlesplash, thanks!
Change-Id: I3d9352f253ca0fc3f2be5966e10a354f3f47ef4b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9199
Reviewed-by: waddlesplash <[email protected] >
2025-04-22 20:55:36 +00:00
Jérôme Duval
d6547c7f81
kernel & libbsd.so: add getloadavg() and _user_get_loadavg()
...
the algorithm and reference values are from FreeBSD.
Change-Id: Ia74a796e13adce6a70434c7546c25ca3d553f11f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9150
Reviewed-by: waddlesplash <[email protected] >
Reviewed-by: Jérôme Duval <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2025-04-21 18:43:29 +00:00
Jérôme Duval
893afab7d1
kernel/fs: create_dir should return EEXIST before EROFS
...
fix #19123
Change-Id: I020ba4fd69a765d3bafa578512ad127384a85e3b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9142
Reviewed-by: Jérôme Duval <[email protected] >
Reviewed-by: Adrien Destugues <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2025-03-24 21:24:36 +00:00
Jérôme Duval
ce6f846b6f
Update haiku-current.list, add haiku-r1beta4.list and haiku-r1beta5.list
...
Change-Id: I00300242e56e50ab312e92057be9113e310af43e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9141
Haiku-Format: Haiku-format Bot <[email protected] >
Reviewed-by: Adrien Destugues <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2025-03-23 17:26:38 +00:00
Jérôme Duval
ba4b365101
runtime_loader: resolves to weak symbols for non-gcc2 images
...
non-gcc2 can hide conflicting symbols, thus resolving to weak symbols
shouldn't be a problem. This permits add-ons to use the static asan
allocator in the main image.
Change-Id: I28bdd45e636afa4e97dc88b0cc956eae58df1009
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9133
Reviewed-by: Adrien Destugues <[email protected] >
Haiku-Format: Haiku-format Bot <[email protected] >
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2025-03-21 08:12:50 +00:00
Jérôme Duval
5cce8bc757
nvme_disk: enable the autonomous power save feature
...
if available.
we follow the algorithm in Linux, choosing at most two power states
with low and higher latencies. this allows to save about 1W power
on a WD Blue SN570 device.
Change-Id: Ic403ec19765e9abff54aed4f6d7dcad8f22695ae
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9137
Reviewed-by: Jérôme Duval <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2025-03-19 22:51:01 +00:00
Jérôme Duval
0890cb4057
nvme: print available power states
...
Change-Id: I0e092211e8cd411e199439e4bc250aaa4488e7ae
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9136
Reviewed-by: waddlesplash <[email protected] >
2025-03-19 18:29:50 +00:00
Jérôme Duval
41f477706a
kernel/lib: vsnprintf correctly prints fractions smaller than 0.1
...
zeros between the dot and the next digit were missing.
Change-Id: Ibac3364866d978e140235594c1c173ba19c31f2e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9135
Haiku-Format: Haiku-format Bot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2025-03-19 17:40:17 +00:00
Jérôme Duval
7aa3dc423e
launch_daemon: fix stopping services
...
* Job::GetMessenger(): try harder to check the application is valid, not only preregistered.
* LaunchDaemon::_StopJob(): signal SIGTERM instead of SIGINT, to stop the process.
* fix #13320
Change-Id: I612ff0de9bf064fd0a1e1f149cc6021bfaac93bd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9127
Haiku-Format: Haiku-format Bot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2025-03-15 18:33:16 +00:00
Jérôme Duval
34c270d993
RosterPrivate: add missing parameters in documentation
...
Change-Id: I7e9ba8fa07eaf95717a31f51273653340864e731
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9126
Reviewed-by: waddlesplash <[email protected] >
2025-03-15 18:33:16 +00:00
Jérôme Duval
3bb7234bcb
launch_daemon: job is launching when condition is met
...
fix Tracker and Deskbar not starting on first boot
Change-Id: I7e1f8009ccb1e620549952d9372a0532e80a633b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9125
Haiku-Format: Haiku-format Bot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2025-03-15 13:20:44 +00:00
Jérôme Duval
bf0c6bfb90
libnetwork: freeifaddrs() deletes with the right type
...
to silence libasan on libnetwork
Change-Id: I0a2c35569fe2092d047c830d40763317eb1c4d1b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9123
Reviewed-by: waddlesplash <[email protected] >
Haiku-Format: Haiku-format Bot <[email protected] >
2025-03-14 18:30:13 +00:00
Jérôme Duval
52c25f31c7
launch_daemon: setting condition also checks for driver_settings
...
only checks for a field, or field = value
Change-Id: I5dfadb6187831a51e97064cdfed55430b74f7b30
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9117
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2025-03-11 02:15:39 +00:00
Jérôme Duval
778fe0b67b
driver_settings: bufferSize being zero means buffer overflow
...
Change-Id: I87b4a57c651840ac6aa01d602eddabb192c8c323
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9116
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2025-03-11 02:15:39 +00:00
Jérôme Duval
63792e3fd0
Revert "driver_settings: Replace type of bufferSize from size_t to ssize_t"
...
This reverts commit d2a423e499 .
this matches the method found in driver_settings.h
Change-Id: Idb1a83dd648d18916ee2ec34727c88fb8f25cb3e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9095
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2025-03-11 02:15:39 +00:00
Jérôme Duval
7f7d085c59
launch_daemon: implement file_created event
...
Change-Id: Ie42abe85c594be3c354e2d1b5bb25b881a7adea4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9089
Reviewed-by: Jérôme Duval <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2025-03-11 02:15:39 +00:00
Jérôme Duval
e4e3f81a1b
launch_daemon: failed condition now skips the job
...
Change-Id: I0d3db96a068ecc40dfd1c501dfae5800c0e28116
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9080
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2025-03-11 02:15:39 +00:00
Jérôme Duval
91880bad83
kernel/vm: when resizing down a VMCache, fill a partial page with zeros
...
* factored out file_cache
* fix two gVisor tests: MMapFileTest.ReadSharedTruncatePartialPage
and MMapFileTest.WriteSharedTruncatePartialPage
* fix #19438
Change-Id: Ia7f119478d306ab6d867632e4a5270733f0b29df
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9060
Reviewed-by: waddlesplash <[email protected] >
2025-02-26 17:14:18 +00:00