Commit Graph
67742 Commits
Author SHA1 Message Date
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
PulkoMandy caa62d911c Update haikuportscross package definitions to use new version of m4
Change-Id: Ica56fc6787f6f5dd7f5d6aa49b30989df7e0c24c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9156
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-04-07 20:32:24 +00:00
Augustin Cavalier 0bd957f0e9 libroot: Update stubs. 2025-04-07 16:29:47 -04:00
Augustin Cavalier e2b1a054cd libroot: Update stubs for gcc2. 2025-04-07 16:23:49 -04:00
Augustin Cavalier 30cfbaf691 kernel: Move the BSD strto* implementations to kernel/lib from libroot.
The kernel is the only thing that uses them now.
2025-04-07 16:21:39 -04:00
Augustin Cavalier e192187bb2 libroot/glibc: Delete now-unused files. 2025-04-07 16:21:18 -04:00
Augustin Cavalier 7174197a8d libroot/posix: Switch to using musl's string-integer/float conversion routines.
Unlike glibc's, these don't take the current locale into account.
The POSIX specification says: "In other than the C and POSIX locales,
other implementation-defined subject sequences may be accepted."
Not accepting any other than the default seems to be more consistent
regardless.

This also makes things consistent between wchar_t and char, as we
were using the BSD implementations of strto*l for regular chars
but glibc's for wcsto*l before.
2025-04-07 16:20:36 -04:00
Augustin Cavalier e00903da0d libroot/musl: Define restrict in <features.h>.
Needed on GCC2.
2025-04-07 16:17:10 -04:00
Augustin Cavalier 9dcf5c5c88 stdio_ext.h: Add missing declaration for __fseterr.
Follow-up to #19479.
2025-04-07 14:48:23 -04:00
Autocomitter 45196921e5 Update translations from Pootle 2025-04-05 08:08:40 +00:00
Ilmari "ilzu" Siiteri 1cf14a76b2 Wacom input_server device: Support Cintiq13HD
Change-Id: I295e346a1c919b68f7186a06c25d85271bc348f6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9155
Reviewed-by: waddlesplash <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
2025-04-04 15:49:27 +00:00
JackBurton79 8f2748e848 Terminal: Fix uninitialized cursor color.
Especially visible when running as a replicant

(change made by Andrea Anzani)

Change-Id: I11d00e21d35eccad6ba057d5ad2675de878f9c9d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9153
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
2025-04-03 18:40:30 +00:00
PulkoMandy ed280bfcfa mmap: add define for MAP_FILE
This is unused but defined in Darwin, BSD, and Linux.

It allows developers to feel good about specifying that they want to map
a file (which is the default behavior anyway). The value is 0, so
specifying this flag does not have any effect.

This allows to more easily compile code that uses the flag.

Change-Id: I7a880a3090d90b7e8cef5144e82f71beb61147a8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9152
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-04-03 18:39:00 +00:00
Augustin Cavalier 6b246eafbd BString: Add missing NULL checks in _MakeWritable().
Fixes crashes that can happen in out-of-memory conditions.
2025-04-02 14:24:20 -04:00
Augustin Cavalier 2fb23000eb libroot: Call thread exit hooks after __cxa_finalize.
This gives C++ destructors a chance to run before we tear down
the thread locale information (among other things.)

Should fix #19508.
2025-04-02 13:52:50 -04:00
X512 2b5263a0d9 drivers/framebuffer: do not attempt to map whole PCI BAR
Mapping whole PCI bar breaks 3D acceleration drivers that need to map
GPU memory with different caching attibutes, triggering caching
attributes mismatch KDL.

Change-Id: I41eaf56031f7095e259ed4c390c5e3fcdf99bc58
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9149
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-03-31 20:58:37 +00:00
Autocomitter c2aac25319 Update translations from Pootle 2025-03-29 08:07:32 +00:00
Jim906 5650b97673 nfs4: Acquire fFileCacheLock in Inode::Read()
* Prevent file_cache_read() from being called in the middle of
  Inode::RevalidateFileCache().
* Correct an apparent typo in RevalidateFileCache.
* Fixes #16395.

If file_cache_read is called in one thread while RevalidateFileCache
is in progress in another thread, the file_cache_ref could be deleted
while file_cache_read is in progress.

Currently, RevalidateFileCache does not update fChange after it
obtains a new change value from the server.  As a result, for a file
that has been changed at least once since its node was constructed,
RevalidateFileCache will delete and recreate the file cache each time
it is called, instead of returning early as it would if fChange had
been updated the last time it ran.

