Commit Graph

64866 Commits

Author SHA1 Message Date
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
Adrien Destugues
0849c914a7 xfs: Enable -Werror, fix all warnings
Define a dedicated OnDiskData structure for each on-disk structure. This
must match the on-disk layout, except for endianness, which is handled
by _SwapEndian methods. These structure are "plain old data" so we can
use offsetof on them. They are wrapped in an easier to use C++ API.

This resolves a lot of problems with the previous code: warnings caused
by the use of offsetof as well as a much simpler instanciation of the
objects from on-disk data.

Also fixed another problem with UUIDs, where the UUIDs were handled by
pointers in a lot of place where it was not necessary. Use references
instead. The V4 structures which don't have an UUID will return a "null"
(zero-filled) one.

Change-Id: Ifb2bf6ab94906ca50410dd3446d3566615392ca2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6021
Reviewed-by: Raghav Sharma <raghavself28@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-02-14 15:36:25 +00:00
Augustin Cavalier
66196a82f2 libroot_build: Correct read/write[v] functions.
The previous change was not tested thoroughly enough, it seems.
2023-02-14 01:59:31 -05:00
Augustin Cavalier
5e9fd9f60d libroot_build & fs_shell: Provide _kern_ functions for readv/writev...
..instead of readv_pos/writev_pos. This way, we can be sure that we
are remapping them properly even under Haiku, as well as remove some
potential confusions.

bfs_shell seems to still work fine on a regular build.
2023-02-14 00:49:52 -05:00
Augustin Cavalier
81458ef8a6 kernel/vfs: Remove read sizing hack in common_file_io_vec_pages.
All drivers using IORequest should have any problems here already caught
by it, and overruns in other drivers would overrun the buffer and cause
corruptions, so we should no longer silently be ignoring this,
presuming it is still a problem at all.

As the TODO comment indicated that this logic could also be used for
writes if this wasn't a problem, I have added a separate TODO for that.
2023-02-13 23:12:23 -05:00
Augustin Cavalier
478c8c847d Drivers.h: Rename device_{read|write}_pages back to device_{read|write}v_hook.
They are not about reading and writing pages, but just iovecs.
As the passed iovecs use void*s, it can't possibly be working with
physical pages on 32-bit systems with PAE.

It appears nothing uses or implements these functions anyway,
as there was nothing else in the tree I had to adjust after making
this change...
2023-02-13 23:05:16 -05:00
David Karoly
6b8403b44b libroot/crypt: replace crypt_des implementation with musl's
This is required to make crypt_r() really reentrant.

Change-Id: I81497be16cae21fabb5895a88e27e6c20d3e06e0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6066
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-02-13 19:38:56 +00:00
Máximo Castañeda
46f36ae4e0 app_server FontManager: remove not owned family deletion
On adding a font, we may or not have other faces of the same family, so
we may be trying to add the new face to an already managed family. In
that case, we can't delete it when we get an error inserting the new
style.

This same code was already in place before the user fonts, but it's much
more unlikely to trigger, except maybe on purpose. A later patch
refactoring a bunch of things will join both into the base class.

Fixes #18169

Change-Id: I78053b6e941c18b952fc2bd64f393e26d3d53b0a
2023-02-13 11:49:09 +01:00
Máximo Castañeda
b5c5eec531 app_server: don't return FreeType errors
They don't code Haiku errors and they are positive.

Change-Id: Ibd9da5251117e8883262d8880bad3c88eea6c4a9
2023-02-13 11:49:09 +01:00
Alexander von Gluck IV
1a76488fc8 servers/index: Fix broken CatchUpDone logic; get vs set ptr
* warned about by gcc compiling Haiku under Haiku

Change-Id: I40cd5a2cdaf6a4a346883f6f6060a5a729bc3117
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6064
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-02-13 01:04:05 +00:00