Commit Graph

54595 Commits

Author SHA1 Message Date
Augustin Cavalier
62bd88a64d webpositive: Depends on haiku_datatranslators.
If nothing else for the Media codecs.
2022-11-11 15:52:50 -05:00
Augustin Cavalier
fefa5edf96 Move print add-ons to the haiku_datatranslators package.
This allows us to move the Gutenprint dependency there, too.
2022-11-11 15:48:23 -05:00
Augustin Cavalier
f156c66999 usb_ecm: Disable tracing by default. 2022-11-11 15:47:41 -05:00
John Scipione
369c7b11d2 BAlert: Reserve room for stripe and large icon
... even if no icon is present. Draw stripe w/o icon.

"After ... hrev56382 alerts ... with no icons appears without a
gray stripe, causing it to jump left and right."

Fixes #18033 for R1B4 Release Milestone.

Change-Id: I35acc07411cadd4b394d6dfa1957049280b6f4b3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5810
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-11-11 19:34:25 +00:00
Alexander von Gluck IV
f162d76431 accelerants/radeon_hd: Style cleanup; no functional change
Change-Id: Id54ae8191f7a0b4cd0ffdf3e507df8d694f21899
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5809
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-11-09 03:32:26 +00:00
Alexander von Gluck IV
d1b7a784d7 accelerants/radeon_hd: Fix double +
Change-Id: If51bf45076de9871bbd9ed75a4701c31ce9615cb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5808
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-11-09 03:32:26 +00:00
Augustin Cavalier
c1353b749c BControlLook: Fix corner spacing calculation.
Fixes #18046. Ideally app_server would just use
this to pick the size of corners...

Change-Id: I2dc243d55321b3fc0fa90faf415d9b04abf9c376
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5780
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-11-08 18:09:48 +00:00
Jérôme Duval
cedd85556c kernel/x86: init the tsc frequency and clock speed from MSR when available
only for AMD newer CPUs. tested on R5300U

Change-Id: I44be2efca37b1738a759a15140e5fd8d3b5ac7b0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5804
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-11-07 09:03:52 +00:00
Jérôme Duval
af136a21bd graphics/edid: add support for the CTA extension block
Change-Id: I2799496faf2f9383c703384a419d8d9fcffc75ab
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5803
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-11-07 09:02:42 +00:00
X512
8be7c1aa58 kernel/file_cache: fix VMCache object leak
Fixes #18039.

Change-Id: Ia3cda69f91e56efb36931a97028378ec3ceb2100
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5801
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-11-05 13:27:15 +00:00
PulkoMandy
4c070183d9 PNG translator: remove B_TRANSLATE on string that isn't user visible
Change-Id: I3c04838729740f86493636913ba30a072e633696
2022-11-05 12:59:04 +01:00
Augustin Cavalier
b966f172df package_infos: "haiku" does not depend on "haiku_datatranslators."
This was initially added so users on the nightlies would not wind up
with no translators installed on updates. It has been long enough
that we can probably remove this in master. (I will re-add it
in the beta4 branch for users upgrading directly from beta3 -> beta4.)
2022-11-03 20:27:18 -04:00
Augustin Cavalier
16081dd2fa libshared: Enable hidden visibility.
This breaks ABI as we forgot to do this originally and a lot of apps
implicitly use symbols from libbe or elsewhere that are imported from
libshared, but we are about to branch beta4, so now is the time to
change this.

Fixes #17256.
2022-11-03 20:24:24 -04:00
Augustin Cavalier
0c6a5835f9 ramfs: Set vnode cache in ramfs_create instead of ramfs_open.
This way it will always be set even on the first creation,
and avoids unnecessary sets. Fixes mmap() of newly created files.
2022-11-03 20:12:50 -04:00
Niels Sascha Reedijk
429cbf2220 NetServices: include libnetservices2.a in the HaikuDevel package
Change-Id: I88e888df5ac7673ab343e25b7216546cb7ca6055
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5799
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-11-03 05:28:09 +00:00
Niels Sascha Reedijk
1111dda699 NetServices: Add libnetservices2.a from dev/netservices into master
The overall design does not deviate much from my proof of concept [2] and that still makes a good read to
understanding the overall architecture. If you want to get a sense of how it is built up, the API comes with
full doxygen documentation for the public API [3], and I have also done a PoC change for HaikuDepot which is
useful as an illustration on what the impact for the user of the new library is. [4] There is also a test suite
that may give some insight into the day to day ergonomics of the API [5].

The current state is that I am fairly confident that many HTTP requests will actually work, but I do expect
rough edges with a protocol with this many diverse implementations. There is also a list of features yet to be
implemented on Trac [6]. Additionally, I still want/need to do performance testing.

The goal of merging the kit right now is to start making it available for more uses, and through that also give
a chance to shape its future. There are also some design decisions that need review, most notably I expect some
discussion around the uses of C++ 17 idioms (like std::optional and std::string_view) and around the use of
exceptions for error handling.

The impact of merging right now should be near zero: the netservices2 kit lives in its own header space, and
builds into its own static library (libnetservices2.a). It is not yet used in any of the apps in our
repository.

The branch does remove the deprecated services kit from the libnetapi.so library, though it leaves
libnetservices.a intact. After our previous announcement to remove it after beta 3, this should be expected.

[2] https://github.com/nielx/haiku-netservices-rfc/tree/exceptions
[3] https://git.haiku-os.org/haiku/tree/docs/user/netservices?h=dev/netservices
[4] https://review.haiku-os.org/c/haiku/+/5692
[5] https://git.haiku-os.org/haiku/tree/src/tests/kits/net/netservices2?h=dev/netservices
[6] https://dev.haiku-os.org/wiki/Development/NetServices2

Change-Id: I5d0b7e2619699f39a2506588417b57391f0f5cc2
2022-11-02 01:37:17 +00:00
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
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
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
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
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
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
PulkoMandy
48776daf36 AboutSystem: restore previous size constraints
The window was changed to be larger and completely fill he screen at
640x480, this does not look right. Restore the previous 500x300 size
constraint.

Fixes #17952.

Change-Id: I7d60253b7304ede788e064adf2bad20168393a33
2022-10-16 10:00:38 +02:00
Axel Dörfler
97739603d1 kernel: Added operator delete(ptr, nothrow_t)
* This seems to be required when building the DriveEncryption kernel
  driver with gcc 11.2 on x86-64, at least.

Change-Id: Ie1ae09435dd912021957e64d4b9a3e7b05913c33
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5742
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-10-12 20:35:55 +00:00
Axel Dörfler
2c563c4c9b DiskProbe: Added 4096 byte block size
* It's a quite common block size on disks nowadays.

Change-Id: I68e1abb050e7bd0bb190cdd7e4d4f2c78e8db7ff
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5741
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-10-12 20:34:48 +00:00
Jérôme Duval
caafd8470b pch_i2c: add Meteor, Alder and Raptor Lake ids. add Lakefield ids.
Change-Id: I7acc2e0dd7b84ea3dc8f10bbe186ff0008aa7c2d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5739
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-10-12 16:53:14 +00:00
Oscar Lesta
b2a47f1f5a AboutSystem: update hrev from the replicant constructor.
Extracted a _GetOSVersion() function, and used that to get the value
for version text, and to update it at replicant instantiation time.

Should fix #17957.

