Commit Graph
67771 Commits
Author SHA1 Message Date
Autocomitter ce9a033cd8 Update translations from Pootle 2025-04-26 08:09:04 +00:00
Augustin Cavalier 28780cdca1 Tracker: Remember whether addons have certain hooks or not.
If they don't, then we don't want to keep trying to load them
every time we'd want to call the hook (e.g. in rebuilding the
addons menus, which happens every time an item selection changes
to match the mimetype list.)
2025-04-25 16:51:04 -04:00
Augustin Cavalier c057fc38b1 Tracker: Cache add-on-supported mimetypes rather than reloading them each time.
We have to rebuild the addons menu every time a file selection changes,
so avoid repeated reads/deserialization unnecessarily.

Rename the "AddOnShortcut" structure to "AddOnInfo" as it contains
more than just shortcut information now.
2025-04-25 16:35:22 -04:00
Augustin Cavalier ea903017d9 Tracker: Only rescan templates if we don't know of any.
Otherwise we rebuild this menu very often.

This change means that alterations to Tracker templates will not
get picked up by already-open windows. If that is an issue (templates
are rarely modified), then we'll have to add node monitoring
to only rebuild this list when actually necessary.
2025-04-25 15:52:28 -04:00
Augustin Cavalier 01b71d945e BWindow: Clean up dispatch of NO_COMMAND_KEY shortcuts.
Only search once for a shortcut exactly matching the current
modifiers, i.e. whether with or without COMMAND_KEY.

Also clarify some of the comments and logic.
2025-04-25 14:51:29 -04:00
Augustin Cavalier 023f509399 Tracker: Don't rebuild root add-on menus in MenusBeginning().
Instead, only do it when we get a message from the BDeskWindow
after it modifies the fAddOnsList. (The add-ons context menu
may still get rebuilt in MenusBeginning(), though, depending
on mime type; likely that should use the AddDynamicItems()
hook to avoid being rebuilt so often.)
2025-04-25 14:29:37 -04:00
Augustin Cavalier 0edaf61502 Tracker: Fix leak of addon menu items.
Every time the main menu was rebuilt, we leaked the "secondary"
add-on items, which included some FDs. Now, we just skip
creating addon items altogether if we're not going to insert them.

(BuildAddOnMenus() had logic to insert items, but this seems to
have been dead code, because "primary" would always be false,
so the primaryList would never have any items in it.)

Should fix #19506 and related problems.
2025-04-25 13:52:21 -04:00
Augustin Cavalier 938a264d4d libroot/glibc: Add missing include and definitions for popen().
Fixes its behavior after the upgrade.
2025-04-25 12:18:26 -04:00
Augustin Cavalier 84800fee35 libroot/glibc: Drop two more unneeded files. 2025-04-25 12:18:05 -04:00
Humdinger 6f8e4bb335 Sounds: Check all B_*_SOUNDS_DIRECTORY for default folder
There's no B_*_SOUNDS_DIRECTORY unless a package creates
it. Check all locations (B_FIND_PATH_SOUNDS_DIRECTORY)
and set the first found as default folder for the file
dialog.
If none are found filepanels default to B_USER_DIRECTORY.

Change-Id: I26d063ba46f8c3bd83df68677b86751e1dd7c6cb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8957
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
2025-04-25 15:03:04 +00:00
Augustin Cavalier e1936f52eb libroot/glibc: Synchronize libio with upstream glibc 2.20.
Includes changes/adjustments for integration with Haiku's libroot
as well as C89 fixes for GCC2 compatibility. Also imports one
patch from glibc trunk to fix ungetc+fflush behavior.

Fixes #19039, follows up #19479.

Change-Id: I73ebde80d314460174d344ba1e2960807ad4717b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9160
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-04-24 16:23:25 +00:00
Augustin Cavalier e98aafa2cf input: Handle EINTR properly in the HID layer and input_server.
* Make EINTR (B_INTERRUPTED) always mean "interrupted system call",
   not "interrupted transfer". Use B_BUSY for that instead.

 * Drop B_CANCELED, return EBADF (B_FILE_ERROR) for those cases instead.

 * Handle B_INTERRUPTED properly in userland ioctl calls.

