Commit Graph

64825 Commits

Author SHA1 Message Date
Oscar Lesta
805eb54a62 drivers: remove uninit_hardware() from misc/kdl and misc/test
GCC complained of missing prototype for "uninit_hardware()" and,
as -Werror is enabled for these targets, build was broken for them.

While src/system/kernel/device_manager/legacy_drivers.cpp supports
that hook in legacy drivers binaries:

- no header mentions it.
- these two were the only places in-tree that implemented that hook.
- both were basically no-ops.

Change-Id: Ifb08846351b92a2d0fbbe95db2eee0e424ae5997
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6180
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-03-09 18:25:11 +00:00
PulkoMandy
2ab05dc925 docs/develop: a few notes about invalidation, view bitmaps, and overlays
Following some IRC discussions, it seems useful to have this written
down somewhere.

Change-Id: Ic02686948d989bff2fa671a3831ba5aed1515d25
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6085
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-03-09 12:45:34 +00:00
PulkoMandy
53df6323c8 docs/develop: reorganize app_server documentation
Separate the "interface specification" into multiple individual, shorter
pages. Also update some outdated parts and replace references to
OpenBeOS with Haiku.

Change-Id: I86baa9a78c5f7a8a3c4c7aa3ac2992714afecae6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6084
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-03-09 12:45:34 +00:00
David Karoly
b19fa88344 boot/arm64: don't map EFI loader code and data regions
Change-Id: Ic3e83dceb917c84db6baed1f1e4af4a27ece5372
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6177
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2023-03-09 09:39:14 +00:00
David Karoly
e490b6343a kernel/arm64: align interrupt postlude with other architectures
Change-Id: I0a5325f163d2ca99bfdaa35d7addedcfdc16ff9a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6178
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-03-07 20:30:31 +00:00
Zach Dykstra
6d9b21e897 filetypes: support setting icons for directories
The FileTypes Tracker add-on allowed dragging-and-dropping an icon to
any open FileTypes information window, but directories were not
supported. Changing the icon for a directory (either directly, or via a
symlink) now works as expected.

Change-Id: I0c435ed789f79897972469f4e238f19789f8df1f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6116
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-03-06 20:59:40 +00:00
PulkoMandy
0c062f469a docs/develop: add some documentation about our Jam usage
Change-Id: I18c1fd3192468a14205bf192b3d1431397d1cc1d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6086
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-03-04 16:02:36 +00:00
Panagiotis "Ivory" Vasilopoulos
5929c25b71 Installer: Add partition setup instructions
Even if it may seem obvious to experienced users that they have to
click on the 'Set up partitions...' button, this is unfortunately not
always the case. Despite the pop-up that appears if there are no
suitable partitions to install Haiku on, some contradicting
instructions remain on the screen after closing it.

The Installer should also provide some feedback to the user as to
whether they used DriveSetup correctly, instead of inferring it from
the fact that they cannot select any drives after having used
DriveSetup.

For this purpose, the Installer window was made a bit wider.

Change-Id: If561f628e2768a01d85176359f07a187e002f51b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6087
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: humdinger <humdingerb@gmail.com>
2023-03-04 15:56:06 +00:00
Autocomitter
593d482258 Update translations from Pootle 2023-03-04 08:17:29 +00:00
Zach Dykstra
45d7047cca mail: open New E-mail query on notification click
Change-Id: Iaf3fd1c5e8bdc537c67a796fe9aecb1451c825b8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6094
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Automation <automation@haiku-os.org>
2023-03-01 19:40:49 +00:00
Augustin Cavalier
338570d8d6 debug_server: Remove duplicate setting of B_FLOATING_ALL_WINDOW_FEEL. 2023-02-28 22:08:47 -05:00
Augustin Cavalier
4f3a8009e1 debug_server: Make crash prompt appear above all other windows.
With B_MODAL_WINDOW, others can be brought in front. But with
B_MODAL_WINDOW_LOOK plus B_FLOATING_ALL_WINDOW_FEEL, it will
retain its current appearance, but always stay on top of all other
windows.

