66406 Commits

Author SHA1 Message Date
Augustin Cavalier
950900a9e8 ramfs: Add static_assert regarding VMCache class size. hrev57972 2024-08-14 18:59:03 -04:00
Augustin Cavalier
c0a12a6b7d ramfs: Properly acquire/release references to the vnode in VMCache.
This is what AcquireStoreRef/ReleaseStoreRef are for. We don't use
VMVnodeCache here because that is a non-"temporary" cache that
writes its pages back to disk, while we need a store for the pages
that won't discard unmodified ones when memory is low.

Add a close() to the mmap_cut_tests, which triggers the case where
this is important (a file is unlinked, mmap'ed, and then the lone
FD referring to it is closed, triggering the file's deletion unless
the mmap also acquired a reference to the vnode.)

Fixes KDLs with Firefox test builds.
2024-08-14 18:36:33 -04:00
Augustin Cavalier
a8877df135 kernel/vm: Add "unmergeable" flag to VMCache.
ramfs needs to create caches that are both temporary and unmergeable,
so add another flag to make this state possible.

Otherwise, mmap'ed files from ramfs might wind up in VMCache
trying to merge the caches when the last one is closed, which
we don't want.
2024-08-14 18:34:02 -04:00
Augustin Cavalier
1f1be52007 runtime_loader: Properly unload libraries whose dependencies fail to load.
If some (but not all) of the dependencies failed to load, they
will be in an inconsistent state (some NEEDED unset/uninitialized, etc.)
In order to neither leak this data nor have it cause problems later,
we should unload actually call unload_library() and thus put_image()
to have the unused/uninitialized dependencies be propery unloaded.

To make this work correctly, adjust unload_library to only call
the exit hooks if the initialization hooks were also called.

Fixes a crash in Firefox startup when some dependencies aren't installed.
hrev57970
2024-08-14 15:45:50 -04:00
calisto-mathias
78c0fc35a7 Find Panel: Implement Folder Filtering
This commit introduces folder filtering to the Find Panel and associated
results window.

--> Features:
	--> Directory Selection: Users can select directories using the
	"Select a Directory..." option, now available in the same menu
	as volume selection.

	--> File Panel Integration: Upon selecting this option, a File
	panel will appear, displaying only folders or symlinks to
	folders for selection.

	--> Folder Filter Management: Selected Folders are shown in the
	same menu, with the corresponding menu item marked. Clicking on
	the menu item removes the folder filter.

	--> Recursive Search: The folder filters are combined using the
	OR method. Results will show items from any selected folder,
	recursively checking all subfolders.

--> Bug Fixes
	--> Resolved an issue with the saving functionality when resetting
	volumes or loading a query.

Change-Id: I8eaab6ad8ebd3de09944a8bcf03f100c451225ae
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7845
Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
hrev57969
2024-08-14 19:19:10 +00:00
Andrew Lindesay
c8dfbad953 HaikuDepot: Show all publishers
Change-Id: Ib59ce631c97568e4625e6921f917aab0fb51733f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8012
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
hrev57968
2024-08-14 17:29:41 +00:00
Humdinger
eea5774f46 HIG: add section on "Recently Used Files"
Change-Id: I6d4190adc8a77ce755435f415b6bd281921990d1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8005
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
hrev57967
2024-08-14 10:49:07 +00:00
Augustin Cavalier
b3a64f5856 BListView: Do not call virtual ScrollTo(BPoint) method in ScrollTo(index).
ScrollTo(index) was introduced only in 82bfaa954dcfd90582fb2c1a0e918971eea57091,
in the implementation of autoscroll-on-drag. But if we call the virtual
methods from here, subclasses might recurse back into us when calling
other methods (MouseMoved() in particular), so in order to avoid
an infinite recursion we have to call ourselves explicitly here.

Fixes a crash on drag in list views in WonderBrush.

