Commit Graph
100 Commits
Author SHA1 Message Date
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
Jérôme Duval 01dc1ea4cf libbsd: add strtonum(), nitems(), timespec operation functions from FreeBSD
Change-Id: I56b677b382d17a27d243b615de19bec10f3a2810
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7426
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2024-02-26 14:06:29 +00:00
Jérôme Duval 4d6b8a5796 app_server: Switch default UI font to Noto Sans.
fixes #18793

Change-Id: If53229acd6c00e1a800c6808f3f0261ae59d99bb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7400
Tested-by: Commit checker robot <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: Fredrik Holmqvist <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
Reviewed-by: nephele nephele <[email protected]>
2024-02-13 12:01:31 +00:00
Jérôme Duval 0f792e577c BMenu: std::stable_sort uses a comparator function returning bool
thanks Madmax for the pointer.
fixes #18775

Change-Id: I1934c90a2976ce12c4aa8adb0205c48c239627d8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7401
Reviewed-by: Adrien Destugues <[email protected]>
2024-02-12 09:48:53 +00:00
Jérôme Duval a1bc100a78 listusb: fix MaxPacketSize, display length
audio: fix zero divide, add missing newline
Change-Id: Ia7d0ae6e403938291471185b14e07dc3e0f90ef4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7369
Reviewed-by: waddlesplash <[email protected]>
2024-02-03 14:52:45 +00:00
Jérôme Duval 4a6a465c80 intel_extreme: for DDI, map the ddc pin to the GPIO
add port G for Gen12

Change-Id: I70bba2d6d2ec0fbad8bdbec14412ea982690d563
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5626
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2024-01-31 18:32:58 +00:00
Jérôme Duval b352d8ccd8 virtio_gpu: add the accelerant to the regular image
fix 32-bit warnings

Change-Id: If85acfce1ac93998c13e5d9fa2e02823e219e428
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7342
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: X512 X512 <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
2024-01-24 09:54:55 +00:00
Jérôme Duval 591a1d179a AdapterIO: add FlushBefore() to strip the beginning of the MallocIO object
by default, AdapterIO is initialized with a BMallocIO object, which will
be extended indefinitely. Flushing regularly is necessary to avoid
excessive memory usage. Tested in StreamRadio.

Change-Id: I9f3142c0a2300ad44dc54ccf6932d41c9526320b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7302
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2024-01-23 09:49:17 +00:00
Jérôme Duval 0b733c9c80 virtio_gpu: initial driver
sample for qemu: -device virtio-vga,edid=on,xres=1024,yres=768 -display sdl
display mode can be set in the Screen preferences.

Change-Id: If1d6aeecb208ce7c62c42eea1a95c71237c4375a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7038
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
2024-01-18 17:44:40 +00:00
Jérôme Duval 33fb08b1a5 ccp: add new IDs
Change-Id: Id9b2512d9f3b44d6ea25cb939dfd3054fe07600a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7338
Reviewed-by: waddlesplash <[email protected]>
2024-01-16 17:09:34 +00:00
Jérôme Duval 84cc2b9655 random: move virtio in a subdir
Change-Id: Idd776d6599613807c611cc6f72d8c1d2b9234946
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7337
Reviewed-by: waddlesplash <[email protected]>
2024-01-16 17:09:34 +00:00
Jérôme Duval 21d87cd45a app_server: recursive scan in /dev/graphics/
* /dev/graphics/virtio_gpu/0 is a valid entry
* app_server doesn't set the initial mode if it's identical; use
0x0 as initial resolution.

Change-Id: Ica0323e6c5d78b39f05499edc93fa9c949b97dc8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7037
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
2024-01-16 07:09:47 +00:00
Jérôme Duval 77cf55c4ad kernel/vfs: create_vnode should also create non existing entries when traversing
Fixes #18355.

Change-Id: I96abb95c14a74bcf9fec802badeb16c978a3b3d1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6321
Reviewed-by: waddlesplash <[email protected]>
2024-01-10 17:43:46 +00:00
Jérôme Duval 96bad7685b PowerStatus: add state "Not charging"
some laptops decide to not charge a fast full battery to not consume a cycle.
In this discharging state, the current rate is zero, thus no time left can be computed.
We add a state "Not charging" to clearly differentiate and avoid user confusion.
PowerStatus was triggering low battery notifications, this is also fixed.

Change-Id: I4745c78eb0863ab01fe34cb065707d068cff0f0e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7300
Reviewed-by: Fredrik Holmqvist <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2024-01-09 04:07:05 +00:00
Jérôme Duval fffd9d7dd4 AdapterIO: only for SEEK_SET is the position absolute
Change-Id: I8debbcc0a2d9e499bebcebe5361475737dc8f9f0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7295
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2024-01-04 15:06:37 +00:00
Jérôme Duval e2f1a42ea9 acpi: add device tree attributes from _CLS if available
means B_DEVICE_TYPE, B_DEVICE_SUB_TYPE, B_DEVICE_INTERFACE.
_CLS is rare, it means I don't own devices with this attribute.

