Commit Graph

64783 Commits

Author SHA1 Message Date
Zelenoviy
4f18dc0496 usb_hid: Fix MaxReportSize computation
While calculating buffer size for IN reports, only "Input" report type
should been taken in account. Complex HID devices, such as "Gaming"
keyboards and mice, often have "Feature"-reports declared (with size way
bigger than "typical" kbd IN report) for vendor-specific device
configurations.

But "Feature"-reports are sent over control channel only and can't
appear on interrupt channel.

Should fix #14919, #17937, #17699

Change-Id: I4b9eb51938ca4aba2bc34247d00ae164eb2c19fc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5771
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-11-02 02:21:02 +00:00
X512
b71020b095 util/DoublyLinkedList: make GetPrevious/GetNext methods static
This methods do not need DoublyLinkedList class state.

sGetLink field that actually implement GetPrevious/GetNext methods is already static.

Change-Id: Ie0b40f7f1b72d640d75403905b8944666874dc87
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5796
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-11-02 02:12:41 +00:00
Máximo Castañeda
baf401757e HaikuBook: small list levels and grammar tweaks
Change-Id: I186e38108a57a8a8b82dbfbdf27766730fe659e4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5774
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Oscar Lesta <oscar.lesta@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-11-02 02:12:23 +00:00
Augustin Cavalier
20136c336c docs/develop: Linkify version-change hrev. 2022-10-31 23:29:20 -04:00
Máximo Castañeda
7b3e89c094 PoorMan: some libhttpd fixes
The last thttpd update was less than perfect. A bad format string was
causing crashes on directory listings, and some of our changes were
removed, like PoorMan's setting for directory listings, leaks and thread
safety.

Fixes: #17329
Change-Id: I84d9862a0ebd5492a2542cf9776462e7fe7dbe77
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5772
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-11-01 01:06:07 +00:00
Oscar Lesta
62b6a4c615 mount_server: BPartition::ContentName() returns a BString now.
Change-Id: I9a236f6a28826d9394265081c3ebf6e96290fa54
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5770
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-11-01 01:05:35 +00:00
Oscar Lesta
dfd7e48a6c Partitioner: fixed warnings, and usage of BPartition::ContentName()
Not particularly high priority (this being a test) but... I came across
these while searching for code still needing updates after the changes
on BPartition::ContentName().

Change-Id: I05e8d6c02ba34688cee4f0b55e4e782243b0af4d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5769
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-11-01 01:05:35 +00:00
PulkoMandy
4fad6eb32d Tracker: fix thumbnail caching
system_time returns the number of microseconds since booting. This is
not what's needed for the thumbnail generation timestamp attribute, as a
result the attribute was always considered out of date and the stored
attribute would never be used.

Change-Id: I3728077c484f341b765700532d3f986e64f165ad
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5767
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: John Scipione <jscipione@gmail.com>
2022-10-31 17:40:50 +00:00
Niels Sascha Reedijk
2710b4f5d4 Merge remote-tracking branch 'origin/master' into dev/netservices
Change-Id: I48c8cf4f03e281a5caeb9f27bf052285961529ff
2022-10-29 22:58:24 +01:00
Niels Sascha Reedijk
71e29bbeea NetServices: format code using haiku-format
This commit formats all the netservices2 code with the `haiku-format` tool from
https://github.com/owenca/haiku-format (commit aa7408e), with the following
customizations:
 * SpaceBeforeRangeBasedForLoopColon is set to false
 * Braces before a catch block are not wrapped
 * Most headers, except for ExclusiveBorrow.h, have been manually reformatted
   to adhere to Haiku's header format (issue #19 in the repository)

Change-Id: I693c4515cf26402e48f35d1213ab6d5fcf14bd1e
2022-10-29 22:53:57 +01:00
Augustin Cavalier
1284e971e2 kernel/vfs: Fix locking behavior in acquire_vnode and add a missing ASSERT.
vnode deletion is prevent either by owning a reference to the node,
or by being at least a reader of the vnodes lock. Thus, in acquire_vnode,
we have to inc_ref_count while still holding the lock in order to prevent
a race.