Change-Id: Ie7a1bbb75161815bac1f5a800c9ba5830ac43a0f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8014
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: John Scipione <jscipione@gmail.com>
hrev57966
2024-08-14 00:38:40 +00:00
Augustin Cavalier
cb92249c88 kernel/timer: Use lockers in add_timer().
No functional change intended.
hrev57965
2024-08-13 19:20:40 -04:00
Augustin Cavalier
9921f44462 kernel/x86: Clear %edx in syscall handler if the return value isn't 64-bit.
Otherwise, we will leak random kernel values to userland, and
also have incorrect output in strace for anything that doesn't
have a 64-bit return value.

Fixes strace displaying return values on 32-bit x86.

Change-Id: Ibd6304bd989580f64b25f1505a5e02fb928dce84
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8013
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
hrev57964
2024-08-13 21:49:48 +00:00
Augustin Cavalier
a26c33bd97 DefaultBuildProfiles: We now have Python 3.10.
Change-Id: I848dfecf13409e642e642e1538f74debe144f72b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8010
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit fbd5066b1af60dd6566f3beb7486d41706dd1269)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8023
hrev57963
2024-08-13 00:10:46 +00:00
Augustin Cavalier
72be912bae BuildFeatures: Don't specify libtiff SOVERSION.
Let the compiler figure it out.
hrev57962
2024-08-12 16:47:41 -04:00
X512
ebe72d868b build: put each package build entry to separate line, adjust code style
Change-Id: Ib682fc276a08131e69fcdaa2cdba8c22d9e54a1a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8004
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
hrev57961
2024-08-12 20:40:07 +00:00
Augustin Cavalier
427d0b067b HaikuPorts: Synchronize. hrev57960 2024-08-12 16:31:27 -04:00
Augustin Cavalier
380ed24e11 libbsd: Fix kqueue reporting errors when selection fails.
We shouldn't proceed to "wait" if we got errors back from "select",
but should just return the count of errors-reported-as-events
directly, or return the status if we can't report them that way.

Fixes libevent kqueue backend hanging forever on startup.
hrev57959
2024-08-12 15:51:24 -04:00
Augustin Cavalier
a432595dc4 nvme_disk: Don't reallocate the vtophys array if it was too small.
The "(request->Length() / B_PAGE_SIZE) + 2" calculation should suffice
for any physical_entry runs that we can actually use as unbounced I/O,
since all entries except the first and last must start and end on a
page boundary.

Also, use alloca() if the buffer length is small enough.
hrev57958
2024-08-12 14:52:40 -04:00
Humdinger
d9739e69b8 FSUtils: Fix entry_ref of renamed file, locale fixes
FSCreateNewFolder(): Fix entry_ref of renamed file
* If FSMakeOriginalName() renames a file, because the file name
  already exists, FSCreateNewFolder() needs to set the ref to the
  new filename.

* Fix copy-suffix in FSCreateNewFolder(). The space comes before the dash: " -".
  Before, you ended up with "File name-  2"

FSMakeOriginalName(): Make truncation localization aware

* In FSMakeOriginalName() don't hardcode the 4 characters of "copy" when
  determine to truncate an overly long filename.

* Adjust comment in that regard + typo fixes.

* Localize default suffix " copy".

Change-Id: Ica880a8b831b321657f3f2d3825509b7fb9fe72d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7960
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
hrev57957
2024-08-12 18:20:27 +00:00
Máximo Castañeda
978af2370b app_server: avoid duplicate scan of font directories
When scanning a directory for fonts we also include its subdirectories.
Those may already be in the list and may even have been scanned before.
That happens in a typical setup, where the system fonts directory is
obviously included and then a subdirectory is added as part of the
default mappings.

See #18979

Change-Id: I92c6b7965aee030520402e2d53c4190fdca8b0e1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8001
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
hrev57956
2024-08-12 17:26:50 +00:00
John Scipione
6edfc6e012 Tracker: Repopulate menus when entering/leaving volumes
Change-Id: Ifef64abb6ae2865d281b66fd2de7e2b7ba067ca6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8003
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
hrev57955
2024-08-12 16:56:27 +00:00
John Scipione
8717bb87dd Tracker: Enable/disable New Folder/Templates on UpdateMenu()
Fixes #18975

