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
Jérôme Duval
64a0bc243c
pthread_key: when calling destructors, iterates over keys again
...
when a non-null value is found, up to PTHREAD_DESTRUCTOR_ITERATIONS (4).
* fixes LLVM unit test SanitizerCommon.PthreadDestructorIterations.
Change-Id: I1f9f4d3e8723261326e6e22b0f0d23907dccb59f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8979
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2025-02-14 18:27:12 +00:00
Jérôme Duval
74b5b25f77
virtio_pci: accept any pci revision for modern devices
...
as in the specification.
Change-Id: I74d667daea386d3189095542d8f515fc3711a910
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8978
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2025-02-14 12:59:38 +00:00
Jérôme Duval
12b22e8e48
strace: mapping type handler for _kern_map_file()
...
Change-Id: I1f315c285668221fb9ff15165c81dfcd753d7df8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8977
Reviewed-by: waddlesplash <[email protected] >
2025-02-14 12:59:38 +00:00
Jérôme Duval
74e01ea162
BMenuField: SetLabel(): do nothing if current and new label are NULL
...
Change-Id: Ia4bb6f99d3b633a23a43624208e16cb7e4ae0399
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8940
Reviewed-by: X512 X512 <[email protected] >
Reviewed-by: Axel Dörfler <[email protected] >
Reviewed-by: John Scipione <[email protected] >
Tested-by: Commit checker robot <[email protected] >
Haiku-Format: Haiku-format Bot <[email protected] >
2025-02-10 21:53:08 +00:00
Jérôme Duval
46dd344bdd
strace: Add tracing for rlimit syscalls.
...
Change-Id: I1e99622027f04fb93d00ebd94b45e05f7142fbec
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8965
Reviewed-by: waddlesplash <[email protected] >
2025-02-10 20:17:28 +00:00
Jérôme Duval
146617c29b
runtime_loader: dlsym(RTLD_NEXT) searches all regions for the caller address
...
clang/lld can put code in multiple regions.
Change-Id: I495e3f12105ef2e894809da7e4a91bac08a12fd6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8961
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
Haiku-Format: Haiku-format Bot <[email protected] >
2025-02-10 07:37:47 +00:00
Jérôme Duval
b5eb38ec58
shared: use the correct delete for array
...
to silence libasan on libtracker.so
Change-Id: I7c634271f4ec2b4ca0d5f76c18ddbfc7dddf2793
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8910
Reviewed-by: Axel Dörfler <[email protected] >
2025-02-05 16:35:47 +00:00
Jérôme Duval
b71707da2c
kernel: comment should match the guard macro
...
Change-Id: I4cfa9eda18f3502e50adff9ffa8ded47f318f372
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8909
Reviewed-by: Axel Dörfler <[email protected] >
2025-02-05 16:35:23 +00:00
Jérôme Duval
d59339ff6c
x86_cstates: disable C5 and C6 states on Skylake
...
could help with #19341
see https://bugzilla.kernel.org/show_bug.cgi?id=109081
Change-Id: Ide72f46193093c3c4695c39d4466e9418808cbd0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8881
Reviewed-by: waddlesplash <[email protected] >
2025-02-04 17:22:34 +00:00
Jérôme Duval
6c380f3c8e
kernel/x86: add definitions for cpuid leaves
...
remove feature_5_ecx
Change-Id: I247a37c875e5dd04f2239fdceeef67e402b1245d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8880
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: Adrien Destugues <[email protected] >
2025-02-04 17:22:34 +00:00
Jérôme Duval
aedcf2476d
virtualkeyboard: update keymap when it changed
...
load current keymap on start
Change-Id: I1030cf5aaf9641f7e915f8fc10dec3144cab014f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8904
Reviewed-by: waddlesplash <[email protected] >
2025-02-03 21:27:47 +00:00
Jérôme Duval
0328ffe12a
virtualkeyboard: add a hook for ScreenChanged()
...
Change-Id: I18d2a4e7e29858406c75dae54c6ea6c5f5e0c26b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8903
Reviewed-by: waddlesplash <[email protected] >
2025-02-03 17:14:39 +00:00
Jérôme Duval
9d2283baab
virtualkeyboard: style fixes
...
Change-Id: Iee76c0cae38a0677b60e51f73aa0e2e5d9b7c2ee
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8902
Reviewed-by: waddlesplash <[email protected] >
2025-02-03 17:14:39 +00:00
Jérôme Duval
c8cd427e30
build: extend stack protection
...
* use -fstack-protector-strong and -fstack-clash-protection
* also bin and some user add-ons
Change-Id: I593365e55414ac447bde54980a5c73202e9bb172
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8887
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
Reviewed-by: Adrien Destugues <[email protected] >
Haiku-Format: Haiku-format Bot <[email protected] >
2025-02-03 17:14:18 +00:00
Jérôme Duval
3805924471
kernel: fix warning
...
warning: "user_strlcpy" redefined
Change-Id: I2a0a4307e1ca8904ced7eafb498f9ea94d538362
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8893
Haiku-Format: Haiku-format Bot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2025-02-01 20:21:26 +00:00
Jérôme Duval
cb5d195553
fs_shell: fix warning
...
warning: too many arguments for format [-Wformat-extra-args]
Change-Id: If35737dc2fe193923aa1d756cfd10ca6d820a09e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8892
Reviewed-by: waddlesplash <[email protected] >
Haiku-Format: Haiku-format Bot <[email protected] >
2025-02-01 20:21:26 +00:00
Jérôme Duval
f9af89e754
RemoteMessage.h: fix warning
...
error: 'rectCount' may be used uninitialized [-Werror=maybe-uninitialized]
Change-Id: Id899f6ef9c249861dbe286a71109c461501519b4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8891
Reviewed-by: waddlesplash <[email protected] >
Haiku-Format: Haiku-format Bot <[email protected] >
2025-02-01 20:21:26 +00:00
Jérôme Duval
e01dfaf620
build: add acpi_thermal, amd_thermal and pch_thermal to minimum definition
...
Change-Id: I943b77390266c4e444ddb406455ebaa6a9549565
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8856
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: Jérôme Duval <[email protected] >
Haiku-Format: Haiku-format Bot <[email protected] >
2025-01-23 05:25:54 +00:00
Jérôme Duval
4d5debea9e
amd_thermal: new driver
...
inspired by ksmn in OpenBSD
Change-Id: Ic272fc15f1ea082496db99ed2df15c77655ba9c7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8855
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2025-01-23 05:25:54 +00:00
Jérôme Duval
77f06cf2ae
pch_thermal: use user_memcpy() to write in a user buffer
...
Change-Id: I8eccde638ba30051fcec375b7d616e1d1bddf5ed
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8854
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2025-01-23 05:25:54 +00:00
Jérôme Duval
5a2be54dd0
kernel: data_acquisition_other is also found in drivers
...
Change-Id: Ia3f9c661a97b54d9bfa33ca0df9f5bd773023c2f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8853
Haiku-Format: Haiku-format Bot <[email protected] >
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2025-01-23 05:25:54 +00:00
Jérôme Duval
04c90835ac
POSIX: add pthread_getcpuclockid()
...
fix #15615
Change-Id: I6b34f97464fac97d0b339fa338cfc5df34536080
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8681
Reviewed-by: Jérôme Duval <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2024-12-17 09:45:13 +00:00
Jérôme Duval
d866277547
virtio_pci: in setup_queue(), only check queue number on v1 devices
...
* fix #18962
* bus->queue_count wasn't initialized yet so the check could succeed
or not, depending on the init value for memory: on release, 0 mostly,
on nightly, a non-zero value.
Change-Id: Id745932e8171abe3b8b78a3e9b2f2058c9507f7a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8618
Tested-by: Commit checker robot <[email protected] >
Haiku-Format: Haiku-format Bot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2024-12-01 19:32:25 +00:00
Jérôme Duval
fbdac8d61e
headers: Don't define static_assert for C23 and C++
...
Change-Id: I1e67b09b2a310de5cf41c4eef9af46f78b4e9de0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8586
Reviewed-by: waddlesplash <[email protected] >
2024-11-21 19:26:51 +00:00
Jérôme Duval
0edecdc00e
BBitmap: Amend special-casing for B_RGB32 in SetBits.
...
* Spirograph uses SetBits with length 1 und 4, which can't work as
expected. As Spirograph uses the same source and target colorspace,
the memcpy codepath is used with the right length.
* fix #12931
Change-Id: I4f27e748fb842c2d81d4161e7c94586844995bdf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8562
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: Adrien Destugues <[email protected] >
Haiku-Format: Haiku-format Bot <[email protected] >
2024-11-20 10:03:58 +00:00
Jérôme Duval
ba8970a3e0
haiku_loader.efi: add support for rgb16
...
Change-Id: I7634b8734d057f99d69c494ea941e1f38f94b757
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8564
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: Adrien Destugues <[email protected] >
2024-11-15 02:06:28 +00:00
Jérôme Duval
1e3e4210de
FAT: restore all lowercase labels, the behavior from r1beta4.
...
Change-Id: If65e2899b841cfb6be68b7f896a0cb199098232d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8530
Tested-by: Commit checker robot <[email protected] >
Haiku-Format: Haiku-format Bot <[email protected] >
Reviewed-by: Axel Dörfler <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2024-11-11 10:11:08 +00:00
Jérôme Duval
a31d463b38
Screen: initialize fUserSelectedColorSpace
...
should fix #19244
Change-Id: I629cd6689409f91a6399d3cca821759b59c94a0a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8558
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2024-11-10 19:52:34 +00:00
Jérôme Duval
67c520afb0
auvia & es1370: let userland access audio buffers
...
Change-Id: I23873c7e102f0a0ba112f427d72b185887755835
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8521
Haiku-Format: Haiku-format Bot <[email protected] >
Reviewed-by: Adrien Destugues <[email protected] >
2024-11-05 16:54:59 +00:00
Jérôme Duval
7190c0f117
libroot: add tcgetwinsize() and tcsetwinsize() for POSIX.1/2024
...
Change-Id: I46c0b7b5b9c8e7c74278a6e10e9b83142db21d94
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8520
Reviewed-by: waddlesplash <[email protected] >
2024-11-04 17:55:40 +00:00
Jérôme Duval
7a4e12b7b8
libroot: add ptsname_r for POSIX.1/2024
...
Change-Id: I9996ff998b2b52a65a101cf7075a3ffb37220962
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8519
Reviewed-by: waddlesplash <[email protected] >
2024-11-04 17:55:40 +00:00
Jérôme Duval
8b5cc9cf52
libroot: move memmem for POSIX.1/2024
...
Change-Id: I1b051586c993cd0e3d43abaa22a3722699f7134e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8517
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2024-11-04 17:55:40 +00:00
Jérôme Duval
6beff0d163
kernel/libnetwork: add accept4() from POSIX.1/2024
...
* add SOCK_NONBLOCK and SOCK_CLOEXEC
* also extends the type parameter on socketpair() and socket()
Change-Id: I73570d5bfb57c2da00c1086149c9f07547ba61ce
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8515
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2024-11-04 17:55:40 +00:00
Jérôme Duval
966076b273
kernel/libroot: add dup3() from POSIX.1-2024
...
this adds a parameter to the dup2 syscall. Adjust strace.
Change-Id: Icc2d0e054365865d38e5d596843a47c95100ca59
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8514
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2024-11-04 17:55:40 +00:00
Jérôme Duval
11cd4af6e1
kernel/libroot: add pipe2() from POSIX.1-2024
...
this adds a parameter to the create_pipe syscall. Adjust strace.
Change-Id: I83e9f039eb28c862458654b66c03e2e21a258822
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8513
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2024-11-04 17:55:40 +00:00
Jérôme Duval
30179dd326
libroot: add reallocarray() from POSIX.1-2024
...
Change-Id: I75d469ad9a01eb221ca607830589a7794eff71e8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8512
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2024-11-04 17:55:40 +00:00
Jérôme Duval
53cab618ef
kernel/legacy_drivers: check priority when finding a driver with the same leaf name
...
* fix get_priority(): only compares the path length, not the buffer length.
* fix #17264 second part (don't replace the user driver with the system one)
Change-Id: I199ba5751884a4f2ec86f6d9fb81cd560fe164a8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8500
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2024-10-22 18:42:05 +00:00
Jérôme Duval
89264cfe2e
kernel/legacy_drivers: reverse order of search for kernel add-ons
...
* DirectoryIterator uses a stack to hold the paths values, pushed in SetTo(),
then popped with GetNext(). So the path directories have to added in reverse
order.
* fix #17264
Change-Id: I728365f069071f109c79e647d6a33cd24f68ce0e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8498
Tested-by: Commit checker robot <[email protected] >
Haiku-Format: Haiku-format Bot <[email protected] >
Reviewed-by: Jérôme Duval <[email protected] >
2024-10-21 16:26:23 +00:00
Jérôme Duval
e4a557f372
kernel/fifo: honor O_NONBLOCK on open() for FIFOs
...
according to POSIX:
- O_NONBLOCK set:
* read-only open() shall return asap
* write-only open() shall return an error if no reader.
- O_NONBLOCK clear:
* read-only open() shall block until a writer opens.
* write-only open() shall block until a reader opens.
for FIFOs used for pipes, open with O_NONBLOCK then reset O_NONBLOCK.
can be tested with:
bash -norc -c '/bin/printf "test" > >(/bin/tee -a trace.log) 2>&1'
Change-Id: I3cb70810fec50f643b5e6e84dbdeb0a16961936a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8469
Reviewed-by: waddlesplash <[email protected] >
2024-10-19 18:39:49 +00:00
Jérôme Duval
039f93ce5e
ActivityMonitor: restores default position when it starts out of screen
...
Change-Id: Ied6339a900f3314be39a7ec1a4b9906d20c529e7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8373
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
Haiku-Format: Haiku-format Bot <[email protected] >
Reviewed-by: Jérôme Duval <[email protected] >
2024-09-30 15:57:23 +00:00
Jérôme Duval
ad747ccb1c
virtio_pci: Fix index out of bounds
...
* Update size of registersArea[] to fix index out of bounds
in init_bus() and uninit_bus() caused by mismatching
between sizeof(registersArea[]) and loop counters.
Pointed out by cppcheck.
* actually use index to populate registers and registersArea arrays.
Change-Id: Iec6337c7dd475bb86f94fe8f2a7b8fed9776ee28
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8376
Reviewed-by: waddlesplash <[email protected] >
Haiku-Format: Haiku-format Bot <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2024-09-30 15:57:23 +00:00
Jérôme Duval
1c64d7a913
virtio_pci: poll device status after resetting the device
...
From the spec:
"After writing 0 to device_status, the driver MUST wait for a read
of device_status to return 0 before reinitializing the device."
Change-Id: Ib708d6ec843877b40cdb64c15beacec3dcc4c009
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8358
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2024-09-24 16:16:14 +00:00
Jérôme Duval
0f807f4401
kernel/x86: dump hwpstate, cpb, proc_feedback features
...
Change-Id: I06b6da05013c7271d0a97d5aa3af2b6f416496a9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8331
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: Jérôme Duval <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2024-09-18 16:21:44 +00:00
Jérôme Duval
017c5e70d5
Shortcuts: Mute shortcut is now from "toggle mute" instead of "mute"
...
Change-Id: I62ded761ac096d5ae29d7c82e0d562995a2c3811
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8347
Reviewed-by: Axel Dörfler <[email protected] >
2024-09-18 14:01:55 +00:00
Jérôme Duval
c936122410
intel: enable the active checkbox, if it's the first primary partition
...
* also set the active checkbox on edit
* part of #7930
Change-Id: Ia91e5f7295e7868647cf940aa1f281bd8dab1918
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8323
Haiku-Format: Haiku-format Bot <[email protected] >
Reviewed-by: Adrien Destugues <[email protected] >
2024-09-12 18:44:32 +00:00
Jérôme Duval
6533131daf
posix: dladdr was introduced in POSIX-2024, but with Dl_info_t
...
instead of Dl_info
Change-Id: Id2fe6d4b094c57ea49260c5765206c5e4bac5a63
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8274
Reviewed-by: Adrien Destugues <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2024-09-11 14:02:22 +00:00
Jérôme Duval
1754f053a3
pthread: add PTHREAD_MAX_NAMELEN_NP for pthread_setname_np
...
Change-Id: I52e9e8a672f76048e1ff0c4a6ddeeecb2d134a5a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8259
Reviewed-by: Axel Dörfler <[email protected] >
2024-09-09 14:41:35 +00:00
Jérôme Duval
c27e4aff72
kernel: link with orphan sections warning
...
* this avoid letting the linker defaults to take precedence.
* add common/debuginfo.ld taken from ppc/kernel.ld for debug sections,
extended by me for Dwarf 4/5.
* put the __bss_start symbol in the .bss section.
* add asserts for expected empty sections on x86 or x86_64.
Change-Id: If34433a8d7d82b3f115fe6dbf5881c1f9ea42442
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8229
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
Haiku-Format: Haiku-format Bot <[email protected] >
2024-09-05 15:17:47 +00:00
Jérôme Duval
1512c9d2f3
Add the linprog headers to the haiku_devel package.
...
these are required by libalm headers
Change-Id: I7eb0164383ca919f0ede72952759a85a66a88c70
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8086
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
Haiku-Format: Haiku-format Bot <[email protected] >
2024-08-21 17:17:43 +00:00
Jérôme Duval
6aab5c47c2
XHCI: define the SuperSpeedPlus ID for 10Gbps connection speed
...
can be found on USB 3.1 xhci controllers in the PORTSC register
Change-Id: I11df7e22ca1ab71b42325f8c3db1e4745287feeb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7923
Haiku-Format: Haiku-format Bot <[email protected] >
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2024-08-01 04:24:54 +00:00
Jérôme Duval
f00e314e57
kernel: Vector: fix warning
...
template-id not allowed for constructor in C++20
Change-Id: I562856908ab2deb9fdbf6bf24eedb58e5ebf6c9f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7908
Tested-by: Commit checker robot <[email protected] >
Haiku-Format: Haiku-format Bot <[email protected] >
Reviewed-by: Jérôme Duval <[email protected] >
2024-07-29 08:11:40 +00:00
Jérôme Duval
7ffd2c9e59
kernel: LegacyDevice: SetHooks() needs a non-null fDeviceModule
...
fix gcc analyzer warning
Change-Id: Ic2aaeebb516f680ba40c343c01d5be1a9232d46d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7907
Haiku-Format: Haiku-format Bot <[email protected] >
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: Jérôme Duval <[email protected] >
2024-07-29 08:11:40 +00:00
Jérôme Duval
9d18e52191
kernel: newGroups was allocated with malloc, deallocate with free()
...
fix gcc analyzer warning
Change-Id: I0427a3d9b288e081055242fff59f2e15e478dac6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7904
Reviewed-by: waddlesplash <[email protected] >
Haiku-Format: Haiku-format Bot <[email protected] >
2024-07-26 16:14:04 +00:00
Jérôme Duval
e21d313387
kernel: use nothrow for ThreadSignalEvent::Create()
...
fix gcc analyzer warning
Change-Id: Iaa8eb238dd0efd5315613e8afa932da4853ffc92
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7903
Haiku-Format: Haiku-format Bot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2024-07-26 16:14:04 +00:00
Jérôme Duval
987a1436b3
udis86: remove
...
switch credits in AboutSystem from udis86 to zydis
Change-Id: I03a7965a272c50714df9726e53c7d4067d8f1925
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7850
Reviewed-by: waddlesplash <[email protected] >
2024-07-17 19:11:50 +00:00
Jérôme Duval
34b59fca80
Debugger: switch to zydis for x86 and x86_64
...
Change-Id: Iec6d21bc989c3d532c175fd78a2339fede3df1dd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7849
Reviewed-by: waddlesplash <[email protected] >
2024-07-17 19:11:50 +00:00
Jérôme Duval
06b1eff6ec
zydis: build static lib
...
* for GCC2 build with a modern GCC as suggested by waddlesplash
* make the headers compatible with GCC2
Change-Id: Ice74eeddbe10bc8f9cf9ae90baa833a46bb3c676
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7848
Reviewed-by: waddlesplash <[email protected] >
2024-07-17 19:11:50 +00:00
Jérôme Duval
cb130a72e8
disasm: switch to zydis on x86/x86_64
...
Change-Id: I72a006cb217e14228fce0f5e0b8aa8470c1bfba9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7839
Tested-by: Commit checker robot <[email protected] >
Haiku-Format: Haiku-format Bot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2024-07-17 19:11:50 +00:00
Jérôme Duval
1003e004e6
Import Zydis 4.1.0
...
* udis86 isn't updated since 2014. New SIMD opcodes are missing.
Thus replaces udis86 with Zydis, which is actively developed and used in
Webkit, SpiderMonkey. It is under MIT license.
* encoder code is removed
Change-Id: Ieae7e829e186ce7d4a6df640c62561ad220858fe
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7847
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2024-07-17 19:11:50 +00:00
Jérôme Duval
4169a972ee
POSIX: move getentropy(2) from libbsd
...
Specified in POSIX.1-2024
https://www.austingroupbugs.net/view.php?id=1134
Change-Id: Ie715a102aa6f7764bc639e0a1874a6c7f7d81019
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7846
Reviewed-by: waddlesplash <[email protected] >
2024-07-16 16:09:00 +00:00
Jérôme Duval
6c9192d702
kernel: revert unneeded change, requested by waddlesplash
...
Change-Id: If55f93ed75dc20363de9bf0022d93800f5a9661f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7816
Reviewed-by: Jérôme Duval <[email protected] >
2024-06-27 16:16:23 +00:00
Jérôme Duval
28748463d9
kernel: check for NULL core in power_saving mode choose_core()
...
Change-Id: I94fccef73c4254888ad71dfbc748fac72e5bc124
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7795
Reviewed-by: Jérôme Duval <[email protected] >
Haiku-Format: Haiku-format Bot <[email protected] >
2024-06-26 10:35:33 +00:00
Jérôme Duval
61607003b1
kernel: check for NULL smallTaskCore in power_saving mode rebalance()
...
should fix power saving issue from #18915
Change-Id: Ie0d64445599a3f3af6b2c7f654b20e26bd4e3b8b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7790
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
Haiku-Format: Haiku-format Bot <[email protected] >
2024-06-25 20:53:36 +00:00
Jérôme Duval
0e72f7e22f
ps2: republish debugger command should use keyboard number 5 by default
...
should fix #18919 , I couldn't reproduce the crash locally.
Change-Id: Ic522c299a758a98e83de03a0e84014e97984ae69
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7785
Haiku-Format: Haiku-format Bot <[email protected] >
Reviewed-by: Adrien Destugues <[email protected] >
2024-06-20 16:17:10 +00:00
Jérôme Duval
43db77b370
kernel: fix race condition on boot, using SetBitAtomic
...
fix #18915
Change-Id: Ia8829822e21f6d6b765746ddab05f8781385745f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7777
Haiku-Format: Haiku-format Bot <[email protected] >
Reviewed-by: Fredrik Holmqvist <[email protected] >
Reviewed-by: Jérôme Duval <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2024-06-14 06:07:23 +00:00
Jérôme Duval
c5a740cdb2
gnu: add pthread_setaffinity_np()/pthread_getaffinity_np()
...
* also sched_setaffinity/sched_getaffinity() added.
* add a test
Change-Id: Id8c308788f6364f5340b4991def2fbb9a05da728
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7675
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2024-06-10 16:34:25 +00:00
Jérôme Duval
f7a85eea15
kernel: add syscalls for thread affinity
...
scheduler modes adapted to take into account the thread affinity mask.
when no cpu in the affinity mask is enabled, the mask is ignored.
Change-Id: I577737441ab073941a4c5e06f94f7825cffdc2c4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7674
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2024-06-10 16:34:25 +00:00
Jérôme Duval
1dde4c4b94
kernel/smp: change CPUSet::SetBit() and CPUSet::ClearBit() bit order
...
add CPUSet::And() and CPUSet::Matches().
Change-Id: I210c900527f6ee246916d5eb4547d8003c2bc631
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7673
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
Haiku-Format: Haiku-format Bot <[email protected] >
2024-06-10 16:34:25 +00:00
Jérôme Duval
c38a5f9099
ProcessController: save and restore "Power saving" mode
...
fix #11823
Change-Id: I1284587fa814cd3e121e1c5913f0fe1e15865d9d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7670
Reviewed-by: waddlesplash <[email protected] >
2024-05-17 17:26:34 +00:00
Jérôme Duval
baa67e1184
boot/bios_ia32: check that the vga mode was successfully set
...
before trying to write to the frame buffer.
* QEMU can now be started without a standard vga output (-vga none).
Change-Id: Id46cd4d70ce16e2156e0b0668fb88f09112067a0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7667
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2024-05-04 17:05:40 +00:00
Jérôme Duval
f758e73fe6
libbsd: add pthread_sigqueue()
...
* like sigqueue() but for threads. was added recently to FreeBSD, long before to glibc.
* also include features.h in gnu/pthread.h
Change-Id: I73bca666e2c67d7ff05f341bf85d71df9ccccbe5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7659
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2024-05-02 18:07:23 +00:00
Jérôme Duval
d2ac1f5ab2
network/stack: inherit selected options from the parent socket
...
similar commit in FreeBSD:
https://github.com/freebsd/freebsd-src/commit/d29b95ecc0d049406d27a6c11939d40a46658733
Change-Id: I370d39c603a3f54158aa2eaf2ad5a30e744beda0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7658
Haiku-Format: Haiku-format Bot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2024-05-01 17:54:36 +00:00
Jérôme Duval
85ea044bdb
intel_reg: tool to read and write mmio registers
...
the intel_extreme driver has to be loaded.
Change-Id: I0cf438b1f4ace2ca0eb26cd72a8495721c088d95
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7630
Reviewed-by: Adrien Destugues <[email protected] >
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2024-04-26 08:40:34 +00:00
Jérôme Duval
9673f7b8bf
ramfs: honor the O_DIRECTORY flag on open()
...
by returning B_NOT_A_DIRECTORY on non-directory nodes, fix #18896 .
* like BFS, opening a directory read-write returns B_IS_A_DIRECTORY, instead of
switching read-only.
* fill st_blocks.
Change-Id: I706dc13209299b95be3da04ae19a6a9397b50c37
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7629
Reviewed-by: waddlesplash <[email protected] >
Haiku-Format: Haiku-format Bot <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2024-04-24 19:56:29 +00:00
Jérôme Duval
51bce128f7
tcp: don't allow read on listening sockets
...
fix #18884
Change-Id: If4e337316ea4faa2f00fa73295c57e93de0a2cbc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7616
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: Rene Gollent <[email protected] >
2024-04-12 20:09:31 +00:00
Jérôme Duval
43d1a0dc3c
runtime_loader: Implement DT_RUNPATH
...
DT_RUNPATH is generated by the linker instead of DT_RPATH when using --enable-new-dtags
It seems to be the default when using ld.lld
Normally one difference is LD_LIBRARY_PATH is checked before DT_RUNPATH (and not with DT_RPATH),
but we don't check LD_LIBRARY_PATH at the moment. Checking LIBRARY_PATH isn't an option, because
runtime_loader dosesn't use default paths, test suites would define LIBRARY_PATH empty.
Tested with tcpdump build_matrix.sh script, with clang 17, local libpcap, which requires
--disable-new-dtags on r1beta4.
Change-Id: Iacccde8d20e25ad14c5c548dd8832ea32b67e228
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7539
Reviewed-by: waddlesplash <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2024-03-22 15:58:53 +00:00
Jérôme Duval
142723d197
libbsd: fix timespeccmp()
...
Change-Id: I5c1b1e5c4c583c0758b9f1b6eee67cb83053461d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7514
Reviewed-by: waddlesplash <[email protected] >
2024-03-07 21:40:05 +00:00
Jérôme Duval
afeee28538
network/stack: fix trace build
...
Change-Id: Idbb27469bfcafaecbca5e13378a3e0c8d30d4201
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7513
Reviewed-by: waddlesplash <[email protected] >
2024-03-07 21:40:05 +00:00
Jérôme Duval
49d736ca2a
tcp: actually send finish when needed by the state
...
fix #18327 after hrev57546
Change-Id: I352a325f3c2068d06996c278246f7a30f5bfcbe0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7504
Reviewed-by: nephele nephele <[email protected] >
Tested-by: Commit checker robot <[email protected] >
Reviewed-by: waddlesplash <[email protected] >
2024-03-04 19:23:28 +00:00
Jérôme Duval
d0f06357f5
app_server FontManager: load all fonts and named-variants from a file
...
BFont::LoadFont can now use an index (0-based) and an optional named-instance (1-based)
to select the font variant from a file.
BFont::LoadFont can also use an index when loading from memory.
Change-Id: I0ce3eb6cc77d32cf43847416561eafe3063ca693
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7402
Reviewed-by: Jérôme Duval <[email protected] >
Reviewed-by: Máximo Castañeda <[email protected] >
Tested-by: Commit checker robot <[email protected] >
2024-03-01 18:04:33 +00:00
Jérôme Duval
b3a7feb168
network/ping: remove workarounds for connect()
...
Change-Id: I42829566a0f449f1a46f029aaff577efb30ef79b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7477
Reviewed-by: waddlesplash <[email protected] >
2024-02-27 22:20:01 +00:00
Jérôme Duval
e4efd92e78
ipv4 & ipv6: implement connect() by setting the socket's peer address
...
Change-Id: Ic0fdc3f1a880aaef9326d8d4bfb13199c1d61dd4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7476
Reviewed-by: waddlesplash <[email protected] >
2024-02-27 22:20:01 +00:00
Jérôme Duval
d24476aaf0
device_manager: PCI_display is used for virtio gpu
...
the mapping was missing as noticed by Julian Harnath.
Change-Id: I8ea3420e1de543571daf82d8c16ec95ac3423826
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7431
Reviewed-by: waddlesplash <[email protected] >
2024-02-26 18:16:06 +00:00
Jérôme Duval
3bf4cdb73b
network/ping: update to freebsd-current
...
* our ip modules don't support connect()/send(). Just use sendto().
* ping6 disappears, ping supports -4 or -6 to force IPv4 or IPv6
Change-Id: I1e982e354cc75d3a314c5bbbfffa0373e8f4d9af
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7427
Reviewed-by: waddlesplash <[email protected] >
2024-02-26 14:06:29 +00:00