Since debug_server does not have a Deskbar entry, this will prevent
such windows from getting "lost" and then having to minimize all others
in order to find them (or forgetting about them altogether by accident.)
2023-02-28 20:25:15 -05:00
Augustin Cavalier
8a5fc3866a openbsd_wlan: Synchronize net80211 with OpenBSD. 2023-02-28 20:09:12 -05:00
Augustin Cavalier
dd430c69f2 idualwifi7260 & iaxwifi200: Synchronize with OpenBSD. 2023-02-28 20:07:29 -05:00
Augustin Cavalier
b7cc4167b7 tests: Add missing Jam rule for mmap_cut_tests. 2023-02-28 19:36:26 -05:00
Augustin Cavalier
9ed77019b6 tests: Add mmap_cut_tests.
Tests #17556 and #16936. Loosely based on X512's example program.
2023-02-28 19:35:17 -05:00
Augustin Cavalier
bc35a6e445 kernel/vm: Prohibit offset from being < 0 in mmap.
POSIX seems to be silent about whether this is permitted,
but at least FreeBSD explicitly does not allow it.

Fixes #16936.

Change-Id: If6b23410ae88245e706df77d276234f4775654f9
2023-02-28 19:34:30 -05:00
Augustin Cavalier
0ecd7516de Package Kit: Use an object_cache in kernel mode for decompression buffers.
The kernel heap only uses object caches for objects up to size 8192.
Larger allocations have to go through the raw allocator. That can
get pretty expensive.

Adding instrumentation around the malloc/free calls in this function
showed that on my machine, some 596ms during boot were spent on
*malloc/free alone*, all else aside. After this change, we are at
around 110ms, or a >5x improvement. Running an fgrep -R on /system/
after boot increased the cumulative time in memory functions to over
5 seconds, while after this change it is "only" 1170ms.

Honestly, it seems like the object depots should be able to be faster
than that, even if this function is called thousands of times. But that
is a problem for a different investigation.

It would be even faster for every consumer of this data in
packagefs just allocated one set of buffers up front, or at least
for a single "read session", but plumbing that all the way
through the myriad abstractions of the Package Kit will
not be easy, and is left for another time, as well.
2023-02-28 13:49:00 -05:00
Augustin Cavalier
4e51d4b707 packagefs: Use object_cache_delete instead of calling a destructor manually.
No functional change.
2023-02-28 13:48:53 -05:00
Panagiotis "Ivory" Vasilopoulos
be7386be30 Installer: factorize _SetStatusMessage() calls in _UpdateControls()
Change-Id: I34306c8c13bff0d8d3e7e8841c552fd05fa11d41
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6083
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2023-02-28 15:33:51 +00:00
Augustin Cavalier
ded3731e44 netfs: Include bsd/features.h.
Fixes the build.
2023-02-28 09:49:45 -05:00
Augustin Cavalier
552ac089cf nfs & websearchfs: Drop unused fsproto.h.
Also remove #ifdefs for BeOS.
2023-02-28 09:46:23 -05:00
Augustin Cavalier
79bc16ba6e Rewrite <netdb.h> and drop a lot of non-standard stuff.
While the BSDs and glibc seem to have various _r functions,
they all return int for errors instead of a pointer, making ours
exactly backwards of theirs for error reporting and thus useless.
So, remove them from the header entirely. They are left in
for ABI backwards compatibility for the time being.

A few constants not used by anything in the tree (i.e. not actually
implemented by libnetwork/netresolv) were also dropped. Some deprecated
or non-standard functions were placed behind _DEFAULT_SOURCE or deleted
entirely.

The header itself is now organized approximately as the BSDs do,
although with various Haiku-isms instead of BSD-isms where appropriate.
2023-02-27 22:51:17 -05:00
Augustin Cavalier
9ae547b297 data/network: Use ports & services files from OpenBSD.
This cuts out a lot of unnecessary protocol entires found in the
longer NetBSD (and originally from ISC) lists. This data is used
in the implementation of getservent(), etc.
2023-02-27 22:01:12 -05:00
Augustin Cavalier
6d36f6bfad netdb: Drop definitions for getipnodeby...
We do not actually export them, or even have source for them in-tree.
2023-02-27 21:11:49 -05:00
PulkoMandy
dd8d24ee62 build: remove most of MathRules.
We shouldn't be doing these crazy things.