Change-Id: Icbcf4bb95a999bdf7ce0afed2051c2d3cfb59971
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8002
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-12 16:56:27 +00:00
Niklas Poslovski
19289f5b3a Appearance: Make B_MENU_SELECTED_BACKGROUND_COLOR darker in dark theme
Change-Id: Ia9845b45b04f92e6e1e40fa16ef172760d75a664
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7937
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
hrev57954
2024-08-12 16:55:48 +00:00
Augustin Cavalier
8997ebb0a5 kernel/int: Add assertion that interrupts are still disabled after calling handlers.
They should be, but in the case of misbehaving drivers they may not.
Should help with debugging #18982.
hrev57953
2024-08-11 20:02:06 -04:00
PulkoMandy
909af08f43 pkggraph: merge _devel packages with their main package
Makes the graph a bit more reasonable.

Change-Id: Ib1ef182fb0c6c0c88fafe2dd194cae72200d7826
hrev57952
2024-08-11 10:51:39 +02:00
Augustin Cavalier
dad66ad308 OptionalPackages: Re-add perl. hrev57951 2024-08-11 00:05:33 -04:00
Augustin Cavalier
39d510f7dd HaikuPorts/x86_gcc2: Synchronize.
Still TODO: libtiff.
2024-08-10 17:35:12 -04:00
Augustin Cavalier
050c34d5d1 Updates in preparation for package sync on gcc2h. 2024-08-10 17:34:55 -04:00
PulkoMandy
9d62be21bf gnu/sched.h: missing features.h include
Change-Id: I5032dbf08a034df77ab4b436178d08fba2137da5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7974
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
hrev57949
2024-08-10 11:26:53 +00:00
Autocomitter
902479359a Update translations from Pootle hrev57948 2024-08-10 08:18:13 +00:00
Autocomitter
b622b2066e Update translations from Pootle 2024-08-10 08:18:13 +00:00
Autocomitter
4aa39172c0 Update translations from Pootle 2024-08-10 08:18:13 +00:00
Autocomitter
1780e1dc6c Update translations from Pootle 2024-08-10 08:18:12 +00:00
Autocomitter
28f7332345 Update translations from Pootle 2024-08-10 08:18:12 +00:00
Augustin Cavalier
5a09cea418 FAT: Fix type of volumeCluster.
pcbmap takes a u_long.

Fixes #18958.
hrev57947
2024-08-10 00:53:24 -04:00
Augustin Cavalier
7dea48f378 HaikuPorts/x86_64: Synchronize.
Includes OpenSSL 3.0, Python 3.10, and more.
hrev57946
2024-08-09 22:49:52 -04:00
Augustin Cavalier
101769a583 BuildFeatures: Updates for libtiff >= 6.0. 2024-08-09 22:49:51 -04:00
Augustin Cavalier
a79f10b8d1 JPEG2000Translator: Tweaks for usage with the new JasPer version. 2024-08-09 22:49:51 -04:00
PulkoMandy
0ea56347bd Update to OpenSSL 3.
- Rename the package in Jamfiles as appropriate (but don't rename the
  build feature)

- Remove libnetapi SSL class (not needed anymore, OpenSSL now knows how
  to use pthread functions directly and seed its random generator)

- Rename or remove a few other deprecated functions

Change-Id: I624833923e113a8235932d7ce8020bf27c6e2ea6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7717
2024-08-09 22:49:51 -04:00
Augustin Cavalier
3ecbb34240 IORequest: Correct major oversight in finished callback API.
The IORequest internally likes to deal with transferEndOffset
not transferredBytes because of sub-requests potentially being
prepared all at once (in some paths in the I/O scheduler),
thus fTransferSize can get incremented in Advance() before we have
actually executed that transfer.

But external consumers much prefer just knowing transferredBytes
not transferEndOffset. And many of them actually named their
variables that (or "bytesTransferred") and just passed the
transferEndOffset through to variables with that name! That's
obviously wrong, and it's surprising it wasn't discovered before now.

The problem was uncovered by repeated KDLs in PrecacheIO.
That method used the "bytesTransferred" value as a count of
pages transferred, which would then run past the end of the array
if the transfer start offset was not 0 (which the majority
of the time it would be, since this method gets called on
the first mmap() of a file, probably before any pages are read in.)