from the spec: _CLS:
Class Code – supplies OSPM with the PCI-defined class, subclass and programming interface for a device. Optional.

Change-Id: I4f7b7ed66cbe6b4ff4511cb13df2af218350a5d8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7210
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
2023-12-19 05:40:16 +00:00
Jérôme Duval e691cf1eed ffmpeg: avcodec_free_context seems to also free extradata
* context->extradata seems to be set to fExtraData or fInputFormat.MetaData().
Both are managed by us, so set context->extradata to NULL before freeing.
* avcodec_close() shouldn't use according to the documentation:
"Use avcodec_free_context() to destroy a codec context (either open or closed).
Opening and closing a codec context multiple times is not supported anymore – use multiple codec contexts instead."
* fix #18713

Change-Id: I820deefcffea52a39fcb7587153d40dc03c85024
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7208
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2023-12-15 07:55:38 +00:00
Jérôme Duval 1a7cf57024 usb_hid: the report value for an array is an index starting at the logical minimum
to be tested, related to bug #18641

Change-Id: I54b09001a7baf5e868eb5f26ca3064d4e6f31e53
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7069
Reviewed-by: Adrien Destugues <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2023-12-11 18:17:06 +00:00
Jérôme Duval 9fb1ce2781 radeon: use the KernelStaticLibrary rule
to build with GCC 13 on x86

Change-Id: I1a79154e3c41a86e34542feff99f3b0a331ef8b7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7188
Reviewed-by: waddlesplash <[email protected]>
2023-12-06 19:16:19 +00:00
Jérôme Duval 7be86b18a3 libgraphicscommon.a: use the KernelStaticLibrary rule
to build with GCC 13 on x86

Change-Id: Ic775196ffff556dd12381c7b374100bb46838973
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7187
Reviewed-by: waddlesplash <[email protected]>
2023-12-06 19:16:19 +00:00
Jérôme Duval ff45b65f4d acpi: use the KernelStaticLibrary rule
to build with GCC 13 on x86

Change-Id: If4e37cf5e15038169a16eab048cad4cd6b905707
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7186
Reviewed-by: waddlesplash <[email protected]>
2023-12-06 19:16:19 +00:00
Jérôme Duval f2acc47f43 acpi: update AcpiOsAcquireGlobalLock and AcpiOsReleaseGlobalLock
implementations from FreeBSD. Because the argument wasn't volatile,
the compiler wasn't considerung reading the lock content.
* fix the acquire and release loops:
The loop could be exited when any new values were read.
Instead the return value should be checked against the old value.

Old x86 gcc2 asm loop in AcpiOsAcquireGlobalLock:
   11660:       89 c8                   mov    %ecx,%eax
   11662:       f0 0f b1 1a             lock cmpxchg %ebx,(%edx)
   11666:       39 0a                   cmp    %ecx,(%edx)
   11668:       74 f6                   je     11660 <AcpiOsAcquireGlobalLock+0x20>

New x86 gcc13 asm loop in AcpiOsAcquireGlobalLock:

    4d58:       8b 11                   mov    (%ecx),%edx
    4d5a:       89 d0                   mov    %edx,%eax
    4d5c:       89 d3                   mov    %edx,%ebx
    4d5e:       83 e0 fc                and    $0xfffffffc,%eax
    4d61:       83 cb 03                or     $0x3,%ebx
    4d64:       f6 c2 02                test   $0x2,%dl
    4d67:       75 05                   jne    4d6e <AcpiOsAcquireGlobalLock+0x1e>
    4d69:       83 c8 02                or     $0x2,%eax
    4d6c:       89 c3                   mov    %eax,%ebx
    4d6e:       89 d0                   mov    %edx,%eax
    4d70:       f0 0f b1 19             lock cmpxchg %ebx,(%ecx)
    4d74:       75 e2                   jne    4d58 <AcpiOsAcquireGlobalLock+0x8>

Old x86 gcc2 asm loop in AcpiOsReleaseGlobalLock:
   11690:       89 c8                   mov    %ecx,%eax
   11692:       f0 0f b1 1a             lock cmpxchg %ebx,(%edx)
   11696:       39 0a                   cmp    %ecx,(%edx)
   11698:       74 f6                   je     11690 <AcpiOsReleaseGlobalLock+0x10>

New x86 gcc13 asm loop in AcpiOsReleaseGlobalLock:
    4d88:       8b 11                   mov    (%ecx),%edx
    4d8a:       89 d3                   mov    %edx,%ebx
    4d8c:       89 d0                   mov    %edx,%eax
    4d8e:       83 e3 fc                and    $0xfffffffc,%ebx
    4d91:       f0 0f b1 19             lock cmpxchg %ebx,(%ecx)
    4d95:       75 f1                   jne    4d88 <AcpiOsReleaseGlobalLock+0x8>

