ACPI sometimes print a single message line using several calls to
its printf function. We directly map it to dprintf, which causes two problems:
- In the syslog, each call to dprintf is prefixed with 'KERN:'. So,
several 'KERN:' were added in the middle of such messages.
- The successive calls to dprintf may be intertwined with logs from
other places, making it difficult to see what message came from where.
To avoid these problems, store data in a buffer until we have a complete
line, and only then send it to dprintf. The resulting syslog is much
easier to read then.
Change-Id: I745e50b6fbbc3c875716fb68951d8d47312f96f6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6896
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
These were upstreamed in https://github.com/acpica/acpica/pull/918
Unfortunately the last release of ACPICA is just before merging these
changes.
Change-Id: Ib183235d9197bed0a421eec9adfa68c1a13c6bf4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7999
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
This change fixes the console on PowerPC machines
Change-Id: I3fdf3fb37e5358e828195803b21153a506e6c7e7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8040
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* Remove some unnecessary casts.
* Clean up linked-list logic in add_event_to_list(). As previous->next
will just be the same as "next", we can use that directly and thus
remove some code duplication.
No functional change intended.
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.
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.
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.
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>
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>
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>
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.
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.
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>
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>
- 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
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.
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.)