Should fix #19542.
2025-04-24 12:07:03 -04:00
Augustin Cavalier 50a7196463 bootloader: Fix setting initial colors. 2025-04-22 17:29:41 -04:00
Augustin Cavalier e9bfa37d95 bootloader: Return error in open() if we have no root node.
Fixes trying to use the VFS before it's initialized causing crashes.
Also fix indentation.
2025-04-22 17:05:39 -04:00
Augustin Cavalier 49402dc6af bootloader: Avoid use of the heap for the video_text_console.
We can only ever have one active at a time anyway.
2025-04-22 17:04:57 -04:00
Augustin Cavalier 1eb7df957e bootloader: Fix build of the video_text_console.
There's a different "big" font for the frame_buffer_console now.
2025-04-22 17:03:38 -04:00
Jérôme Duval bfce786a2e nvme: actually pass parameters to nvme_admin_set_feature()
align len parameter type
noticed by waddlesplash, thanks!

Change-Id: I3d9352f253ca0fc3f2be5966e10a354f3f47ef4b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9199
Reviewed-by: waddlesplash <[email protected]>
2025-04-22 20:55:36 +00:00
Augustin Cavalier 10eea8dfae kernel/debug: Fix handling of sInvokeCommandLevel.
* Check for overflows in invoke_debugger_command.

 * Reset it inside invoke_debugger_command always.
   It wasn't reset in the case of INVOKE_COMMAND_FAULT, meaning
   we would "leak" command levels, thus leading to crashes
   and other problems inside the kernel debugger.

Fixes recursive KDLs or even triple faults caused by faulting
commands and pipes inside the kernel debugger.
2025-04-22 15:41:14 -04:00
Augustin Cavalier 6259a27b72 kernel/x86: Invoke debug_double_fault on x86_64.
Previously we just went through x86_fatal_exception to get to KDL,
now we will invoke the double-fault-specific method (which doesn't
print a backtrace by default), and also use the double-fault-specific
method to determine the current CPU.
2025-04-22 15:14:04 -04:00
Augustin Cavalier f1c5aa3287 nvme_disk: Reduce stack usage in nvme_disk_init_device.
Between the ctrlr_stat and ctrlr_data, it was using over 8KB of stack.
Now it's using only a few hundred bytes.

Fixes a stack overflow on 32-bit x86, which caused #19523.
2025-04-22 14:44:44 -04:00
Augustin Cavalier 5cd02cf1e8 kernel/x86: Add more safety checks around x86_double_fault_get_cpu.
We should try to avoid triple-faulting inside double-fault handlers
at all costs, so add extra safety checks in here.
2025-04-22 14:43:03 -04:00
Augustin Cavalier dcc19cb937 kernel/x86: Fix double-fault GS on 32-bit.
This is the same value used lower down outside the double fault stacks.

Fixes KDL in double faults (previously it would cause another fault
trying to read the current thread from TLS.)
2025-04-22 14:41:56 -04:00
Augustin Cavalier e249d5a241 HaikuBootstrap: Add missing PCI modules. 2025-04-22 14:40:49 -04:00
Augustin Cavalier 09af690ea4 HID: Handle report waiting interruptions properly.
B_INTERRUPTED is already used by the report processing code,
instead return B_CANCELED and handle this specially.

Fixes #19530.
2025-04-22 12:34:47 -04:00
Trung Nguyen 1e1ad7efc9 runtime_loader: dladdr for commpage symbols
In `get_nearest_symbol_at_address`, the `runtime_loader` function
behind `dladdr`, add an additional check if `address` is in the
`commpage` range.

If it is, try to enumerate the `commpage` symbols using
`_kern_read_kernel_image_symbols`.

Change-Id: Ic19f3e980765c83262e108f282f59af6bcefb620
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9164
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-04-22 15:31:45 +00:00
captain0xff fcdf08d1f3 radeon_hd: Added more Polaris10 GPUs and corrected the DCE value
* Updated the deviceName to include RX 570, 580 and 590
* Rectified the DCE values for Polaris and Vega according to https://docs.kernel.org/6.14/gpu/amdgpu/driver-misc.html