Change-Id: Ia55ba8666efe8b5c198a01db100b4747b72df4a0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7185
Reviewed-by: waddlesplash <[email protected]>
2023-12-06 19:16:19 +00:00
Jérôme Duval 153bb8ef67 Revert "ACPICA removed our cast we need for gcc 2.95.3"
This reverts commit fe0910891a.

Change-Id: I5887dcbfad83fb10978cd58bda5c2dc540226fe3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7184
Reviewed-by: waddlesplash <[email protected]>
2023-12-06 19:16:19 +00:00
Jérôme Duval a45709f630 Revert "ACPICA fixes for gcc2.95.3"
This reverts commit 3f6f7f7420.

Change-Id: If47a81ada6c7fe38c1e40bed4381a384ef25c050
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7183
Reviewed-by: waddlesplash <[email protected]>
2023-12-06 19:16:19 +00:00
Jérôme Duval 1b8870852e ffmpeg: fix leak when decoding audio frames
removing the memset in _DecodeSomeAudioFramesIntoEmptyDecodedDataBuffer fixes #18654
also free correctly resources in AVCodecDecoder destructor.

Change-Id: I2d6de6b50ba6767f669eb765dad96d28d43100fb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7108
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2023-11-14 23:13:51 +00:00
Jérôme Duval c7360f4b02 kernel/x86_64: on context switch, load defaults in fpu control and mxcsr
after a0131eaae2884fdced27158c3d34732d1656aca9 mxcsr was possibly also incorrect.
fpu control and mxcsr will be restored with fxrstor/xrstor.
no need to clear pending exceptions on #MF
fix #18656 (and #18624 after reverting).

Change-Id: I7dd5e2e4610747c5b82abd6c67e302d264b4be92
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7104
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2023-11-14 21:31:01 +00:00
Jérôme Duval 2d005cca08 ext2: implement set_flags
needed for fcntl(F_SETFL)

Change-Id: I2e71bcf70d794f690985e8c26ae1b0be51a0e590
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7094
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2023-11-08 13:39:21 +00:00
Jérôme Duval dd8a03b78d bootloader/x86: fix rdtsc for x86_64
should fix regression after hrev57346, see #18647
explained in details at https://gcc.gnu.org/onlinedocs/gcc/Machine-Constraints.html

Change-Id: Ic471c594b87da0bcee346db4a2f78ee1e1d59fe9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7093
Reviewed-by: waddlesplash <[email protected]>
2023-11-03 18:30:06 +00:00
Jérôme Duval 53e2dc0f85 kernel/x86_64: clear any pending exceptions on #MF
* also on x86 for simplicity.
* fixes #18624
* also makes x87 FPU data registers available for x87 floating instructions. EMMS is cheap.
see https://github.com/cloudius-systems/osv/commit/25209d81f7b872111beb02ab9758f0d86898ec6b

Change-Id: I5c1b399377102f3eb10bc6d7f7247afbaf6d8483
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7089
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2023-10-31 18:15:42 +00:00
Jérôme Duval 208006054c kernel/vm: put pages in order on the clear page queue
possibly help with #15789:
I was testing virtual_block devices with dd, and noticed it didn't work with higher block sizes.
Indeed the driver was passing a list of single pages, very inefficient. To be remarked is that
the physical pages were reversed in memory, causing get_memory_map to provide a map of single pages.
What happens: dd fills up the buffer from 0 until the block size, causing soft faults for still unmapped
pages. Each fault maps a cleared physical page out of the clear page queue. This means that some page runs
are actually put reversed in the clear page queue, which this commit fixes.

Change-Id: I36395849c7f13086b44a1b284cc0c858d8c29f75
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7081
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: Axel Dörfler <[email protected]>
2023-10-30 19:04:51 +00:00
Jérôme Duval 1a497824d8 ext2: recalculate extent metadata checksum each time the metadata changes.
this fixes an assert when reading extents written in Haiku.

Change-Id: Iba2cc3b35ed6886db0749a0f50b24053def5aac3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7079
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2023-10-30 09:16:07 +00:00
Jérôme Duval 6dd8733058 ext2: ext2_rename(): if the target exists, it should be unlinked.
* the target inode would still exist, unreferenced.
* also remove from entry_cache.
* this fixes fsck complaining about unreferenced inodes.

Change-Id: I4d48d6bf89bdd37d366da0ae4795e42bcc0532d9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7078
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2023-10-30 09:16:07 +00:00
Jérôme Duval 7b97f05bb9 ext2: DirectoryIterator: the dotdot entry size is the entry block minus what comes before.
* the problem appears after the directory has been splitted.
* this fixes fsck complaining about an invalid directory entry.

Change-Id: I1566a279fc6438cb735439be002c634882e5a83b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7077
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2023-10-30 09:16:07 +00:00
Jérôme Duval 3319ef3f8e ext2: BitmapBlock::FindPreviousMarked(): index shouldn't go negative
fix #14404

Change-Id: I831c7d5cabbb804ab74d582caafb1d6cd281ca34
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7076
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2023-10-30 09:16:07 +00:00