Commit Graph

66948 Commits

Author SHA1 Message Date
Augustin Cavalier
6e1bd12f74 locked_pool: Delete.
The SCSI module was the only thing using it, and now it isn't
used at all.
2024-11-05 14:05:04 -05:00
Augustin Cavalier
79efafa0e0 libroot: Add x86-specific stub.
Needed for bootstrapping.
2024-11-05 13:51:02 -05:00
Augustin Cavalier
79e2ef5c69 arp: Move sCacheLock to be near the structure it's protecting.
No functional change intended.
2024-11-05 13:48:54 -05:00
Augustin Cavalier
1f4aed8088 nvme_disk: Slight code cleanup.
* Add const to rounded_len.

 * Remove dead store of lba_count: it's really set inside the while
   loop.

No functional change intended.
2024-11-05 13:48:35 -05:00
Augustin Cavalier
f9141f8935 bootloader: Remove unused include. 2024-11-05 13:47:02 -05:00
Augustin Cavalier
e9c9b2e448 kernel/condition_variable: Make the debug type fetcher a static function.
No behavioral change intended.
2024-11-05 13:46:53 -05:00
Augustin Cavalier
7746364088 SCSI: Use an object_cache for the CCB pool.
Same as for the scatter/gather pool. This also changes CCBs
to use condition variables instead of semaphores for completion,
which means they're now C++-only. A few C files still include
<SCSI.h>, but none use CCBs directly, so this works out fine.

A quick check with a compile benchmark didn't show a performance regression.
2024-11-05 13:43:48 -05: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 <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2024-11-05 16:54:59 +00:00
Augustin Cavalier
44d5b89d66 bootloader: Fetch and display the size of the partition, if possible.
Fixes #19202.
2024-11-04 17:15:33 -05:00
Augustin Cavalier
105f00f768 SCSI: Use an object_cache for the scatter/gather pool.
All object_caches use locked memory by default; and in fact
the CACHE_UNLOCKED_PAGES flag isn't even implemented at present.
So the locked_pool system is redundant here.
2024-11-04 16:10:09 -05:00
Augustin Cavalier
02857568c9 kernel/slab: Use final keyword. 2024-11-04 16:07:49 -05:00
Augustin Cavalier
a2694db751 kernel/slab: Check both pressure and min_object_reserve before returning slabs.
Otherwise, if the pressure is low, then we won't properly respect
the min_object_reserve.
2024-11-04 16:07:39 -05:00
Augustin Cavalier
6101e74932 SCSI: Remove unused sim_priv fields.
Whatever "compatibility layer" these were for, nothing in-tree
uses them anymore.
2024-11-04 15:14:47 -05:00
Augustin Cavalier
c16f375b92 SCSI: Minor cleanups. 2024-11-04 15:08:06 -05:00
Augustin Cavalier
53728117bc SCSI: Reset flags on the correct request in submit_autosense.
The passed request is the one triggering the auto-sense, not
the auto-sense itself.

Resetting the "buffered" flag on the wrong request meant that
if a buffer had been used for the triggering request, it would
be leaked, and subsequently we would get KDLs when trying to
unlock memory that wasn't actually locked at all.

Fixes #19218 and related tickets.
2024-11-04 15:07:56 -05: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 <waddlesplash@gmail.com>
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 <waddlesplash@gmail.com>
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 <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
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 <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
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 <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
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 <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
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 <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-11-04 17:55:40 +00:00
Autocomitter
592a3b6921 Update translations from Pootle 2024-11-02 08:16:29 +00:00
Augustin Cavalier
4ec199c6dc kernel/events: Allow numFDs greater than max FDs in select().
So long as the numFDs is <= FD_SETSIZE, anyway.

Fixes #19220.
2024-11-01 23:42:02 -04:00
Augustin Cavalier
7ee61327ce sys/select.h: Cleanup.
* Always declare FD_SET rather than conditionally. This matches
   the behavior of the glibc, musl, FreeBSD headers.

 * Simplify comments.

 * Leave the custom FD_SETSIZE possibility in place for now. Neither
   glibc nor musl permit this, but FreeBSD still does.
2024-11-01 23:29:22 -04:00
X512
30be30f25d Application: do not delete port owned by app_server
Change-Id: I99dbee8ed7900eda8bf0024e0893449e1b217255
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8516
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-11-01 16:07:04 +00:00
Andrew Lindesay
c65ff9f1e0 HaikuDepot: Factor out localizable text.
This change will factor out the localizable
text into a sub-model from the package model.

Change-Id: I5b6375665f37dd51ae0e16000956894283da2243
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8508
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-10-30 19:10:33 +00:00
Andrew Lindesay
1c4d43a6b0 HaikuDepot: Show default icons early in list
Resolves #19205

Change-Id: I16def80ba004efbea4303f7d74ee87678a959027
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8511
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
2024-10-30 15:51:46 +00:00
Andrew Lindesay
905c332163 HaikuDepot: Installed icon has filled tick
The HaikuDepot application has an icon to show
that it is installed. This has a transparent
tick inside which in this commit is changed to
be a white filled tick.