Change-Id: I2d7ee489279efc90bd1d4fd94db28443569285e0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9062
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-04-22 12:51:42 +00:00
JackBurton79 65ed72e669 Terminal: show a different cursor when window isn't active or view is unfocused
"empty" cursor when unfocused, "filled" when focused, similar to what other terminals do in other platforms

Change-Id: I7ccafaacab8cfb63d8e556ca3ee76335ebb0cf0e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9165
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: nephele nephele <[email protected]>
2025-04-22 12:50:55 +00:00
Humdinger 87f30d6791 Launchbox: translate error message
Fixes #19535

Change-Id: I801b71b09e6d231d4ca1d9142e528dd9f401f59c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9198
Reviewed-by: Jérôme Duval <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
2025-04-21 18:58:55 +00:00
Joachim Mairböck fd9622c608 fenv.h: change guard symbol for extension functions to _DEFAULT_SOURCE
This way, they are available by default when not using a strict
language standard version.

The change is applied to all architectures (except m68k, which doesn't
define them at all).

Fixes #19534

Change-Id: I71238919e50518abaa65fa20365c912a577e3455
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9196
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
2025-04-21 18:56:47 +00:00
Jérôme Duval d6547c7f81 kernel & libbsd.so: add getloadavg() and _user_get_loadavg()
the algorithm and reference values are from FreeBSD.

Change-Id: Ia74a796e13adce6a70434c7546c25ca3d553f11f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9150
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-04-21 18:43:29 +00:00
Autocomitter 14aded56ee Update translations from Pootle 2025-04-19 08:09:19 +00:00
Joachim Mairböck 648fa5897c listusb: align the port status output of hub descriptors
Make the padding between key and value shorter for ports with multi-digit index
so that the values are properly aligned.

Add missing space before the dots of the padding where it was missing.

Change-Id: I427726525202b07a155dcb5879820003d2b20946
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9166
Reviewed-by: waddlesplash <[email protected]>
2025-04-14 19:52:05 +00:00
waddlesplash 14d9cf7417 Revert "bus_managers/pci: allow x86 systems to use VirtualBusMap"
This reverts commit 150e1c88e2.