This function is used so rarely and quite deep inside FS drivers that
I'm  not sure this race would ever have been a problem. Nonetheless
the old code was incorrect.
2022-10-29 13:42:19 -04:00
Augustin Cavalier
b4b1561b6a kernel/vfs: Do not wait for removed vnodes to become unbusy.
Most of the time, that is harmless and will just cause a slight delay
before the vnode is removed and we return NULL instead of finding it.
However, in rare circumstances involving renames, we can wind up in
a deadlock with the thread that is trying to remove the vnode, and
would have to wait all the way to the timeout (a full ten seconds!).

The only vnodes not about to disappear from the table that can be both
"removed" and "busy" seem to be special vnodes like pipes, which will
be in an "unpublished" state while they are initially "busy" which we
can check for, in case something wants to wait for them.

The "dirconc" test readily triggered a pathological case of this behavior.
Before this commit, it ran for over 15 minutes before I killed it (and
it was not close to done at that point, either.) After this change,
it completes successfully in around 3 minutes or so on my test VM.

Thanks to mjg@freebsd.org for pointing out this testcase and its
misbehavior on Haiku!

Change-Id: Id1accf0aaf0724e1aec927a437d3a2ac1596cd98
2022-10-29 13:42:19 -04:00
Niels Sascha Reedijk
93069fc4bc NetServices: Disable BasicAuthTest for HTTPS
Change-Id: I0b61af00b96ebe7fbcd04da50e32cb9e9be7f890
2022-10-29 14:29:34 +01:00
PulkoMandy
d9e730c808 libroot: generate a name for nameless volumes
Generate a name indicating the volume size and filesystem.

Remove code that was doing that or similar things in various
filesystems.

Change-Id: I6b993735e58cdfaf1f19af575e918614c7fe5679
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5381
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
Reviewed-by: John Scipione <jscipione@gmail.com>
2022-10-29 11:31:13 +00:00
Niels Sascha Reedijk
477e74d187 NetServices: fix parsing raw HTTP bodies without a known size
When parsing a raw HTTP body without a known size, whether or not a request is complete depends on the
end of the connection. Make sure that the parser updates to complete when all the bytes in the buffer have
been read and the connection closed.

Change-Id: I6f055b43ffe4a44da65da85c19b71304d804c800
2022-10-29 12:23:15 +01:00
Autocomitter
d39a334eec Update translations from Pootle 2022-10-29 08:13:39 +00:00
Mashijams
62a64d0a43 xfs: make Directory Iterator class an abstract class
Directory Iterator class represents one instance which could be Short, Extent, Leaf, Node or B+Tree, a good case for making it an abstract class

Change-Id: I925255caf4c4f8bc01a975740ef2ebf0bb2e1b49
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5764
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-10-28 16:54:43 +00:00
Augustin Cavalier
6610656e8f Network preferences: Add type specification to appease GCC2. 2022-10-28 12:52:50 -04:00
Oscar Lesta
62ea448683 TextSearch: do not trigger new grep searches unnecessarily.
Opening and closing a file from the results window with Pe, for
example, was triggering unnecessary new grep searches, when only
the attributes or other metadata on the file got changed (and
not its content).

That new search was also changing the focus from the results view
to the search field (making one lose the position on that list,
specially annoying with large number of results).

Avoid that by not monitoring/reacting to B_ATTR_CHANGED, and not
reacting to B_STAT_CHANGED if the only flag is B_STAT_CHANGE_TIME.

Change-Id: I56d34c93da94acf36890abe458da45d26a334593
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5763
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-10-28 16:35:19 +00:00
Augustin Cavalier
75b68ba59d NTFS: Account for null-termination of strings when checking buffer sizes.
May fix #18021.
2022-10-28 12:26:35 -04:00
Augustin Cavalier
bfd87e4cc1 posix_spawn: Add POSIX_SPAWN_SETSID to the list of allowed flags. 2022-10-28 11:54:21 -04:00
Augustin Cavalier
b94de4c9bd BNetworkDevice: Restore old buffer size.
May help with #18020.
2022-10-27 21:49:58 -04:00
Augustin Cavalier
b2c77ad27a Network: Add a BNetworkDevice::GetNetworks() method and use it in the GUI.
The GetNextNetwork() method is really inefficient: it fetches all the
networks at once from the kernel every single time and then winds
up returning only one of them. In parts of the GUI that iterate over
all networks more than once per refresh (sometimes within a loop, even!)
this was often a noticeable lag on the GUI, especially with OpenBSD
drivers which have extra overhead to do struct translation in the
ioctl handler.

