Commit Graph

66994 Commits

Author SHA1 Message Date
PulkoMandy
344ded80d4 ioctl: Document in Haiku book and in comments
- Convert libroot from a page to a group, so that it can list the
  included file and functions in the generated book (like the kits)
- Add unistd.dox and move the relevant part of ioctl details there
- Make sure to use C89-compatible comments only in POSIX headers

Change-Id: I8f0412e4c75de6f48018a0436909f8b0076342a4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6369
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
2024-11-18 17:12:04 +00:00
Andrew Lindesay
2ec05ec7ed HaikuDepot: Fix Search Term
Resolves #19257

Change-Id: Ifaefc98f51a3a88f8770f1ffa9ff0416a454b418
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8579
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-18 16:45:48 +00:00
Gustaf Alhäll
b08fdcde6f PadBlocker: Avoid blocking non-trackpad devices
Exposes a new field on mouse events named "device" that specifices what
type of device the event originates from. This is then used in
PadBlocker to ignore events that don't originate from trackpads.

This field should also be exposed to the public API in case any program
in userspace want to use it, as it may be useful for other purposes.

Fixes #19238 and #17821

Change-Id: Ic0f8c088cf5d2b0414a8e69498b48f2a3e370d73
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8557
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-11-18 16:45:04 +00:00
PulkoMandy
fd7bde29e9 listusb: decode color format descriptors in usb_video devices
Change-Id: I3de3b1a893ec02d32f1b10f80653d433ac4526ee
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8582
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-11-18 16:44:46 +00:00
PulkoMandy
d05ff048a2 uvc_webcam: use shared USB_video.h
The driver had its own header file with definitions from the USB video
specification. Use the system ones already in place for use in listusb.

Also recognize devices which advertise themselves as "miscellaneous" in
the device descriptor, this is the recommended way in the specification
as the usb_video interface may be only part of a device, with other
interfaces and endpoints used for audio or for HID for example.

Change-Id: I7e2e45328dcc1e81c407937e8dd3d77209c5c52a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8581
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-11-18 16:44:46 +00:00
Emmanuel Gil Peyrot
603521ecdc BTimeSource: Fix debugger message in RealTimeFor()
Likely a copy paste error

Change-Id: I4b7610b737daa72ba8f4b1b32d4de4f9c1233b0b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8580
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2024-11-18 11:54:43 +00:00
dalme
edac63079f BFS: Be explicit about blocks_per_ag field meaning
Superblock field blocks_per_ag is confusing, as it holds the number
of bitmap blocks that are in each allocation group, not the number
of disk blocks per allocation group. Try to clarify when possible.

Change-Id: I60dad9d3c5245dd126ecfea817108e2cefa4cf02
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8566
Reviewed-by: waddlesplash <waddlesplash@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-11-17 22:33:42 +00:00
Jim906
9bb1816c14 block_cache: enable prefetching
* Allocate blocks and add them to the hash table so they are
  available for a future block_cache_get call.
* Make use of prefetching in FAT driver.
* A client filesystem may request to prefetch a block run that
  contains some blocks that are already cached.  The request will
  be truncated at the first such block in the run.
* Fixes #19186.

Change-Id: I8d2e3cff15e5b46569438e0dc085e2b391aa57a5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8525
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-11-16 18:26:21 +00:00
Autocomitter
e6bf67457c Update translations from Pootle 2024-11-16 08:17:29 +00:00
Andrew Lindesay
6afa94a089 HaikuDepot: Render Native Desktop Icon
Render an icon to indicate that the
package provides a native application.

Change-Id: I3aa6468be488a62b317d3107ad1490916c857ca2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8528
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2024-11-15 17:58:07 +00:00
Andrew Lindesay
97a8cc6cc2 HaikuDepot: Refactor notification and screenshots
Changes to the package model to factor-out
screenshots, to adjust the notifications and to
adjust depots so that packages cannot be added
more than once under the same name.

Change-Id: I2f9219a1cbc0f42631bddff00852c447fd66c929
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8563
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2024-11-15 08:49:06 +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 <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2024-11-15 02:06:28 +00:00
Augustin Cavalier
dcbba21430 ram_disk & ramfs: Pages aren't "accessed" outside the lock area.
This flag is only really needed for modifications to queues, mappings,
etc. on the page, and not on regular reads and writes. For that,
"busy" suffices.

This mirrors the file cache's behavior, and avoids invalidly
holding the page's "accessed" state without the cache lock.

Fixes #19233.
2024-11-13 14:11:35 -05:00
Augustin Cavalier
5c9dc91f64 network: Aggregate statistics from the device, if any are provided.
This way, we report the real receive/send statistics, not just
the ones the stack knows.

Adjust the FreeBSD compatibility layer to report its stats directly
so they are accounted for this way.
2024-11-13 13:55:58 -05:00
Augustin Cavalier
de8d5cfb5f bootloader & kernel: Unify computation of splash logo and icons placement.
Removes some more code duplication.

Change-Id: I9423be740015bef996b77bf2c30652fdadbd8a50
2024-11-12 23:51:52 -05:00
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