Commit Graph

67029 Commits

Author SHA1 Message Date
Augustin Cavalier
029e447bde bootloader & kernel: Unify bitmap blitting routines.
They were more-or-less duplicated between the two.
2024-11-12 23:44:31 -05:00
Augustin Cavalier
6a290d1dd1 network/stack: Don't special-case ENOBUFS and EMSGSIZE in update_send_stats.
These errors are always reported, so we want to count them as
an "error" on send, not a "drop".
2024-11-12 23:19:44 -05:00
Augustin Cavalier
7aba63496b net_server: Remove autoconfiguration client when link goes inactive.
Otherwise DHCP will just keep trying to send requests forever.
2024-11-12 23:19:04 -05:00
Augustin Cavalier
f8a8e56595 USB: Always delete transfers even when force-canceling.
We can't call the callbacks (as the comments correctly indicated),
but we can certainly delete the transfer objects, since they
rightfully belong to us.

Should fix #19242, #19241, #19180 and possibly other recent regressions.
Also fixes a long-standing memory leak from this scenario.
2024-11-12 21:58:16 -05:00
Augustin Cavalier
75a4dfe4a1 USB: Add a missing NULL check in Hub constructor.
This case is probably very rare, though.
2024-11-12 21:52:02 -05:00
waddlesplash
8500b11c43 BBitmap: Restore special-casing for B_RGB32 in SetBits.
This reverts commit 6211ae2575.

It breaks multiple applications that worked fine on BeOS,
so clearly this tweak was correct after all, or at least mostly correct.

Change-Id: I3b228ba2119dd33067b8defedd6db4ae9ead9124
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8537
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-11-13 01:42:41 +00:00
Augustin Cavalier
e4efb705e4 libroot: Add parentheses around third argument of ioctl.
So that the cast applies to the right part in case an expression
is passed.
2024-11-11 13:39:25 -05:00
Augustin Cavalier
bbb069a1a7 libroot: Use use variable argument count macro for ioctl.
Based on X512's original change, but with more modifications:

 * Don't use _ in macro parameter names to appease GCC 2.

 * Get rid of ioctl_args struct. We don't need it anymore,
   and just adding parameters of the same types has the
   exact same ABI on x86 and x86_64, so this doesn't break
   any existing compiled code.

 * Add (void*) cast to third parameter.

 * Enable for _KERNEL_MODE also.

Change-Id: Id4ad8b85f54836fd26dc6278226954d0a081d5f0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8533
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-11-11 18:29:58 +00:00
Augustin Cavalier
b802b65b09 libntfs: Don't use "ioctl" as a struct name.
This will allow unistd.h to define it even in _KERNEL_MODE.

Change-Id: I6669c670353dda7cc202017d707a6bce3b5519e0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8561
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-11-11 18:29:58 +00:00
Gustaf Alhäll
115a635f13 add-ons/input_server: Fix PadBlocker blocking on key repeat
PadBlocker wasn't handling key repeats, so once key repeat started
kicking in, it would register it as keypress and consequently block any
B_MOUSE_DOWN event that followed.

Fixes #19238 and possibly #17821.

Change-Id: I1dccca5a31021866a61aa95bbeecfb0ba37facac
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8532
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2024-11-11 17:28:48 +00:00
X512
8776466030 BRect: add 2 argument width, height constructor
Left top position will be set to zero.

It is a common pattern to define `BRect` value with only width and height so it allow to simplify code a bit.

Change-Id: Ie14644843324c9e5bcc55e7cfbd557a8884559d3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8535
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-11-11 16:56:19 +00:00
X512
2b0aa4245b BShape: use BShape::Private class to access private methods.
Avoid declaring random friend classes in public header. Allow to access
private methods from arbitrary source if needed.

Change-Id: Iac2cf0ca59e483aa0657e3fe1fc47080c661cf8b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8534
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-11-11 16:56:19 +00:00
X512
e892302909 BShape: add move construction and assignment support
GCC 2 support is also provided with `MoveFrom` method.

Change-Id: Ifedaf0b1406a5a2cb6bf3465249cea0f360e06d6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8531
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-11-11 16:56:19 +00:00
X512
80fcf2df19 BRegion: add move construction and assignment support
GCC 2 support is also provided with `MoveFrom` method.