The only usage of this is the NextID rule which computes an unique
number by incrementing a variable. This is used for example to generate
names for the extra files used in xattr emulation.

But we certainly don't need multiplication, division, etc. That's better
done in scripts (Python, for example) in rule actions. So keep just
enough of this for NextID to work, and we could probably make it even
simpler.

Change-Id: Id06d4f5e236205203fe8d604de440753b63801bc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6088
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-02-26 00:54:53 +00:00
Máximo Castañeda
e70df3f778 app_server: AppFontManager does not need a BLooper
Saves at least a thread and a few semaphores per app.

Change-Id: Ied43e5944471918b34b897722346a25d159090df
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6073
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-02-25 11:34:57 +00:00
Máximo Castañeda
6ae6a38e53 app_server: refactor font managers
Move common add/remove code to the base class and improve encapsulation.
Loading FreeType is the responsibility of the global font manager.
Rename FontManagerBase back to FontManager.

Change-Id: I9396112f01583e19d03011106fd1fa1e37958ee8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6072
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-02-25 11:34:46 +00:00
Máximo Castañeda
76b2fd5bed app_server: include the manager in the font cache key
App-loaded fonts get the same IDs for different apps, so the cache
entries can be easily overwritten or used for an unexpected font. The
FontManager adds a unique chunk to the string.

Change-Id: I67ea9971784f425370d1aad516af4dae8489c45b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6071
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-02-25 11:34:46 +00:00
Autocomitter
f369023834 Update translations from Pootle 2023-02-25 08:18:28 +00:00
Augustin Cavalier
08f748dea7 Deskbar: Remove B_TRANSLATE_SYSTEM_NAME and leave a comment as to why.
Fixes #18206. Related to #18251; a better way to accomplish finding
views without scripting should be added, really.
2023-02-24 11:38:20 -05:00
Augustin Cavalier
36e200e2e0 sys/uio: Add preadv/pwritev.
Fixes #18243.

Change-Id: Ib5867f86100430f5e5c43ce4b2d6d561f546cc1e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6068
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-02-24 16:31:51 +00:00
Jim906
429e730135 mount_server: remember read-only attribute
* Record the read-only status of a partition in settings/mount_server
  so it will be applied if automatically mounting on next boot.
* Fixes #18081.

Change-Id: Idd7267fd356f35689bb6ad79de4a45bf071164f1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6080
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-02-24 15:59:15 +00:00
Alexander von Gluck IV
8eb9f41407 data: Drop ARM FDT dts from repo
* We depend on FDT passed to the bootloader now
  from EFI or u-boot via fdt_addr_r now
* We leave an fdt path within the boot partition
  (for now) to allow / encourage users to optionally
  plug in their own DTB's for troubleshooting. (only
  on u-boot loader)

Change-Id: I3f2d81b60d46f388f333d5caa27aa77e6e36447d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6081
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: X512 <danger_mail@list.ru>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Tested-by: Automation <automation@haiku-os.org>
2023-02-23 18:24:21 +00:00
Augustin Cavalier
4c442eb0b8 remote_disk: Fix B_GET[_BIOS]_GEOMETRY ioctls.
They were incorrectly modified in	688acf41a3.

Fixes #18277.
2023-02-22 16:13:21 -05:00
PulkoMandy
5f88744263 BMenuField: allow to use non-fixed size in combination with layout mode
In fixed size mode, the menu field always uses all the available width.
In non-fixed size mode, the menu field will resize itself to be as small
as possible.

With layout, usually the difference isn't noticeable, since the layout
will already try to resize the control to the smallest possible size.
But there are a few cases where it makes a difference, when the layout
is over-constrained and the menu field can't be made as small as
possible. In that case, the menu field would be forced to fill its
allocated space, where we can instead make it a little smaller.