Change-Id: Ifc964c3646743a503fd756c902d102977e35e73d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5724
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: John Scipione <jscipione@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-10-11 15:39:48 +00:00
Oscar Lesta
7c7357f07c AboutSystem: make static constants out of some member variables.
This avoids using them while uninitialized (as could happen when
using the archive constructor.

Fixes #17955.

Change-Id: If75354216b9731b3273d79aec787cd0140a6175e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5723
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-10-11 15:36:47 +00:00
David Karoly
a3fb982730 boot/efi/riscv64: use generic mmu functions
Change-Id: I671f41b9c163c522ffa7ffcb2509f279c4c9496a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5701
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2022-10-10 21:28:59 +00:00
Jérôme Duval
c3f23e8222 Devices: add a view for USB devices
Tried to match the USB classes to categories.

Change-Id: Id021730755060ab6a5149eea87f5e25370c67e1c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5738
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2022-10-10 21:28:37 +00:00
Jérôme Duval
edeaa9c0c7 listusb: generate class code table from usb.ids, and use it
Change-Id: I43b79c5abc74306aba9a69991aeb5e110b2d790b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5737
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2022-10-10 21:28:37 +00:00
Jérôme Duval
e6ce95c5ab usb: register device nodes for hubs and devices
the device identifier is the USBID. no actual interface to be used by drivers.

Change-Id: I9fd1fdab0d02f1b82380c619b39bc3a12a9e2333
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5736
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: X512 <danger_mail@list.ru>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-10-10 21:28:37 +00:00
Mashijams
518c994770 xfs: make static methods of abstract class instead of separate functions
Create() and Size() functions are now static methods of its corresponding abstarct class instead of separate functions

Change-Id: Iae15b8f2985843afe23fecdf49b1fcf6f7104e52
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5703
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-10-06 20:13:33 +00:00
David Karoly
f151690800 fix revision string for BIOS loader
The original linker script puts sHaikuRevision after __bss_start
which results in the revision string getting overwritten with zeroes
when the boot loader starts.

This change ensures that sHaikuRevision comes before __bss_start.

Change-Id: I271f2571ea274092f91f01019dcf8dcc1ad01bf3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5721
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-10-06 20:12:47 +00:00
Oscar Lesta
6eff9ae623 Sounds preflet: don't reuse variable names.
This fixes "issue 2" from #17150, that only manifested on x86-64.

Also: moved the "menu" variable declaration closer to its usege.

Change-Id: If44f84a8d5ee2bd662c312aec26359c857db5a93
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5720
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-10-06 18:16:49 +00:00
Jérôme Duval
ee45779374 hda: add missing product entries for newer devices
should fix #17972
update some product entries for intel which requires the skylake quirk
remove product entries for intel which don't require snoop

Change-Id: I08f2bd640fe9bef4405abc9b2eaa83070b9adce9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5719
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-10-06 16:33:56 +00:00
Alexander von Gluck IV
46cbd8ea98 build: Remove usage of obsolescent egrep
* "egrep: warning: egrep is obsolescent; using grep -E"
* egrep on haiku is a shell script calling grep -E
* given the warnings in the latest egrep, lets get
  ahead of the curve and migrate to grep -E

Change-Id: I0fc2b936c7a9c52f87caf97d8e9ac42516fee014
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5718
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-10-06 16:28:01 +00:00
Andrew Lindesay
ffc2227f28 HaikuDepot: Fix Changelog
Fixes #17968

Change-Id: I9952f0eddb751f0355beb1f9b020fd47be8e7f2d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5717
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2022-10-06 09:23:28 +00:00
Jérôme Duval
6652606fa4 usb: remove debug leftover
Change-Id: Idba6eaecb2c5b5773cd61794ac62fac1f7e3c1f9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5715
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-10-05 18:17:52 +00:00
Oscar Lesta
0449ac1e6a BootManager: fix usage of BPartition::ContentName()
This one got changed in hrev56463. Fixes #17969.

Credit for the proper fix: Jérôme Duval.

Change-Id: Ia7ab07573538031f4794efce9e0feba37b7b9bda
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5714
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-10-05 16:27:30 +00:00
Jérôme Duval
f193f67fbe pci_utils: get_class_info() needs at least 70 chars, make it 128.
seen on https://dev.haiku-os.org/attachment/ticket/17970/syslog_timestamp_hrev56511.txt#L131

Change-Id: I7d15c951e9c0349614f22d5b1348b43e105ba596
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5713
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-10-05 16:27:11 +00:00
Jérôme Duval
3f7abfc9b5 usb: trigger the explore thread when a bus is added
this helps to find the boot disk, otherwise it can happen that the usb disk driver
misses a bus to explore.

Change-Id: I6983b42cf66f946b4ba9763ec09b6e4a848f2e9a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5712
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-10-03 23:58:53 +00:00
Jérôme Duval
547ddb9090 uhci: switch to the new driver API
Change-Id: Ifc95a32066d0089d3fd41e489604d58815c074af
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5711
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-10-03 23:58:53 +00:00
Jérôme Duval
0ed2fb8d75 ohci: switch to the new driver API
Change-Id: I065743b5ced8b75f9576b62421525824698a2245
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5710
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-10-03 23:58:53 +00:00
Jérôme Duval
15ebede292 ehci: switch to the new driver API
Change-Id: I9102a27fe8e536003a0ab09c9cca5a87e88c8092
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5709
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-10-03 23:58:53 +00:00
Jérôme Duval
3d0c08efaf xhci: switch to the new driver API
keep the stack loaded when no bus is found

Change-Id: Ic2cf640ead7d94152651cea86a7977caa0920163
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5708
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-10-03 23:58:53 +00:00
Jérôme Duval
1eebcfa03e usb: add an interface for usb controllers using the new driver API
Change-Id: I25f481c8a7c3e4aafa3080640ce156b9232eaf73
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5707
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-10-03 23:58:53 +00:00
David Karoly
2ca24be640 boot: embed Haiku revision in loader binary
Change-Id: I9f71fba6c2c4fdaa63e118825c5fd00d51b556fb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5693
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-10-03 18:50:39 +00:00
Oscar Lesta
eb198a09e9 checkstyle.py: Python 3 compatibility, part two.
Previous patch was tested only with single files arguments, thus
missing the usage of "os.path.walk()" (that was removed on 3.0).

Use "os.walk()" instead, that has been available since Python 2.3.

Change-Id: Ia290bebaa950466ac5f1d978f0a5e710a8e3da88
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5696
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-10-02 09:33:59 +00:00
Mashijams
40b5272d86 xfs: make common lower bound function for calculating index of Hash
Change-Id: I5e902031b0e2a1051a7f96ab94dca0dba0ca9112
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5698
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-10-02 09:30:26 +00:00
Mashijams
88131dc314 xfs: Node xattrs
- Implemented node based extended attributes support

- Both Versions of xfs node based extended attributes can be read now

Change-Id: I2d2915029435e7722cf463b1e2b5579b361dd592
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5606
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-10-02 09:30:26 +00:00
Mashijams
efd335c77a xfs: leaf xattrs
- Implemented leaf based extended attributes on-disk headers

- Both version 4 and version 5 attributes can be read now

- Implemented all leaf headers check to ensure metadata integrity

Change-Id: Ifc3f2e433e991776bb02d1d38f621d5bd1554a4e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5600
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-10-02 09:30:26 +00:00
Humdinger
f9e7ef3248 DriveSetup: Sentence casing
Change-Id: I87d94ad7e344f4af6f4fbfec35fa88fc8acf31e4
2022-10-02 10:22:22 +02:00
Jérôme Duval
96985b8860 kernel/device_manager: make sure we can reload the driver before unloading it
for instance usb drivers are unloaded when unused, but they will be
loaded again when a matching device appears. this can only work when
the boot device is already mounted.

Change-Id: Ia92c679cffb6a1fac143c9f8b3bb570fb4555719
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5706
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-10-01 08:08:30 +00:00
Augustin Cavalier
9004d85ec5 app_server: Automatically pick a larger font size on HiDPI screens.
Ideally DesktopSettings would take care of this. However, we cannot
put this logic into its _SetDefaults, because that runs before
we actually set (or confirm) a display mode, and so attempts to fetch
the display mode in that function will fail.

(FontManager initializes even earlier and thus also is an unsuitable
place for this logic.)

At present, it merely uses a 2x larger font size at resolutions >"4K"
and a 1.5x larger font size at resolutions between 1080p and 4K.
Further adjustments can be made as necessary later on.
2022-09-30 20:57:53 -04:00
Augustin Cavalier
0716e5094e app_server: Print specific error when failing to initialize virtual screens. 2022-09-30 20:55:29 -04:00
Augustin Cavalier
872ce8a1b4 app_server: Clean up default font size constants. 2022-09-30 20:53:44 -04:00
Augustin Cavalier
cde5ffa802 Tracker: Enable thumbnail generation by default.
Now that all known crashes and other instabilities relating to it
seem to be solved. Fixes #17726.
2022-09-30 05:05:40 -04:00
Augustin Cavalier
27846b5a81 Tracker: Use default menu font instead of plain font for context menus.
This code has been this way since the initial import to OpenTracker,
so why or how it wound up in here is a mystery which may remain unsolved.

Removing it does not seem to cause any problems, so let's do that.
Fixes #16625.
2022-09-30 05:05:33 -04:00
Augustin Cavalier
86615b82db freebsd_network: Remove unneeded functions from if_var.h.
FreeBSD puts these in ifq.h (which we do not have), and no driver we
have actually uses them.

We can re-add the newer versions of them if we ever import a driver
which does.
2022-09-30 14:02:30 -04:00
Jérôme Duval
a4f09ce9d0 ext2: align dirent struct pointers with next_dirent()
Change-Id: Iaf102916d77f077c48348e2d1e7deff8f37d1232
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5634
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: David Karoly <karolyd577@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-09-30 17:13:14 +00:00
Jérôme Duval
e065d697fb Disk Device Manager: checks the raw content_name when editing a partition
also only provide a default name for partition containing a file system
fix #17958

Change-Id: Ib5a8928dc5272a400a99aa05b792201f3a6a2c7d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5705
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-09-30 17:10:39 +00:00
Augustin Cavalier
5b51027ca5 openbsd_network: Add a real implementation of MCLGETL.
The old alias had a number of shortcomings which made it not match
OpenBSD and thus special-casing had to be used in drivers. The new
version should match OpenBSD's semantics precisely.
2022-09-29 23:05:49 -04:00
Alexander von Gluck IV
c2dcf10676 Revert "boot/efi/x86: enable support for 64-bit ELF"
This reverts commit 5897f7b623.

See #17961 for additional information. This breaks the official
builds by growing the bios_ia32 loader too much.

Change-Id: I63bc0c95839ef681a260efdd6ddf527d6699c1f4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5704
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-09-29 13:47:38 +00:00
Augustin Cavalier
b4a9a0c94f WebPositive: Actually load "zoom text only" setting and default it to false.
All other browsers have it default-off (if there is even a way to
enable it.) This makes it much easier to use Web+ on HiDPI, though
ideally it would automatically set a zoom factor on startup
correspondent to the system font size.
2022-09-28 22:30:51 -04:00
Augustin Cavalier
59d0a83200 Remove "font size / 12" calculations from various places.
Use spacing values from BControlLook instead.
2022-09-28 19:36:59 -04:00
Augustin Cavalier
396ffed536 ActivityMonitor: Remove non-Haiku code, use more spacing constants. 2022-09-28 19:33:51 -04:00
Augustin Cavalier
caf3ea9044 Remove unnecessary SetExplicitPreferredSize from translators using layouts. 2022-09-28 18:29:33 -04:00
Augustin Cavalier
6191e1b167 BootManager: Use BControlLook::ComposeIconSize().
Fixes #17909.
2022-09-28 17:55:10 -04:00
Augustin Cavalier
2ac78cc4d6 BootManager: Fix minimum window size assignment. 2022-09-28 17:54:54 -04:00
Augustin Cavalier
d3da4f984e FileTypes: Refactor icon handling to use BControlLook::ComposeIconSize().
Fixes #17907.
2022-09-28 17:41:27 -04:00
Augustin Cavalier
b25b415fb9 FileTypes: Fix file mode. 2022-09-28 17:40:44 -04:00
Augustin Cavalier
00c4575238 Debugger: Use StringWidth()+DefaultLabelSpacing() to determine column widths.
Much less cut off text in the default layout.
2022-09-28 17:13:07 -04:00
Augustin Cavalier
2bfacb1a20 Debugger: Adjust default weights of splitters in the main window.
Much more logical proportioning.
2022-09-28 17:12:33 -04:00
Augustin Cavalier
3c1cf7b294 NTFS: Use the new next_dirent utility function just like BFS. 2022-09-28 16:30:55 -04:00
Augustin Cavalier
e285b3071d Introduce a utility function for moving to the next dirent in read_dir.
This takes care of making sure the dirent buffer is properly aligned,
which it needs to be on some platforms (SPARC, ARM, etc.)

Change-Id: I9a6352b1e654c090a200770d51f96511ee024a99
2022-09-28 16:30:00 -04:00
Augustin Cavalier
e3197646ea kernel/lib: Fix reference to dirent.c after prior change. 2022-09-27 20:33:14 -04:00
Augustin Cavalier
a53cd0082a FirstBootPrompt: Appease GCC2. 2022-09-27 20:14:21 -04:00
Augustin Cavalier
ba59081e52 libroot: Implement readdir_r in terms of readdir.
Originally _r mostly avoided the buffers in the DIR* and invoked
_kern_read_dir correctly, however that did not interact properly
with the non-reentrant functions and so this method was reworked
some years ago to check entries_left and copy results out of the buffer.

However, that was done improperly; it just copied the structs,
which as they have a VLA at the end, meant the name entry was not
copied at all if an entry was read out of the buffer.

Since we have to read entries out of the buffer anyway,
just invoke the real readdir() and then memcpy what it returns.
Use an ErrnoMaintainer to prevent errno from being affected.
2022-09-27 20:11:54 -04:00
Augustin Cavalier
eafa0e1f49 libroot: Move dirent.c to C++. 2022-09-27 20:11:54 -04:00
Augustin Cavalier
3f3b84894b idualwifi & iaxwifi: Merge changes from OpenBSD. 2022-09-27 19:34:43 -04:00
Augustin Cavalier
d052479f68 Input preferences: Use BControlLook::ComposeIconSize().
And do some other cleanup while at it.

Fixes #17919.
2022-09-27 18:57:31 -04:00
Augustin Cavalier
6a287ced0b Keymap: Use BControlLook::ComposeIconSize for the conflict view.
Fixes #17911.
2022-09-27 18:38:49 -04:00
Augustin Cavalier
2d9b9e209b IconView: Scale icon_size constants.
Part of #17914. Also affects DataTranslators.
2022-09-27 18:32:45 -04:00
Augustin Cavalier
1272bd2a7f FirstBootPrompt: Scale the button icons.
Part of #17914.
2022-09-27 18:30:59 -04:00
Augustin Cavalier
1b72036bef libroot: Replace scandir, alphasort implementations with musl's.
Notably alphasort actually uses strcoll not strcmp, so this does
affect behavior. scandir should be the same.
2022-09-27 17:28:46 -04:00
Augustin Cavalier
d2d46658d7 libroot: Move threads.c to libstdthread folder and rename to match FreeBSD.
It was introduced long ago, now that we have the same folder as FreeBSD
does we should put it in the same place.

Synchronize with FreeBSD while at it.
2022-09-27 17:24:57 -04:00
David Karoly
a3c9f71efd boot/efi: factor out generic mmu functions
This change moves the common functions related to EFI memory map
to arch/generic for arm, arm64, x86.

riscv64 and x86_64 shall be handled separately as they use some
more architecture-specific logic:
* riscv64 needs special treatment for the M-mode resident code
  located at 0x80000000 which is reported as available in the
  EFI memory map provided by u-boot.
* x86_64 has a slightly different logic for building the
  memory regions list so some additional rework and testing will be
  needed before it can be unified with the generic mmu functions.

Change-Id: I430c84dfc693c5b6f04c170dec8ffb1db2c2ace1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5694
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-09-27 19:13:36 +00:00
Oscar Lesta
c907db6c62 Tracker: fix build with DEBUG=1
Change-Id: Ieaaf23b0780f50837153634ad3e82eda6e5978f8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5700
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-09-27 19:12:54 +00:00
Jérôme Duval
2b9426c90a hda: detect one more intel audio device per device ID
Change-Id: I91de99c0242a2546e0a3cac94a4f46719f048889
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5699
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-09-26 17:32:17 +00:00
David Karoly
820db870a7 kernel/x86: fix build for 32-bit ELF loader on 64-bit arch
Change-Id: I7c9e8cb7a3d03d40167f7924c17e95f5ad646afe
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5695
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-09-26 14:54:39 +00:00
Oscar Lesta
5d7ed80a63 /bin/pidof: add it to regular images and to the Haiku package.
Change-Id: I07cbc6b715ee5d549ec4fcaf9b28398ee6ffb3dc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5697
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-09-26 14:50:02 +00:00
Dominic Martinez
388d91a7b8 build: fix jam clean when using emulated attributes
should help #10065

Change-Id: I4ebe28834201076c6710be52fc2ace580099dd6c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5313
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-09-26 14:31:07 +00:00
David Karoly
5897f7b623 boot/efi/x86: enable support for 64-bit ELF
Change-Id: Id3b207444b55041dc83ee1afdd61b467ce13ff70
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5665
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-09-26 14:30:19 +00:00
Jérôme Duval
fbca1c4088 kernel/x86_64: configure LFENCE as a serializing instruction on AMD
Change-Id: I152bf41c3479f81fc458abdf8d89874ffa3a08d7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5691
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-09-25 08:15:15 +00:00
Jérôme Duval
a6e9176bc5 x86_64: prefix rdtsc with lfence, or use rdtscp if available
a strong monotonicity is a property of system_time(). Performance should be
a bit impacted (around 10%).
removed omit-frame-pointer hints as the compiler generates the same without.

Change-Id: I920145d616604f32b38d9e134ce83f3e0e848bc7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5690
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-09-25 08:13:49 +00:00
Mashijams
99071c0c0b xfs: Symbolic links support
- Necessary hooks for reading symlinks are implemented

- Added support for local symlinks

- Added support for extent based symlinks

- This patch completes #17791

Change-Id: If6847974562b21f751097df357326f4643eff757
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5621
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-09-24 08:23:38 +00:00
Jérôme Duval
2e69f2b076 kernel/x86: init the tsc frequency and clock speed from CPUID when available
only for Intel newer CPUs.

Change-Id: Icd83f3b643796bfb3725b5c8877b9e7828bc71d9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5688
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-09-24 00:35:02 +00:00
David Karoly
84bd9b4ad5 boot/efi/arm64/mmu: convert TRACE to use new syntax
Change-Id: Ib25cee9e7ea37a68d0d432db8b99eb419e453e7f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5689
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: David Karoly <karolyd577@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-09-23 18:10:39 +00:00
David Karoly
cec78ae332 kernel/arm64: introduce virtual_ranges_to_keep
Change-Id: I6de950cb18892ebf2dd2aefa34b65b90a17e3f2c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5682
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: David Karoly <karolyd577@gmail.com>
2022-09-23 13:57:43 +00:00
David Karoly
a0c8f15f33 kernel/arm64: implement iframe stack and unwinding
Change-Id: I1587c1f57bd73777a188bb8f1bc58263de82fcb9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5684
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: David Karoly <karolyd577@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-09-23 13:56:16 +00:00
David Karoly
139831c54c boot/efi/x86_64: log memory map on bootup
Change-Id: I94c169d598d771a813b16e31fd892d7cdafcaad8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5687
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-09-23 11:39:04 +00:00
Jérôme Duval
ca6d474a73 virtio_block: add support for the topology feature
gets the physical block size

Change-Id: I7b4d80874d1463a5122c34171956af2b267b1c69
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5669
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-09-23 06:56:01 +00:00
Jérôme Duval
143a5f8ce6 DriveSetup: add a column for the physical block size
Change-Id: Id43df9eb4a3619ba265ed25aeb7ec82d0a26358c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5668
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2022-09-23 06:56:01 +00:00
Jérôme Duval
688acf41a3 add physical_block_size field where applicable
only scsi_disk checks the actual value, other drivers take the logical block size.

This change reports the physical block size from the disk rather than the block
size used by IDE/SATA/SCSI commands. On typical modern SATA disks, the SATA
commands will use 512 byte blocks, but the disk will actually read and write
4K blocks internally. This is only of importance for partition alignment for DriveSetup,
and is independant of file systems or partitioning systems. This could also influence
the recommended block size for some file systems.

Change-Id: Id0f2e22659e89fcef64c1f8d04f81cd68995e01f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5667
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-09-23 06:56:01 +00:00
Jérôme Duval
285fe6257a libroot: fix *_np functions signature
fix f33f4868fe
*_np functions are in a not included header.
add weak aliases for the future functions without _np.

Change-Id: Ie2bcc9173a2b93a6c4052c039cb37930c1c3aaa1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5685
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-09-22 04:32:15 +00:00
PulkoMandy
e3d5904751 Disk Device Manager: generate a name for nameless volumes
This will give the same result as fs_stat_dev, so the filesystems will
have the same name everywhere.

Change-Id: Ic684142efaeb2c16b393f3f3e5c9c3010a054b30
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5636
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-09-21 16:14:32 +00:00
X512
74a5cb7bbc shared: move ScopeExit from riscv64 arch kernel code
this file is c++11 only.

Change-Id: Ibff7acec00337a9f56f9b8e29ea262c8d64c2446
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5292
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-09-21 16:09:33 +00:00
John Scipione
b4d0fd9177 AboutSystem: Update replicant colors on workspace activated
Change-Id: I23bc998df8c9cc8894accc475cab8eec69db7c21
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5514
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2022-09-21 15:26:29 +00:00
John Scipione
074aebe307 AboutSystem: Add system information replicant
Fixes #16130 (incidentally)

Change-Id: I764d143a0e6b9ebf8679149edd2aca463cb8ebfb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5511
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: John Scipione <jscipione@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-09-21 15:26:29 +00:00
David Karoly
537d67ae5c kernel/arm: fix frame pointer after unwinding iframe
Change-Id: I285896ff6624e26695e282d02011a31de32fc297
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5678
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-09-20 08:19:47 +00:00
Jérôme Duval
799ab823bb libroot: Add support for C11 Threads missing parts (except gcc2).
The respective files can be found in the FreeBSD source tree at:
- lib/libstdthreads/call_once.c
- lib/libstdthreads/cnd.c
- lib/libstdthreads/mtx.c
- lib/libstdthreads/threads.h
- lib/libstdthreads/tss.c

Missing is support for PTHREAD_DESTRUCTOR_ITERATIONS.

Change-Id: I7a6c79954f36195eadd1351d308c21a001192232
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5675
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-09-19 19:45:45 +00:00
Niels Sascha Reedijk
4125af2aeb Login: Fix typo in help message
Reported by zuMi, while contributing to the Italian translations. Thanks!

Change-Id: I15e8fc17390188c6d0051384d047ebe06d19a2bc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5677
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-09-19 16:54:23 +00:00
David Karoly
ef89435316 boot/x86: unify KERNEL_LOAD_ADDRESS for BIOS and EFI
Change-Id: Ia3157c7c0908698da94c1aa85cb6366fb00fb7f1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5670
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2022-09-19 14:51:58 +00:00
David Karoly
303283fb7a kernel/arm64: implement stack trace
Change-Id: If5627fb4d37bdb7260d7e14c0c3e8cf7bcbee53d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5672
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: David Karoly <karolyd577@gmail.com>
2022-09-19 14:51:18 +00:00
David Karoly
9a31a30528 implement TLS for arm64
Use the EL0 Read-Only Software Thread ID Register aka TPIDRRO_EL0
to store TLS pointer.

The EL0 Read-Only Software Thread ID Register is read-only in User mode
and read/write in privileged modes.

Change-Id: Idea7e3d66cd391dbbe3f9395cb37716089a49e13
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5673
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: David Karoly <karolyd577@gmail.com>
2022-09-19 14:51:00 +00:00
Javier Steinaker
244a9826b8 strptime: swapped the order of the constants to make musl's implementation Haiku-compatible
Change-Id: Iecfe13dcf8e8216e274ed1f194e1c891042f6bd1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5635
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
2022-09-18 20:49:43 +00:00
Javier Steinaker
baed91b3b6 strptime: swapped the order of the constants to make musl's implementation Haiku-compatible
Change-Id: Iecfe13dcf8e8216e274ed1f194e1c891042f6bd1
2022-09-18 16:23:31 +01:00
Niels Sascha Reedijk
da8162be21 Merge branch 'master' into dev/netservices
Change-Id: Ic4c065b9a76fcabd6450dd1ab5882510f922a128
2022-09-18 16:16:37 +01:00
Niels Sascha Reedijk
c68590fd4d Tests: fix unittest build and include BMemoryRingIO shared tests
When change 2966 was merged as hrev56269, it was decided to first introduce
this in libshared instead of libbe.so. The test was moved accordingly, but
not all the code in the unittests was properly updated. This change completes
it.

Note that the test currently crashes, so it needs more investigation whether
that is a test issue or a BMemoryRingIO issue. Fixing this is beyond the
scope of this change.

Change-Id: I0f61d1dd013da904b3e4545db11fefa9da2da0a2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5676
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-09-18 14:11:06 +00:00
David Karoly
98dea60252 kernel/x86/elf: fix build with TRACE enabled
Change-Id: Ibed0d5e628500b0c5e2f999d95587490079519d3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5671
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2022-09-18 06:16:09 +00:00
Jérôme Duval
a9ada46be8 ahci: propagate physical block size to scsi read capacity 16
Change-Id: I8dab117fe8da9fc6e0f18adaa178ff79bc7c6ae4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5666
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-09-16 09:16:19 +00:00
David Karoly
806a5d179e boot/efi/x86: move bootGDTDescriptor to local variable
Global variable gBootGDTDescriptor is used only in function arch_start_kernel()
so we can convert it to a local variable.

Change-Id: I8b6ad2c0903364bdcdcc1039aea6c9c09253fe09
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5663
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: David Karoly <karolyd577@gmail.com>
2022-09-15 07:39:02 +00:00
David Karoly
6a7095af63 boot/efi/x86: move bootGDT local variable
Global variable gBootGDT is used only in function arch_mmu_init_gdt()
so we can convert it to a local variable.

Change-Id: I06174dcd6df4b7bd5136a7e2fabafdc3273f03d3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5662
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2022-09-15 07:39:02 +00:00
David Karoly
e98ad6fc50 kernel/x86/pae: fix build with TRACE enabled
Change-Id: Ifbf979608978a66ad6d2b9af8002c39f1f205422
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5661
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-09-15 04:36:38 +00:00
PulkoMandy
49a00a128a userlandfs: implement get_fs_info using ioctl
This avoids introducing an entirely custom hook in FUSE.
It uses the ioctl hook in an unconventional way (calling it with no
valid fuse_file_info) but this can be fixed if a filesystem requires it
(by opening a file handle on /, doing the ioctl, then closing again).

An updated version of fusesmb-haiku is available and confirmed working:
https://github.com/haikuarchives/fusesmb-haiku

Change-Id: If1268113874363fa035e5340be75e9f5198216d6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5199
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-09-13 18:51:12 +00:00
Jérôme Duval
750afaef94 bfs: disable some block sizes when the partition size is too small
these would otherwise trigger an assert when initializing.
fixes #6781

Change-Id: I4fa34455e7734f6a4039705527bf5ab09b46998d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5659
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-09-13 18:48:25 +00:00
Jérôme Duval
eac10866e2 DriveSetup: select the actual partition type instead of defaulting to BeFS
Change-Id: Id73ad3398e802eb10b1928317bb9987ddee30eb6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5658
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-09-13 18:48:25 +00:00
Jérôme Duval
6b3e198d41 gpt: let the type be changed
Change-Id: I1c049c28b416d13b679aa32eb8cbc41a3273a05d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5657
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-09-13 18:48:25 +00:00
Jérôme Duval
6b7504173c kernel: KPartitioningSystem::SetType() should use the child ID
KPartitioningSystem::SetName() and KPartitioningSystem::SetType() are very similar.
SetName() already worked for GPT, and with this change SetType() now works for GPT too.
Change-Id: If1456a8f5e94ae2e2a05b75e3691f912bd1324ee
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5656
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-09-13 18:48:25 +00:00
PulkoMandy
d469ab6d6c libroot: Remove unused files
Not referenced in any Jamfile, does not compile, untouched since
2003 except for a few coding style and cppcheck fixes. The functionality
is implemented elsewhere in the disk device manager and userland
filesystem add-ons for DriveSetup.

Change-Id: I5ebe125931c8d4410c2d335f9d6c0e32008f038b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5637
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-09-13 18:43:55 +00:00
Mashijams
b4b3f69fca xfs: extended attributes necessary hooks and shortform attributes support
- Implemented all necessary hooks for extended attributes in kernel_interface.cpp

- Implemented an abstract class attribute which will act as an interface between all forms of extended attributes in xfs

- An attempt to read shortform extended attributes

Change-Id: Icff9329b790f9fcfc0b078f61059795af9d9e486
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5570
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-09-12 14:04:23 +00:00
Michael Brumbelow
950809231f Removed 'register' storage class compiler warnings
Change-Id: Iba89a9d0845bf7e816983f903281d33e273f6e35
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5558
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-09-12 14:03:28 +00:00
PulkoMandy
134fa6111f vesa BIOS patching: try to use modes reported as invalid by the BIOS
It seems some versions of Intel BIOS report the mode as invalid after
patching (probably there is not enough patching), but setting the mode
will actually work. So, if we detect no mode with our patches, and we
detect a broken mode, attempt to use that.

May fix #17929

Change-Id: Icb9259a79b5a49d18946b682af89dda16176e854
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5628
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-09-10 17:49:42 +00:00
Javier Steinaker
e89a5cc418 BHttpTime: cookie strings are in english, so strptime now uses POSIX (english) locale to parse them
Change-Id: I863b59a3f3c27b656325752af7939576becf32f1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5629
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-09-10 17:49:05 +00:00
Jérôme Duval
124ae7cc2f app_server: store the brightness with the current screen config if absent
when no screen configuration is found, the preferred mode is then selected,
and we now use this as current screen configuration. Otherwise, the user
would adjust the brightness, but it would never be stored for the next boot.

Change-Id: Ia855f8a29eb5e429747f3e0bc89a46587fa42f59
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5624
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-09-10 16:39:13 +00:00
David Karoly
61299599e0 kernel/arm: disable interrupts when returning from exception handler
Change-Id: I66a7d023d105e2bf066b9597f7703755c73c3e55
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5633
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-09-10 15:19:00 +00:00
Oscar Lesta
dee0cb7098 checkstyle.py: make it compatible with Python 3.x
* Change prints to be compatible with 2.x and 3.x.
* Use html.escape instead of cgi.escape on Python >= 3.8.
* Make integer division explicit.

Change-Id: Ib9b236816e8fa07741c02d0e79629c4aa0ed6676
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5603
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-09-10 11:25:07 +00:00
Jérôme Duval
61790bdb8a partitioning_systems: create libpartitioning_systemscommon for common files
Change-Id: I1b3c2f9bad60024a7a07ae4bbfe3970ac5ae42b4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5632
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-09-10 11:21:23 +00:00
Augustin Cavalier
86da03857d Appearance: Use a dynamic instead of fixed size for the text preview area.
Fixes #17872.
2022-09-09 17:37:42 -04:00
Augustin Cavalier
66af664352 Drop the unused TTY bus_manager.
Just stubs and not actually used.
We have a TTY module (and driver) which supplant it.
2022-09-09 17:14:12 -04:00
Augustin Cavalier
177c832dab Add missing NULL checks to USB drivers.
Should fix #17276, #17846.
2022-09-09 17:07:09 -04:00
PulkoMandy
8d1a3621dc usb_serial: fix possible NULL pointer dereference
There can apparently be interfaces without descriptors.

Should fix #17892

Change-Id: Ibcbab0f60ecbd2005640c647bf7540d17d0f5375
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5598
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-09-09 21:00:34 +00:00
Augustin Cavalier
6021345a33 HaikuControlLook: Correct drawing of border in menu fields.
Fixes #17903.
2022-09-09 16:49:07 -04:00
Augustin Cavalier
e8d394bd51 Tracker: Invoke Sync() during the copy operation.
This way when the copy dialog closes, the file will actually
have completed copying to disk.

Fixes #17651.
2022-09-09 16:21:03 -04:00
Augustin Cavalier
4424256ac4 Tracker: Fix hiding/showing the draggable folder icon on navigation.
Fixes the icon disappearing when you navigated to or from the root.
2022-09-09 16:14:09 -04:00
Augustin Cavalier
a0b9c84fe0 Tracker: Fix draggable folder icon size computation.
Should fix #17906, but I could not reproduce it, so I was unable
to confirm this fixes the problem.
2022-09-09 16:06:32 -04:00
Augustin Cavalier
95ca8eefea Tracker: Privatize most members of BPoseView.
Greatly reduces what is available to inherited classes.
No functional change intended.
2022-09-09 15:37:29 -04:00
Augustin Cavalier
f61067a023 Tracker: Reset title view state after making column list empty.
Fixes #17899.
2022-09-09 15:28:43 -04:00
Augustin Cavalier
9f8c5aabe3 Tracker: Correct size of Name column in Query view.
Fixes #17940.
2022-09-09 14:49:22 -04:00
Dominic Martinez
f6a103a892 build: clean HdsSchema directories
Previously, HdsSchema directories were "built" with the Clean action and
manually created in their respective commands. This patch creates the
directory as a separate target to be cleaned. The MkDir1 action is used
directly since $(1) is already rooted and the HdsSchema actions use the
ungristed directory as a dependency.

This also fixes a build failure in Ham since it does not allow multiple
targets as part of 'together' actions.

Change-Id: Ibc818375477b5f1712ac7c7cec8a1f8812f62b65
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5630
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2022-09-09 07:26:21 +00:00
waddlesplash
242fec2332 Revert "bfs: fix alignment of struct dirent"
This reverts commit 7fe1087ed4.

Reason for revert: could cause underflow

Change-Id: Ib2263f3ab17ae377b0565d020410bae616385cfe
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5577
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-09-08 18:08:03 +00:00
David Karoly
7fe1087ed4 bfs: fix alignment of struct dirent
This is needed on ARMv7 as inode number is stored using STRD instruction
which can result in alignment fault even when SCTLR.A bit is disabled.

see ARMARM section A3.2.1, Unaligned data access

Change-Id: Ib17bf3f78e84ad7987d8158426bc9b27ded28a8e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5623
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-09-08 18:06:26 +00:00
Mashijams
b65cc53f48 xfs: fixing bugs, Enable Werror
Fixed bug on reading files inside Haiku using CAT command on shell

Fixed bug on reading small directories inside Haiku

Node directories can now be read fine, which fixes #17839

LongBlock verification is now through common VerifyHeader function

Change-Id: I1eb651bd084580c86d0facb919825e94488e43d2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5546
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-09-08 18:01:45 +00:00
Alexander von Gluck IV
b6b61bd39f general/logs: Ensure all logs start with THING:
* 90% of our logs start with some context on what is
  generating a log message (thing:)
* Things following this logging model however do "thing [time"
  which is inconsistent
* Being consistent will allow us to start scanning logs in a
  smart way and try to analyze patterns of what is throwing
  errors, etc in an automatic way.
  aka /^(service/driver/etc)\:/

Change-Id: I1ef2df4f17f70f858a485554a4e8a3f87f1a69c8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5568
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Oscar Lesta <oscar.lesta@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-09-08 17:59:21 +00:00
John Scipione
e486e3c033 BBox: Move label up by font height / 6
This is for BeOS application compatibility. BeOS apps expect the label
to be drawn a few pixels higher and may not draw correctly otherwise.

Font height / 6 scales with font size so that the label moves up
proportionally at larger font sizes e.g. 21pt. 1/6 is a better offset
for ArtPaint Global settings and DVDRip 1.0.

Change-Id: I6d852111d75a97f34539f6e94c2e2408b6c15808
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3017
Reviewed-by: John Scipione <jscipione@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-09-08 17:58:14 +00:00
Devin Gillman
f5d759ea3b RemoteDesktop: Application Crashes when Missing SSH Port
Addresses https://dev.haiku-os.org/ticket/14640

* Fixed parameter validation logic.

Change-Id: I9b208d251a74a6024bb621eed4a7d5b167f4ff32
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5596
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-09-08 17:57:50 +00:00
Jérôme Duval
5d4091e214 hda: detect one more intel audio device per device ID
Change-Id: Ic1e96f1326c0bc7de408c94bf121198888559939
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5627
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-09-08 14:19:19 +00:00
Dominic Martinez
c97e32fed2 build: fix bug in partition system Jamfiles
Header files need to be included into a source file, not depended on.
Using depends changes *.cpp from a source file to a generated file. Jam
has a bug in dependency resolution that allows this to work, but this
breaks in Ham.

Change-Id: I584c719d353adbfdb68ddad5d05e7085f635ae28
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5625
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2022-09-08 07:43:58 +00:00
Augustin Cavalier
aabcd6b399 runtime_loader: Correct destruction of old TLS DSO blocks.
Instead of checking against the current block's DSO generation,
the DSO that the operator[] was invoked on was being checked instead.
This could lead to spurious deletions of TLS data in the case where
the generation count changed between accesses of the TLS variable
(currently that only happens when modules are unloaded.)

May fix #17896, but I did not have a reliable way to reproduce that.

Change-Id: Ie1ee51c1fbbe638918fd5a010047a2b56d481f2b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5604
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-09-07 21:56:11 +00:00
Oscar Lesta
8fc394c12d pkgman: change default search scope
* Reduce default search scope to: "name", "summary", and "provides".
* Add a new "--search-scope=<scope>" option that allows to either limit
  the search to packages names (-s name), or to replicate the previous
  behavior of searching everywhere in the package info (-s full).

Motivation for the change:

The ever increasing number of packages available for Haiku was impacting
pkgman search usefulness, as it easily returns too many packages (what a
wonderful problem to have :-D).

Limiting the default search scope helps with that, and the old behavior
is kept "just an option away".

Change-Id: I5b456b90137237134eee7ca7ee501bf8e3767440
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5616
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-09-06 20:31:38 +00:00
Oscar Lesta
e4d44d82aa Sounds preflet: small UX improvements.
* Disable BMenuField unless a sound event is selected.
* Changes in the MenuItem enable/disable the play button as necessary.
  (previously only changes in the EventList did that).
* Enable the play button when BFilePanel is closed (after selecting valid file).

Fixes the (still reproducible) UI/UX portion of #17150.

Change-Id: I5b5d00cc7fce00a0d0f908bbaff883169f38f855
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5613
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-09-06 17:48:26 +00:00
Humdinger
3e06d97bc8 HaikuDepot: add missing strings to catalog
Quite a few source files were missing when collecting strings
for translation. Just do the catalogs for all applicationSources.

Change-Id: I452bed61b50d5693b46d63cf5773b49f75ef2aef
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5622
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-09-06 07:21:50 +00:00
Oscar Lesta
83a4315c94 /bin/pidof: add a basic "pidof" command.
Change-Id: Ia70d3280d46cf9f5770f8c83a5941ea5b1b8dfe7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5599
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-09-06 05:57:07 +00:00
David Karoly
9a515fedd9 virtio-mmio: hush
Change-Id: I3f628c3045819acd48497bc7224cb68fd661e2bc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5617
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-09-05 18:53:42 +00:00
David Karoly
3bfbf2fb53 kernel/arm: check for PXN and alignment fault in page fault handler
Change-Id: I2a863b57b1252343c9c029d1bb5af8d328558576
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5620
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-09-05 17:29:49 +00:00
David Karoly
72274d4a8d kernel/arm: refactor page fault handling
Introduce common page fault handler so we don't have to do code duplication.

Change-Id: Ib9fa6a3d38e137e43911a24a3405c7c3f1de5908
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5619
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-09-05 17:29:49 +00:00
David Karoly
17569c02ff kernel/arm: clean up arch-specific defines
* align fault syndrome and fault address register naming with
  ARM Architecture Reference Manual (i.e. IFSR, DFSR, IFAR, DFAR)
* move PSR bitfield defines to arch_cpu_defs.h

Change-Id: I813045eec335ffbdd75270ad5a1afb2f222f73c8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5618
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-09-04 19:11:05 +00:00
David Karoly
67406e5145 kernel/arm: save FPU registers on context switch
Change-Id: Icb62688338d3a3083f8f6d1874cae3218ba042e0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5614
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-09-04 17:33:49 +00:00
Niels Sascha Reedijk
97f11716bf Merge remote-tracking branch 'origin/master' into dev/netservices
Change-Id: I588c4a840523995f820161d63741c137bc5c719c
2022-09-04 07:30:59 +01:00
Niels Sascha Reedijk
27196c4068 NetServices: use BBorrow<BDataIO> for custom body targets
Change-Id: Ib2d4b0ca3689338d906f943295278c086c6f2c83
2022-09-04 07:27:08 +01:00
Niels Sascha Reedijk
1e22817dfb NetServices: add the BExclusiveBorrow<T> smart pointer
This smart pointer is designed to help with putting some explicitness and
safety around the case where someone will use their own object that implements
the BDataIO interface to store the body of a network request. By default,
BDataIO objects do not require or enforce thread safety. Since accessing these
unsynchronized objects between two threads is undefined behavior, it should be
explicitly discouraged.

The BExclusiveBorrow/BBorrow smart pointer helper helps solve that by enforcing
the limitations on using an unsynchronized object in two threads. When used
correctly, there is a runtime check on incorrect use by the developer. This
should help write better code.

The design is based on shared_ptr, including having an admin block akin the
control block, that manages the internal object. This type-erased admin block
has the advantage that it allows the owner to have a different type than the
borrower. It also handles cases where the lifetime of the borrower is longer
than the owner: the borrower can continue to use the object until they want to
return it, after which it will be cleaned up. This will make it possible to do
some fire and forget pattern in the network services kit, where someone may
just wants to create a file and borrow it to the network request, and care
about further processing the file in the future.

Change-Id: Ie9b7e7472c868b60f663b4db4fa449d421e447eb
2022-09-04 06:54:37 +01:00
David Karoly
d244e9ef2d kernel/arm/exceptions: use more readable macro names
Change-Id: I4f41f6dff6a871583ea91e029476fc9c5f0ca46d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5615
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: X512 <danger_mail@list.ru>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-09-03 18:04:42 +00:00
John Scipione
605761f47a Deskbar: Calculate clock margin based on font size
Based off of tray padding instead of hard-coding 12. Calculate tray
padding once in AttachedToWindow() and use that value everywhere.
Create some class float member variables to keep track of these values.

Fixes #17923

Change-Id: I3e767fdc8d2775e5f0dfff3275aeb0b686a8ea76
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5610
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-09-02 16:25:44 +00:00
David Karoly
c791590a8e kernel/arm: fix iframe unwinding
* add missing call to thread_get_current_thread()
* apply some better formatting to iframe printout
* pass iframe in lr to exception handlers
* add missing iframe scope in syscall handler
  (was removed previously by mistake)

Change-Id: I01c34f2114cd874f72f91be428921ad2002e256a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5611
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-09-02 16:24:23 +00:00
David Karoly
3d79cd3332 kernel/arm: set PXN for user memory
* set PXN for all page tables below KERNEL_BASE
* also set PXN for physical page mapper

PXN, Privileged execute-never

When the PXN bit is 1, a Permission fault is generated if the processor
is executing at PL1 and attempts to execute an instruction fetched from
the corresponding memory region.

Change-Id: I3056cbed151004ac9edfbc81ebeada328aeb603c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5607
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-09-02 16:24:08 +00:00
David Karoly
c0a7601219 kernel/arm: store current thread pointer in TPIDRPRW register
Use the Privileged Only Thread ID Register aka TPIDRPRW to store
the current thread pointer.

The Privileged Only Thread ID Register is only accessible
in privileged modes, and is read/write.

see: ARMv7 Architecture Reference Manual,
section B3.12.46 CP15 c13 Software Thread ID registers

Change-Id: I5273bee8a80b78cdc547b2f6c96632d120eb3d55
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5608
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-09-02 16:23:53 +00:00
Máximo Castañeda
0da59b2407 DesktopSettings: remove unnecessary includes
Change-Id: I94fbffbe359be954bf769299420d1df97b2da184
2022-09-02 12:10:31 +02:00
David Karoly
e96dc7dbcb kernel/arm/int: print user SP and LR from iframe
Change-Id: If3ad93f00c869321b1897f8e779e435b25d244f7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5609
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: David Karoly <karolyd577@gmail.com>
2022-09-02 06:42:12 +00:00
Augustin Cavalier
388f8d4c0f TeamMonitor: Appease GCC2. 2022-09-01 00:26:33 -04:00
Augustin Cavalier
054c1b2706 Tracker: Overhaul list column size initialization and storage.
Mostly for HiDPI, but this also cleans up the code in general, too.

 * Apply a scale-factor when loading and serializing column size/offsets
   in ViewState.

 * Do not hard-code offset values for default columns but let
   BPoseView::AddColumn() compute them manually instead.

 * Change BPoseView::AddColumn() to support being called during
   early initialization and utilize it in SetUpDefaultColumns...().

 * When adding deserialized columns to a BPoseView, always realign
   the offsets instead of just doing sanity checking. The rationale here
   is that the first time the TitleView is touched, it will do this
   anyway, and cause "snapping" or drawing glitches if the alignment
   is not as expected.

   If it was actually somehow an intended feature that non-adjacent
   columns can be displayed, changes are needed in TitleView and PoseView
   to properly support this without triggering redraw glitches.

I still saw some very slight redraw glitches (e.g. column contents
shifting by 1px) at higher font sizes; however, Tracker before this
commit had far more of those glitches (this commit seems to resolve
a number of them.)

Tested with 12pt, 18pt, and 20pt font sizes; this seems to work
pretty well. But if you see strange behavior or more redraw glitches
than there were previously, please do file a ticket.
2022-08-31 23:59:00 -04:00
Augustin Cavalier
509c951d85 Tracker: Scale all icon sizes, not just the list icon size.
ViewState now always holds the unscaled icon size and PoseView
computes and caches the actual display icon size.

Anyone who used Tracker on HiDPI before this commit will likely need
to reduce the icon size on their desktops and any open windows.
2022-08-31 22:48:42 -04:00
JackBurton79
2eaee4a7a1 Screen preflet: fix usage of std::find()
Change-Id: I8689ea6baa408d07c715703e8f8bf8f29bf40f60
std::find() never returns NULL but the last element in case of failure
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5602
Reviewed-by: Máximo Castañeda <antiswen@yahoo.es>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-08-31 21:13:32 +00:00
Augustin Cavalier
33cf9d22ff ProcessController: Utilize ComposeIconSize and refactor icon menu items.
* All MenuItem variants which draw icons now derive from IconMenuItem
   and use its functions to draw and otherwise manage their icons. This
   resolves a number of TODOs and reduces code duplication.

 * Use BControlLook::ComposeIconSize() to compose icon sizes throughout.

 * Remove unused methods from IconMenuItem.
2022-08-31 17:07:49 -04:00
Augustin Cavalier
72e4928f8a Tracker & desklink: Pass -1 to GetTrackerIcon for sizing.
It can just deduce the size from the passed BBitmap if we do this.
Simplifies the code somewhat.
2022-08-31 16:21:53 -04:00
Augustin Cavalier
e6ab6daf98 TeamMonitor: Use BControlLook::ComposeIconSize.
And DefaultLabelSpacing, too. Fixes appearance on HiDPI.
2022-08-31 16:17:19 -04:00
Augustin Cavalier
1f0c87711b shared/IconView: Add a variant of SetIcon which directly accepts a BBitmap. 2022-08-31 16:16:43 -04:00
Humdinger
ee88fb6f03 HaikuDepot: Minor GUI string changes
"Shutting down" is too reminiscent of a system shutdown.
We're just quitting the app. Going with a generic "Cleaning up".
Correcting the app name, HaikuDepot.

Change-Id: Ifadf533170dc89befc971ea86b7140d3aa7fcef8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5605
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-08-31 17:25:11 +00:00
Augustin Cavalier
cd3045596e BColumnListView: Optimize check for whether the focus row has moved.
If the new row is not in an open branch, it cannot possibly have
caused the focused row to have moved, and so we need neither check
nor perform an invalidation if that is the case.

This code has been this way since it was originally imported into
Vision's (!) CVS repository in 2001 from some Be sample code area,
and has not been substantially changed since it was imported into
Haiku's repository in 2004.

This saves quite a number of app_server round-trips and redraws
when importing lots of rows to the list, which fixes the other half
of the hang when changing functions in the call stack in Debugger.
2022-08-31 00:13:24 -04:00
Augustin Cavalier
29335bd389 Debugger: Never automatically resize the columns of the ImageFunctions table.
This table will have thousands of items in every branch, most with
extremely long names, so resizing all its columns to the preferred size
takes an unbelievable number of app_server round-trips to measure text.

For modules with any significant usage of C++, there are going to be
functions with names so long that it will make the table quite
unwiedly to work with, anyway, when columns are automatically resized.

This fixes half of the whole-application hang that happens when changing
between functions in the call stack.
2022-08-31 00:08:21 -04:00
Augustin Cavalier
0a48878fba Debugger: Set AUTO_UPDATE_SIZE_LIMITS and adjust default size of Teams window. 2022-08-30 23:00:56 -04:00
Augustin Cavalier
1f34a738be Debugger: Use monospace font in tables that display addresses.
This makes stack traces, registers, variables, etc. so much nicer
and easier to read and work with. Ahh, much better.
2022-08-30 22:43:56 -04:00
Augustin Cavalier
1f72988e61 Debugger: Improve appearance of TeamsWindow insets and spacing.
The buttons are now aligned to the scroll bar and window resize knob,
by using BControlLook::GetScrollBarWidth. (Hmm, perhaps it might make
more sense to just have scrollbar sizes be a kind of insets, which can
be gotten via B_USE_SCROLL_BAR_INSETS, and then drop this extra method
altogether? After all there are a lot of applications which align to
scroll bars...)
2022-08-30 22:28:04 -04:00
Augustin Cavalier
af791479cb Debugger: Initial fixes to TeamsListView for HiDPI.
* Use BControlLook::ComposeIconSize.
 * Use LabelSpacing for row heights.
2022-08-30 22:26:32 -04:00
Augustin Cavalier
861282ffa7 BColumnListView: Dynamic scrollbar size support.
Improves appearance on HiDPI.
2022-08-30 22:14:16 -04:00
Andrew Lindesay
8d18358cdf HaikuDepot: Fix Image Rendering
Resolve an issue with rendering package
icons when "Disable user addons" is
turned off.

Relates to #17862

Change-Id: Ic2d17626c40a97598613b8f21218d6829de97bbf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5556
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jacob Secunda <secundaja@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-08-31 01:16:37 +00:00
Jérôme Duval
8045bb174e kernel/vm: also honor page protections on copy-on-write
this fixes #17895

Change-Id: Ide6cb044cf96213b4bae7eb62235f988b73c0fb1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5601
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-08-30 16:43:41 +00:00
Augustin Cavalier
90d62fd900 TLS.h: Drop inline assembly from the header.
This was a holdover from BeOS, which did this as inline assembly.
We do not on any platform other than 32-bit x86, and even there
we may have preferred to do things a little differently on non-BeOS
ABIs.

Most things ported from other systems, or even native apps, are going to
use _Thread_local variables anyway, which will bypass this system
altogether.
2022-08-30 00:00:04 -04:00
Augustin Cavalier
3b7f223770 ShowImage: Appease GCC2. 2022-08-29 16:59:37 -04:00
Augustin Cavalier
bbee4c3ab6 ShowImage: Do not hardcode the font size of the status view. 2022-08-29 16:10:38 -04:00
Augustin Cavalier
87d8b1776f ShowImage: Use BControlLook::ComposeIconSize.
Also use BBitmap::ImportBits instead of a manual copy, while at it.
2022-08-29 16:08:27 -04:00
Augustin Cavalier
fac73debbf Deskbar: Compute basic metrics earlier, in TBarApp::InitSettings().
This way we know the minimum and maximum window width earlier
and consumers of them do not come up with "0" incorrectly.

Fixes #17890.
2022-08-29 15:55:41 -04:00
Augustin Cavalier
f34e3931e8 Deskbar: Correct sizing and placement of icons in window menus.
Fixes #17891.
2022-08-29 15:36:48 -04:00
Javier Steinaker
4f0d375c54 WebPositive: added shortcut to cycle through tabs like in every other browser
Change-Id: I3cb543948929c20e64c1c8c245a568fb81637a3d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5574
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-08-28 18:49:19 +00:00
Augustin Cavalier
e5f774e848 Tracker: Rework file-panel initialization.
* Get spacing from BControlLook.

 * Initialize and place the buttons before the PoseView,
   so that they can be used to constrain the PoseView's size.

 * Update size limits based on spacing metrics.

Tested against filepanel command, Backgrounds preflet,
and WonderBrush. All seems to still work acceptably, and
now the controls are properly font-size-sensitive.

Fixes #13178.
2022-08-26 23:49:24 -04:00
Augustin Cavalier
34ab706011 StyledEdit: Do not do font->Size() / 12 but rather downscale directly. 2022-08-26 23:01:32 -04:00
Augustin Cavalier
e038086025 BButton: Adjust the spacing and minimum values to use LabelSpacing.
Seems to fix the last part of #16180.
2022-08-26 22:29:29 -04:00
Augustin Cavalier
d56ff162fb Tracker: Adjust metrics of the CountView.
Should look the same at 12pt font but more consistent at higher
font sizes.
2022-08-26 22:04:50 -04:00
Augustin Cavalier
67ca14e889 registrar: Rewrite shutdown dialog to just use a BAlert.
Now that BAlerts can have custom buttons and change icons during
runtime, we need not maintain a custom "clone" of the BAlert logic
here in the registrar.

While at it, use ComposeIconSize to get larger icons on HiDPI.

This fixes #15704 as BAlerts already use the layout API,
while this logic did not.
2022-08-26 21:27:54 -04:00