Commit Graph

64476 Commits

Author SHA1 Message Date
Augustin Cavalier
8672fc2739 InterfaceDefs: Adjust and introduce new spacing/insets constants.
* Nothing in the tree and few things outside it used BIG_{SPACING|INSETS};
   it seems a value of 15px (at default font size) is not that useful.
   There are, however, a lot of things around the tree that use multiples
   of 20px. So, make BIG be that, with the intent to replace those
   with BIG directly.

 * Introduce CORNER_{SPACING|INSETS}. There are a lot of applications
   (e.g. Tracker, Terminal, Debugger etc.) which use scroll bar width/height
   to metrically align controls with the window frame or with some other
   control which contains scroll bars. Rather than have to invoke
   BScrollBar or BControlLook directly to get the value, we should just
   derive the size of scrollbars from a spacing constant instead
   and get rid of the custom function. (For now it is just replaced.)
   This reuses the old values for BIG, as it is equal to 14px at default.

 * Introduce BORDER_{SPACING|INSETS}. This is equal to the typical border
   size of 1px at default font size (or lower) and uses floor() instead of
   ciel() to compute what the size should be (i.e. it will remain 1px
   at 150%/18pt and only go up at 200%/24pt.) This will allow a lot of
   the hardcoded border sizes around the tree and elsewhere to use
   ComposeSpacing() instead.

Change-Id: Iaea3fa30364859888e816a9d61ac156268d70758
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5702
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: nephele <nep@packageloss.eu>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-11-02 02:23:32 +00:00
Zelenoviy
afe965f464 usb_hid: properly device remove handling
Small fix to device remove handling, when multiple hid-devices published on multiple interfaces.

Fixes #18008.

Change-Id: I64e1a9fb6cbac503e3d55b51ee0539bb6f1908e4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5773
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-11-02 02:21:02 +00:00
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
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
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
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
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
Han Pengfei
44cceee67e pthread: add pthread_{getname_np,setname_npp}
- These two functions imported for Linux/BSD compability.

Signed-off-by: Han Pengfei <pengphei@qq.com>
Change-Id: I3e9cada26f1ed043bfaed83e8185dcfff3bd71e2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5746
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-10-18 16:30:54 +00:00
Jérôme Duval
8e17b43da6 kernel/device_manager: Implement B_GET_DRIVER_FOR_DEVICE
for legacy and new drivers.

This is an opcode for ioctl that can be used on almost any device entry found in /dev.
When used, ioctl will fill a buffer with the absolute path to the driver file that is
being used by the device.

This opcode was available in BeOS R5, though remained unimplemented in Haiku since
the introduction of the Device Manager almost two decades ago.

Original change by Jacob Secunda.

Change-Id: Ic49141b677b4158a63918459d4048450c825447c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5078
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-10-17 06:13:07 +00:00
Alexander von Gluck IV
d3e920ba77 tests/qemu-boot-test: provide a summary of error-generating subsystems
* Not perfect, but does give some nice data on what makes the most
  "error noise" on boot
* We should eventually make this a ruby or python script to do
  better reporting

Change-Id: I831af05520a95ffba492c068c105f93ff2c31a2d
2022-10-16 09:10:07 -05:00