Most other consumers of this API did not check the value, it seems,
or otherwise had some mitigating factor that prevented it from
causing more problems. An exception is the page code, which
may have spuriously considered writes as successful when they
really weren't.

May fix some of the "invalid concurrent access to page" KDLs.
hrev57945
2024-08-09 18:04:27 -04:00
Augustin Cavalier
4909eb2091 app_server: Move user-path management more into GlobalFontManager.
The Desktop instance is currently a singleton, and by the time it starts
the GlobalFontManager's initial scan is already running, so if we
register the user paths then it will spend a long time waiting for
the lock. GlobalFontManager didn't even use the provided UID,
so just move the add-user-paths logic into the constructor.

This helps with #18669 on systems that have the default fonts set
and no font settings file. (On systems that do, the global font
manager lock will be acquired in desktop settings initialization.)
hrev57944
2024-08-09 17:10:13 -04:00
Augustin Cavalier
382f18110f DebugAnalyzer: Fix scrollbars in the scheduling view.
It's scroll-view-aware.
2024-08-09 17:09:49 -04:00
Augustin Cavalier
27462aa0c7 virtio_net: Received length includes net_hdr length.
This wasn't noticed until now because the IPv4 module would just
truncate packets to their actual length, but the extra data would
appear in packet captures.
hrev57943
2024-08-08 21:16:13 -04:00
Augustin Cavalier
e3e02efb63 device_manager: Only scan busses/scsi in the default case for virtio.
Otherwise we load and unload the SCSI module thousands of times,
which is expensive. It was only added to this section for virtio
in d3b108c53d151d7c0aab32c1562bca355462868b, so avoid scanning
it here except in that case.

Confirmed that virtio_scsi still works as a boot device.

While at it, remove an unused get_attr.

Change-Id: I0882fcb3465809d6bcdd8ed45e66a4dbfe91f7ac
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7965
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
hrev57942
2024-08-09 00:42:25 +00:00
Augustin Cavalier
b134a498f6 kernel/vm: The kernel can transfer any area.
Necessary to get the system profiler to work properly.

Change-Id: Id9c1a0bedaef18680361c5de449d293ff053940c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7964
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-09 00:42:25 +00:00
Augustin Cavalier
686e891cd2 system_profiler: Add a mode for scheduling_recorder -r like profile -r.
And add the necessary logic in scheduling_recorder. This way we can
track scheduling profiling during the boot process.

Also remove B_SYSTEM_PROFILER_IO_SCHEDULING_EVENTS as it can't be
activated this early in the boot process.

Change-Id: If32f9b5d61c8cd2b3b36a4e6f8065301abd46149
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7963
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-09 00:42:25 +00:00
Máximo Castañeda
2ef4221668 Input server: add some mouse settings checks
Workarounds broken settings as in #18973.

Change-Id: I9723cba7fc46ab624da54ebaf3e6e9e1fa547d66
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7962
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
hrev57941
2024-08-08 22:35:46 +00:00
Pascal Abresch
450de6e95f Appearence: Fix control background color in automatic colors dark mode.
Change-Id: I845f65ea811820ef27874d30782100bb5d175419
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7959
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
hrev57940
2024-08-08 20:59:46 +00:00
X512
e2c588b594 build: put each image build target to separate line
It helps to simplify to view difference and apply patches.

No functional changes.

Change-Id: Ia29368eceaeb3306990c09da77c4527eff87c72a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7932
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
hrev57939
2024-08-08 16:21:35 +00:00
Augustin Cavalier
5ee32555f1 freebsd_network: Use the correct buffer length in receive.
Should fix #18966.

Change-Id: I05e35ecbdc4c269501980c18cedfc69d99618ae6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7961
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit 813c5e2fdee3d506a77a7b265a227ef6f68c4ab8)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7976
hrev57938
2024-08-08 16:11:52 +00:00
Augustin Cavalier
a1d79e238e Versioning: Add BETA_5 and PRE_BETA_6 version constants.
* PRE_BETA_6 is now the default in master.
hrev57937
2024-08-08 10:42:41 -04:00
Augustin Cavalier
de1f1b5de5 BColumnListView: Use make_color for GCC2 compatibility. hrev57936 2024-08-07 23:07:12 -04:00