Now, we have a way to fetch all scan results at once and just iterate
over them as many times as we need, and this is what NetworkStatus
and Network preferences now do, saving lots of time and effort.
2022-10-25 23:34:42 -04:00
Augustin Cavalier
65c155bede BNetworkAddress: Make the first SetToLinkLevel() take a const pointer.
Technically breaks ABI. However to the best of my knowledge,
nothing uses this method outside of the tree.
2022-10-25 23:34:42 -04:00
Alexander von Gluck IV
9bceb7fb3c radeon_hd: Add encoder crtc source table 1.3
Change-Id: I9020f9bf270509c162987a9c1656f7e1cce33490
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5529
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-10-25 22:45:46 +00:00
Alexander von Gluck IV
967cfb4d56 radeon_hd/atombios: Sync up to latest published atombios
Change-Id: Ic0b80da7fb88fabcc1a7e87fb055351a06aa4e68
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5528
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-10-25 22:45:46 +00:00
Alexander von Gluck IV
8c46059114 radeon_hd: Add new connector id, guard from reading over bounds
Change-Id: Ifbabcf8217c617baffe85f24b985c18760e4da58
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5527
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-10-25 22:45:46 +00:00
Augustin Cavalier
5de85b8f98 docs: Remove the User Guide and Welcome pages.
These were not maintained here, merely mirrored from the Userguide Translator,
and rather infrequently at that. But as they were built with Haiku,
that meant new versions of these packages were built every hrev,
which meant a lot of wasted space and bandwith for updates.

Now there is a separate "userguide" repository which will collect the
files exported from the Translator, and recipes at HaikuPorts to build
the packages, instead, so we can delete these files from this repo.
2022-10-25 18:38:28 -04:00
Augustin Cavalier
8e34bbe754 Remove build logic for creating the userguide and welcome packages.
They are now created from a separate repository and via HaikuPorts.
Since the HaikuPorts packages are not yet in the BuildPackageRepository,
the actual section that adds the packages is commented out (but it only
runs for release-* targets anyway.)

The "welcome", "userguide", and "quicktour" scripts, which are symlinked
from the desktop in release builds, are added to the Haiku package's
"regular" profile instead (they do not actually require the other packages
to be installed but will detect if they are not and launch the online
versions instead.)
2022-10-25 18:38:07 -04:00
Jérôme Duval
4a55cc230c script to parse supported ids for network drivers
format similar to lkddb

Change-Id: Ie46becca48d4d8b7b37106f28c68dd6f60fa3322
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5761
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-10-25 19:09:28 +00:00
Jérôme Duval
74622d8051 Devices: add vendor names for ACPI devices when available
files can be updated so:
curl --fail -L -o acpi_id_registry.html 'https://uefi.org/uefi-acpi-export'
curl --fail -L -o pnp_id_registry.html 'https://uefi.org/uefi-pnp-export'

Change-Id: Id0456f925729c635c5e2d43f80e9e016483b2611
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5753
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-10-25 07:09:10 +00:00
Augustin Cavalier
93e536ab5d registrar: Properly clear out icons and resize when text changes.
May help with #18006.
2022-10-24 22:43:27 -04:00
Augustin Cavalier
781db1b43f BAlert: Invalidate layout if the icon is unset. 2022-10-24 22:43:00 -04:00
PulkoMandy
70bf92576d pci: print PCI info in case of deferred init.
This is normally done just after init, but in the case of deferred init,
there will be nothing to print at that point.

Currently, there is no way to access that info after the system has
booted. listdev should be extended, or the info should be published in
PCI device nodes to view in the Devices app.

Change-Id: Id89377ccf8bb967abae96194e503fffc06477acf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5758
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-10-24 16:37:15 +00:00
Jérôme Duval
876ddc1adb mountvolume: return type of ContentName() is now BString
fixes #18011