Change-Id: I911d497218a09aab3824865968558df5d4b3cf98
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6076
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: John Scipione <jscipione@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-02-21 10:47:46 +00:00
Pascal Abresch
40a7fe3f68 Api docs: style search
Change-Id: I11cf0ae20ff7fc34dd2facaba462f5851efea050
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6078
Reviewed-by: nephele <nep@packageloss.eu>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-02-21 10:47:03 +00:00
PulkoMandy
fc2f1a3247 BMenuField: remove deprecated constructors
These were introduced by mistake during the addition of the layout
system. They have been private since 2011. It seems safe to assume that
nothing uses them anymore and they can now be removed safely.

Change-Id: I98d030096f9cb06fccc25233fe4da17d0213050e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6075
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-02-18 17:20:27 +00:00
PulkoMandy
3cc1da2b77 BControl: fix big-endian bitmap handling for control icons
The code is endian-dependant because the alpha channel is not at the
same place. This resulted in transparent white in icons being converted
to partially transparent yellow when attempting to darken the icons, for
example.

Change-Id: I57916139ba37b8d7ae0f9e9ba9e74c1d496d7b05
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6077
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-02-18 17:16:14 +00:00
Augustin Cavalier
dc509bfab4 fs_shell: Use proper readv/writev functions on Haiku hosts.
Fixes #18269.
2023-02-18 11:38:48 -05:00
Pascal Abresch
9a91a72662 Api docs: dark mode
Change-Id: I46538353f38902b58937286a9e32167424fc7d0e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6074
Reviewed-by: nephele <nep@packageloss.eu>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-02-18 16:08:12 +00:00
Autocomitter
98a5975248 Update translations from Pootle 2023-02-18 08:15:53 +00:00
Augustin Cavalier
050515f6ae BFS: Fix missing trim of last range in a corner case.
The previous logic of _AddTrim plus _TrimNext meant that if a trim
range was specified in the final call to _TrimNext (i.e. with force=true),
but the trim buffer was already full at that point, that last range
would not actually be trimmed.

Now, _AddTrim returns true when the buffer is filled and trimming
should be done, rather than delaying it and requiring a second
add after trimming.

Change-Id: I4b782948e8dc9267c63e61bce0c078fd4e834177
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6070
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-02-17 20:21:24 +00:00
vaibhavg20comp
ba9ce9c13b termios: Added cfsetspeed function.
BSD extension to set both the input and output speed of a termios
structure.

Fixes #18220.

Change-Id: I8c4a06b4be4aa55b8ce35cb7f62552fc47a8e8d0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6049
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2023-02-17 16:16:39 +00:00
Jérôme Duval
8aadf2e84a setvolume: implement some common features
unmute when increasing volume, mute at the minimum volume, don't decrease volume when muted

Change-Id: Ifd671b2a8d7d8a4da2bc15adc18f9aa7c46e66d2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6017
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-02-16 11:40:17 +00:00
Augustin Cavalier
c97648aad1 docs/user: Use Doxygen's internal search system.
Fixes #17209.
2023-02-15 16:49:45 -05:00
Augustin Cavalier
f7b2278e28 docs/user: Update Doxyfile to Doxygen 1.9.6.
Automated conversion via "doxygen -u". No changes to settings otherwise.
2023-02-15 16:45:53 -05:00
Augustin Cavalier
06cf64e90c fstrim: Pretty-print the trimmed size in addition to showing raw byte counts.
Also do not bother printing sizes if we are exiting without success
and nothing was reported as trimmed.
2023-02-15 16:11:35 -05:00
Augustin Cavalier
1572bf59b7 nvme_disk: Use the correct length value in the total-trimmed calculation.
We want to return the total trimmed size in bytes, not blocks.
Fixes incorrect trim size reporting under NVMe devices.
2023-02-15 15:30:24 -05:00
David Karoly
1831c1c60d libroot/crypt: remove selectsmix
There's only one implementation of smix so we don't
need any selection logic.

Change-Id: Id43e4ed49ee5a96755c3c4ab975bd128024e57b0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6065
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-02-14 20:32:20 +00:00