Change-Id: Ifbf5a892c3003e41b2c73d9c3c806d8fbd79dff7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9147
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-03-28 19:23:51 +00:00
Sylvain78 d67db61955 [netboot] Improvements on boot menu for PXE Boot
-Display "Network" as boot method
-Set the name of the boot volume to 'IP:filename' in case of net boot, "CD-ROM" in case of CD boot method.
-TODO : set a default volume name in TarFS::Volume() ?

Change-Id: Ia44d8f93227be5243af5c210375a635790daf0f7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8523
Tested-by: Commit checker robot <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2025-03-27 17:25:28 +00:00
Jim906 0aaaf60dec nfs4: Allow GetInode to fail for removed nodes
* Stop FileSystem::GetInode from firing an assert when
InodeIdMap::GetFileInfo returns an error code, in the case where the
node has been marked removed.
* Fixes #10409 and #16396.

GetInode is sometimes called on a removed file. For example, when a
directory is deleted in Tracker, after nfs4_remove_dir is called,
nfs4_release_lock, nfs4_close, and nfs4_free_cookie are all called,
each of which use GetInode at a time when GetFileInfo is liable to
fail because InodeIdMap::RemoveName has been called on this InodeIdMap
entry already.

Change-Id: I9ac5ffdc351f131e290574b23ca4a1675b1ec2e5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9144
Reviewed-by: Adrien Destugues <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
2025-03-25 13:59:26 +00:00
Humdinger 02efee2f3a Add Taiwanese flag
Shows up in the Locale preferences.
Add comment that data is sorted by ID in CountryFlags.rdef.
That way it's clear what's the next ID for a new flag, you
just add it with the next ID at the end of the file.

Fixes #19494

Change-Id: I0946730d07c89001331552b5026c0003c298de4a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9140
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2025-03-25 11:57:29 +00:00
Jérôme Duval 893afab7d1 kernel/fs: create_dir should return EEXIST before EROFS
fix #19123

Change-Id: I020ba4fd69a765d3bafa578512ad127384a85e3b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9142
Reviewed-by: Jérôme Duval <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-03-24 21:24:36 +00:00
Chris Roberts 7521af58c4 syslog_daemon: add syslog_max_history option
This driver setting in ~/config/settings/kernel/drivers/kernel allows
setting an arbitrary number of syslog files to keep around.  The
files are now named with a numeric suffix instead of being called
"syslog.old".  The old files are rotated so that syslog.1 is the
newest, then syslog.2, and so on.

Change-Id: I7e3d01caa34680553b161ceb27ab8c3b2eaf508c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9055
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-03-24 21:24:21 +00:00
Jérôme Duval ce6f846b6f Update haiku-current.list, add haiku-r1beta4.list and haiku-r1beta5.list
Change-Id: I00300242e56e50ab312e92057be9113e310af43e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9141
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-03-23 17:26:38 +00:00
X512 c02537f91b BPicture: add missing WriteSetBlendingMode method.
Actual blending mode writing is still disabled for now. According to
previous commit messages it cause problems with BView::Begin/EndLayer
API.

Change-Id: Ib3c58b05a949e556e9f14a57822b20cd259e12d4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8559
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-03-23 10:30:14 +00:00
PulkoMandy eb853f8901 elf.h: add some missing macros
ElfW(x): to automatically use the relevant Elf32 or Elf64 type for the
current system

NT_GNU_BUILD_ID: constant defining the GNU "build ID" note in ELF files.

WebKit uses both of these to store info in javascript object caches, so
it can detect if the same version of WebKit is being used and the cache
can safely be reused, or if it should be reconstructed.

Change-Id: Ia9eccc1acc79ac4982b87609d2815c4a611e4176
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9143
Reviewed-by: nephele nephele <[email protected]>
2025-03-23 10:29:23 +00:00
Autocomitter ade0f7d831 Update translations from Pootle 2025-03-22 08:09:44 +00:00
Augustin Cavalier c6f736315a BSlider: Copy the UpdateText inside UpdateTextChanged.
We can't rely on it not changing between calls, especially as
MaxUpdateTextWidth() changes the value and re-gets it, and
that's called at the end of this method always. So we need to
keep our own copy rather than using the one that's owned by
the subclass.

Fixes a use-after-free uncovered by the guarded heap in VolumeSlider,
reported in #19493.
2025-03-21 11:54:37 -04:00
Augustin Cavalier aa2b9830e1 libroot/glibc: Zero-initialize the mbstate.
May fix #19493.
2025-03-21 11:52:00 -04:00
Jérôme Duval ba4b365101 runtime_loader: resolves to weak symbols for non-gcc2 images
non-gcc2 can hide conflicting symbols, thus resolving to weak symbols
shouldn't be a problem. This permits add-ons to use the static asan
allocator in the main image.

Change-Id: I28bdd45e636afa4e97dc88b0cc956eae58df1009
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9133
Reviewed-by: Adrien Destugues <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-03-21 08:12:50 +00:00