Change-Id: Ie8dda950005c191c843535b12f7cf8f9819bdcfb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5757
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-10-24 07:31:12 +00:00
Jérôme Duval
37f29a6f7a usb_ecm: switch to the new driver API
Change-Id: I385d70b3245d6b18c3593cf2672445ccfb000f13
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5754
Reviewed-by: X512 <danger_mail@list.ru>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-10-24 06:31:55 +00:00
X512
fe084f0b03 virtio_mmio: fix config space access using 1,2,4-byte memory access
Change-Id: I596da650be81a596efcbe7e3abecf2a4da3a8459
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5747
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-10-24 06:31:15 +00:00
Augustin Cavalier
56761ebfeb app_server: Granularize whether font settings were loaded in DesktopSettings.
As per axeld's review.

Change-Id: Idd817156d53ebf535f162285bfd08f0566ac3901
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5755
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-10-23 23:53:34 +00:00
Niels Sascha Reedijk
3c9045fbbf NetServices: Refactor to make HttpParser stateful
This change refactors various parts of the HTTP parsing. The HttpParser now
tracks what part of the message needs to be received next, and throws an error
if the object is used in the wrong way (when the caller requests to parse the
wrong part of he message).

The metadata about the transmission is now also saved in te parser. There is
partial work in there to start exposing the 'bytes written', which in
compressed streams is expected to differ from the bytes read. This is not
used yet.

This also simplifies the state tracking done by BHttpSession::Request.

Change-Id: I8532c6a5c8776456ea8bbccd6df7a44bac92b60d
2022-10-23 18:43:41 +01:00
Mashijams
689f8e9060 xfs: minimised disk seeks for node xattrs
- Made GetNext() function in Node Attributes efficient by reducing disk seeks to number of Node entries

Change-Id: I4e2bf8fb1898676c30eca2c6d6f39dc1999ae2f8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5612
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-10-23 07:28:51 +00:00
Autocomitter
082d1bcdcf Update translations from Pootle 2022-10-22 08:17:06 +00:00
Augustin Cavalier
a180a40b63 app_server: Only increase default font sizes if settings were not loaded.
Thanks to axeld for the review.
2022-10-19 19:37:29 -04:00
Augustin Cavalier
e1f6b2fbe7 nvme_disk: Add a polling fallback mode.
Before implementing interrupts, all I/O was polled.
Now we only use polling as fallback if interrupts mode
does not work for some reason.

Should fix #17484.
2022-10-19 18:57:58 -04:00
Augustin Cavalier
f1c9e12aa3 NTFS: Truncated pathnames should be an error, not a warning.
May help with #17964.
2022-10-19 15:36:52 -04:00
Augustin Cavalier
5bb671cc0e MediaPlayer: Fix a hard-coded font size. 2022-10-19 14:25:29 -04:00
Augustin Cavalier
46a2beb0f8 HaikuDepot: Refactor usage conditions windows.
* Set only a minimum width and then resize to preferred on window.
 * Set a minimum height for the text view itself.
 * Use the new TextView controls instead of the old BTextView.
 * Adjust other size constraints as needed.

Fixes #17998.
2022-10-19 14:25:09 -04:00
Augustin Cavalier
6a4c3457cf HaikuDepot: Adjust some hard-coded font sizes. 2022-10-19 14:23:32 -04:00
Jérôme Duval
41c1669de1 bin/acpi_call: command to call ACPI methods
adapted from the FreeBSD tool, uses ACPICA headers in userland mode.

Change-Id: Icba77b01e6e351df31538dda21520f0cc99b26bb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5749
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-10-19 12:57:04 +00:00
David Karoly
9ae2ef5de6 boot/efi: implement ring buffer
Change-Id: I7c384eb859e28ce824bd5cc5e85039d80462eb67
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5722
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-10-19 00:10:25 +00:00
Alexander von Gluck IV
4e77b1a727 radeon_hd: Drop duplicate 6700 XT PCI ID
Change-Id: I2da5a34f47e0281a35921bd104c1a3571c65638b
2022-10-18 18:51:39 -05:00