Breaks interrupts on VMware and elsewhere, it seems (see #19517.)

Change-Id: I487de651d226e769f0ad5b07974a1c5079ad1714
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9176
Reviewed-by: waddlesplash <[email protected]>
2025-04-14 16:32:38 +00:00
Trung Nguyen 8da9c85cbf runtime_loader: Add support for RTLD_NOLOAD
Add support for using `RTLD_NOLOAD` with `dlopen` on Haiku.

While not specified in POSIX, this option is widely available (both
GNU/Linux and BSD) and is the only way to atomically check if a shared
object has been loaded.

Change-Id: I061332307d76c84f6a2abb6f92c4ed964bd90a1e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9161
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
2025-04-14 16:31:59 +00:00
Autocomitter a1e94e45fc Update translations from Pootle 2025-04-12 08:07:28 +00:00
Trung Nguyen bccc34802a libroot: Annotate x86_64 syscall wrappers
Add `.cfi_startproc` and `.cfi_endproc` to syscall wrappers.

This allows `_kern_*` functions to appear in the `.eh_frame` section,
helping tools like `libunwind` to step through system calls.

Change-Id: Ib64411bfd2094e81040c94ca9f99d811fe5b865d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9162
Reviewed-by: waddlesplash <[email protected]>
2025-04-11 17:29:40 +00:00
Augustin Cavalier e6cd789248 libroot/malloc: Better handling of fragmented frees in PagesAllocator.
* Immediately free chunks that are from areas below a size threshold
   and which cover the whole area, or are in that area's head or tail.

 * Avoid unmapping just-freed chunks and any in the last area,
   if we can, while releasing memory. This should force smaller
   or not-needed chunks out of the caches more rapidly.

 * Drop the "single page cache clear" logic, as it isn't needed now;
   the "immediately free small areas" logic takes care of the same case
   in a more general way than for single pages.

Running a query for all files in Tracker, letting memory usage go
up to 200+MB, and then closing the query results window seemed to
test this logic pretty well. area_for+get_area_info were invoked
without a subsequent unmap ~12,000 times, vs. around ~3,600 that
the unmap path was taken. Other cases (web browsers) have lower
counts than that, at least in any given short window, from the
(admittedly brief) testing I did.

Hopefully will help with the huge amounts of areas seen in #19514.
2025-04-10 18:38:16 -04:00
Augustin Cavalier 5f8c94242b SplayTree: Add PreviousDontSplay to IteratableSplayTree. 2025-04-10 17:59:13 -04:00
Augustin Cavalier d45f85d19f libroot/musl: Use the correct toread and uflow for shgetc.
Should fix crashes with Python after the merge of the new wcstol.
2025-04-10 09:58:04 -04:00
Oscar Lesta 2dadc7bc29 StyledEdit: disallow most "control chars".
We still need/want TAB and ENTER.

Stuff like CTRL+{a,d,h,i,j,k,l} continues to function just as before (AFAICS).

Change-Id: I46151e70c61ef2b941bed4e2ee54ef198400ae53
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8966
Reviewed-by: John Scipione <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2025-04-10 11:00:09 +00:00
Chris Roberts 9c84d9aaeb mimedb: add flattened BMessage type
Change-Id: I3e4697a5398e1ea0e074b0bdf78cd004243417a2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9050
Reviewed-by: nephele nephele <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2025-04-10 10:59:19 +00:00
kuku929 150e1c88e2 bus_managers/pci: allow x86 systems to use VirtualBusMap
removed a preprocessor check that disables the use of multiple
pci domains on x86 systems when there is no need to do so.

Change-Id: I6b6bfc990af129ac4fb2ee56ecdec5b81399627e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9077
Tested-by: Commit checker robot <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2025-04-10 10:57:43 +00:00
Adrien Destugues 58a2e36857 WebPositive: style fixes after previous commit. 2025-04-09 13:21:54 +02:00
Ilmari "ilzu" Siiteri e3a893afd8 Web+: Rework startup session code
* Loads previous session if lauched by link and setting to use previous
  session is enabled
* Fixes #18722
* Adds window workspaces to archive message
* Adds opening session windows to same workspace it was previously
  (could be made optional)

Change-Id: I8c56516fa8770011346989a59e8ecd22440eef36
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8859
Reviewed-by: nephele nephele <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2025-04-09 11:19:53 +00:00
JackBurton79 197dcc80dc Terminal: added ability to execute a command using scripting
Add a B_EXECUTE_PROPERTY to execute a given command.

Also set fAttached to false in _DetachShell() for symmetry.

Done by Andrea Anzani plus some style / refactoring by myself
Change-Id: Ifa26b60b1c1d3598a863adc4fb701155f9edf588
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9154
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-04-09 11:19:17 +00:00
zeldakatze ace1f642d0 PPCVMTranslationMapClassic: Update UnmapPage to new syntax and fix a type warning
I'm not sure if all the parameters for UnmapPage are correct, however it
should run like before and it likely has to be checked at a later point in
time anyways.

Also, gcc made a warning about a type mismatch for a placeholder, so I
changed that aswell

Change-Id: Ib6568c5edc3a1729f0508ed356c39faa9941f152
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9159
Reviewed-by: waddlesplash <[email protected]>
2025-04-08 14:26:36 +00:00
Adrien Destugues 6cb7acc3e9 docs/develop: Fix Doxygen build after previous commit 2025-04-08 12:55:29 +02:00
Adrien Destugues 2e9c9b0173 docs/develop: Fix some internal links in package documentation.
Use references as documented in https://www.sphinx-doc.org/en/master/usage/referencing.html#ref-role

Fixes #19509
2025-04-08 12:51:20 +02:00
PulkoMandy c11bec8ef0 docs/develop: update bootstraping documentation
Add a section about various known problems and be more clear that this
is still unfortunately quite not well tested and experimental.

Change-Id: If8f83682e03f23097edd00a855423febaaff43ce
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9157
Reviewed-by: waddlesplash <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
2025-04-07 21:33:30 +00:00
Emir SARI cf961dc707 DecimalSpinner: Use BNumberFormat for formatting
Change-Id: Idb45e98a61a0f16893e20aa02b10d7b2e1705454
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7589
Reviewed-by: Emir SARI <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2025-04-07 21:30:48 +00:00