Change-Id: Ibd062f501fdeb5538ade6c84dcafb61cff70cc32
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8529
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-11-11 16:56:19 +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 <no-reply+buildbot@haiku-os.org>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-11-11 10:11:08 +00:00
X512
4bfc14b6c7 libroot: add posix_devctl() from POSIX.1-2024
Change-Id: I2ae748b2febcdeca0256e9033119dcf9988ccc74
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8556
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2024-11-10 20:08:54 +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 <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-11-10 19:52:34 +00:00
Andrew Lindesay
c078962803 HaikuDepot: Split out Local Info From Pkg
Continued work to normalize the data model
in the application.

Change-Id: I6dc6d17cff866b18f56431056958092c8bdc3a19
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8524
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-11-09 20:19:18 +00:00
Augustin Cavalier
3a91fe8d4f libroot: Treat invalid timespecs as zero-timeouts with a special error code.
Amends b8fdef84a6.

We also now use B_RELATIVE_TIMEOUT in sigtimedwait() rather than
converting to an absolute timeout.

Thanks to korli for the review!
2024-11-09 14:25:32 -05:00
Augustin Cavalier
0b04cf2f5b libroot: Merge sigtimedwait.cpp into sigwaitinfo.cpp.
No functional change intended.
2024-11-09 14:20:26 -05:00
Augustin Cavalier
18b7c68ed6 realtekwifi: Add device ID for TPLink RTL8192CU.
Should fix #19234.
2024-11-09 13:47:44 -05:00
Autocomitter
1a080e5f9f Update translations from Pootle 2024-11-09 08:16:43 +00:00
Augustin Cavalier
b8fdef84a6 libroot: Use timespec_to_bigtime and bigtime_to_timespec in more places.
Two minor behavioral changes: EINVAL is now returned on invalid
times in more places, and clock_settime now rounds up instead of down.
Otherwise all should be as before.
2024-11-08 13:41:36 -05:00
Humdinger
7c5e909fba New/updated icons for native/installed apps in HaikuDepot
* A new icon to indicate native apps in HaikuDepot. It's simply the
  Overlay_leaf on a blue disk.

* Slight change to HaikuDepot_Installed to add a black outline to its
  green disk. That makes is better distinguishable on similar coloured
  backgrounds.

* Made the green of HaikuDepot_Installed a bit less glaring, using a
  slightly light green that shown in the old Haiku Color Palette [1]

[1] https://www.haiku-os.org/files/downloads/2007-03-20_haiku-color-palette.png

Change-Id: I5c29d65e05561fafe5d84c173ddaf083281d391b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8526
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-11-07 19:06:29 +00:00
Andrew Lindesay
7d8bc41066 HaikuDepot: Installed icon on list view
How the installed tick indicator on package
list view.

Change-Id: Ib7ea0de3d268f7eb16acdd5d575eb6da096170b2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8510
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2024-11-07 07:30:05 +00:00
Augustin Cavalier
eb2080d241 usb_disk: Cancel queued interrupt transfers on failure to attach.
We reschedule the interrupt transfers every time they succeed,
so we need to cancel them on failure to attach in order to not
leave one lingering (and later KDL).

Fixes #17549 and related tickets.
2024-11-07 01:08:27 -05:00
Augustin Cavalier
2a46c1e589 pthread: testcancel() should exit with PTHREAD_CANCELED.
Fixes #19232.
2024-11-06 14:58:09 -05:00
Augustin Cavalier
eaa234b678 pthread: Use timespec_to_bigtime in pthread_cond_clockwait. 2024-11-06 14:57:44 -05:00
Augustin Cavalier
14744074dd Revert "unistd.h: Add cast to (void*) for first argument in C mode."
This reverts commit c4497fa258.

Breaks 2-argument ioctl, it seems.
2024-11-05 22:03:58 -05:00
Augustin Cavalier
36708e6ab8 network: Let modules process all ancillary data at once, and adjust UNIX.
This way, modules can decide to do different things based on having
all the ancillary data available. In particular, the UNIX module will
now post only one message header for all the FDs, even if they came
from multiple sets of ancillary data.

This should fix "Message needs unreceived descriptors" from the Chromium
IPC code (which is used by Firefox).
2024-11-05 15:23:24 -05:00
Augustin Cavalier
85a9e4abfb mpu401: Move to the "midi" drivers directory.
For now it remains in the "generic" directory in the package.
2024-11-05 14:20:26 -05:00
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