Change-Id: Ib36c43d9ca63244d8409889e760d0f38e0016f4d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8509
Reviewed-by: humdinger humdinger <humdinger@mailbox.org>
2024-10-28 06:59:50 +00:00
Autocomitter
e21c4321f6 Update translations from Pootle 2024-10-26 08:13:41 +00:00
Andrew Lindesay
55a87be02d HaikuDepot: Fix list packages view
Resolves #19201

Change-Id: Iaba3a84aeb2dfafc3512ffea21bb58c548aa3dee
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8504
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-10-26 01:57:57 +00:00
Oscar Lesta
8ece85d220 configure: let CC default to gcc-x86 on Haiku 32 bits.
Fixes #18935.

Change-Id: I05807d0f38e38b7abaad770fc390d38cbc76f8a5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8503
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-10-25 16:14:43 +00:00
Pascal Abresch
ca9854451d TextControl: Make background of invalid control red
Co-Authored-By: Niklas Poslovski <ni.pos@yandex.com>
Change-Id: Idd6aa8984aab5d8a8aee81bade23946b88f2497e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8428
Reviewed-by: nephele nephele <nep-git@packageloss.eu>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: John Scipione <jscipione@gmail.com>
2024-10-24 09:05:03 +00:00
Pascal Abresch
6ab7170720 test: add Invalid for TextControlText in WidgetLayoutTest
Change-Id: I1f010fa752251bae7fc94f6d3e8321e57efdc041
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8429
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: John Scipione <jscipione@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-10-24 09:04:44 +00:00
Andrew Lindesay
aa68f6603f HaikuDepot: User Rating Model & Calc - Re-enable
Change-Id: I1ddefc2693f17a4d39eb68c210a518c8141080ae
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8475
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: Andrew Lindesay <apl@lindesay.co.nz>
2024-10-23 10:07:21 +00:00
John Scipione
b230e1d06b Tracker: Fix regression from hrev58264
From Code simplifications a4a5800e5f

In file panel switching dirs using the menu field got broken.

Change-Id: I2e9d75ba62082be27a85dbfa12e30a324f9fb440
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8501
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-10-23 04:46:50 +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 <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-10-22 18:42:05 +00:00
Augustin Cavalier
1b05bf1a7e SCSI: Respect DMA_HIGH_ADDRESS, if specified.
Related to #19191 and others.
2024-10-22 11:26:14 -04:00
ayu-ch
b88d29aa2c BPoint::PrintToStream: print some decimal places
Fixes #16505.

Change-Id: I6693b4c4c64d9e6559091bc2c90282db0f294561
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8499
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-10-22 15:20:20 +00:00
Augustin Cavalier
09abc534f3 HDA: Adjust printing of stream status in stream_handle_interrupt.
Just print the whole status in the "stream buffer not completed",
that way we won't have multiple lines printed when errors occur here.

See #19196.
2024-10-21 13:24:08 -04:00
Augustin Cavalier
21a284b61b AHCI: Don't cast to addr_t when fetching low/high 32 bits.
Otherwise we'll lose the high 32 bits on 32-bit systems.
2024-10-21 12:58:28 -04:00
Augustin Cavalier
b4ccd21229 AHCI: Use count_set_bits from BitUtils.
No behavioral change intended.
2024-10-21 12:57:51 -04:00
sarahemm
b54510c378 PowerStatus: Fix issues with (dis)connecting batteries while running
1. Fixed stale data and invalid percent/time remaining being displayed after a
   battery is removed from the system.

2. Added display of a red X over damaged/missing batteries in the Battery Info
   view.

This fixes the last point in bug #19167.

Change-Id: I968829895fc814011b2c88bafe0b62a159b46d5a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8496
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-10-21 16:28:01 +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 <no-reply+buildbot@haiku-os.org>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2024-10-21 16:26:23 +00:00
Andrew Lindesay
8cc3ed34bc HaikuDepot: Model package classification
This moves the categories, prominence and native
desktop (new) flag into a separate model.

Change-Id: I4c45004a3a38cc08bb610184f8d7ef786f0d1a08
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8474
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2024-10-21 10:43:32 +00:00
Rudolf Cornelissen
f13cec8031 nvidia gfx: added missing Tecra M5 Quadro NVS ID's 2024-10-21 10:45:52 +00:00
X512
cfe81d33f1 View: use ServerLink::AttachShape
No protocol change intended.

Change-Id: If2ca573a3b6763c62ab1ae0d8a11f783d6ecc233
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8473
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-10-20 22:30:56 +00:00
Augustin Cavalier
ec464820c0 kernel/fs: Unset non-blocking on the correct FD.
_kern_fcntl operates on kernel FDs, while here we have user FDs.
Should fix #19195.
2024-10-20 18:29:09 -04: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 <waddlesplash@gmail.com>
2024-10-19 18:39:49 +00:00
Niklas Poslovski
b78edf5814 WebPositive: Use B_LIST_*_COLOR for Downloads window
Change-Id: Iabb6566e4d3cba5c53d84c26c413a996a56c80d1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8476
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-10-19 15:01:59 +00:00