* Break in FlagsTypeHandler once we have cleared all flags.
* Use sizeof(hex) instead of writing out the size again.
* Place comment above variable name in patch_syscalls.
Our std::string is not broken; rather, the bytesRead may include the
terminating NULL byte, which was then added to the string and caused
misbehaviors. So we need to use strnlen with std::string also, and
then everything works as expected.
This way, we save 3 string comparisons on every non-empty return value.
Actually this code was broken before, and did not print error names
for return types other than status_t, because message.return_value
is an unsigned integer and thus "< 0" was always false. Now we cast
appropriately in the new TypeHandler, so this works properly.
Before, pressing Disk->Rescan would keep the previous item selected but
move the keyboard focus to the first element.
Change-Id: Iff99bff64bd67128834a1021dc63f1801ecb4c92
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6264
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
- Ensure that enough space is used for text
- Adjust string in Installer to fix weird wrapping issues
- Make Installer logos smaller
Change-Id: Ibd9cc9a944928263f28a43094b695f1018c30a5f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6187
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
- VNode names are now allowed to have a length of 1. This is
common for Windows drives mounted through a shared filesystem.
- Empty VNode names are now checked from the userland side,
preventing the kernel driver to reject and not ACK a false
B_OK from the userland server.
Change-Id: If0a6fcea1387367d1492c9b94c62c03e381ce1c1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6276
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Caused `open` to display an error with non-zero exit code when the
target application was already running and is single launch. In fact,
the error check at the end explicitly tests for B_ALREADY_RUNNING
along with B_OK.
Change-Id: Ic38c961bcdd8350b97b0d75ec010d25198afd561
From the FreeBSD manual pages:
> If the callout is currently being serviced and cannot be stopped,
> and at the same time a next invocation of the same callout is also
> scheduled, then callout_stop() unschedules the next run and returns
> zero.
Previously we would return zero but not unschedule the next run.
This may fix#18315.
Since we used a hash table with a fixed size (1024), collisions were
obviously inevitable, meaning that while insertions would always be
fast, lookups and deletions would take linear time to search the
linked-list for the area in question. For recently-created areas,
this would be fast; for less-recently-created areas, it would get
slower and slower and slower.
A particularly pathological case was the "mmap/24-1" test from the
Open POSIX Testsuite, which creates millions of areas until it hits
ENOMEM; it then simply exits, at which point it would run for minutes
and minutes in the kernel team deletion routines; how long I don't know,
as I rebooted before it finished.
This change fixes that problem, among others, at the cost of increased
area creation time, by using an AVL tree instead of a hash. For comparison,
mmap'ing 2 million areas with the "24-1" test before this change took
around 0m2.706s of real time, while afterwards it takes about 0m3.118s,
or around a 15% increase (1.152x).
On the other hand, the total test runtime for 2 million areas went from
around 2m11.050s to 0m4.035s, or around a 97% decrease (0.031x); in other
words, with this new code, it is *32 times faster.*
Area insertion will no longer be O(1), however, so the time increase
may go up with the number of areas present on the system; but if it's
only around 3 seconds to create 2 million areas, or about 1.56 us per area,
vs. 1.35 us before, I don't think that's worth worrying about.
My nonscientific "compile HaikuDepot with 2 cores in VM" benchmark
seems to be within the realm of "noise", anyway, with most results
both before and after this change coming in around 47s real time.
Change-Id: I230e17de4f80304d082152af83db8bd5abe7b831
* Remove comment stating DesktopColor is buggy. The documentation has
since been updated clarifying that this is the expected behavior.
* Refactor code.
* No functional changes.
Change-Id: I03711136eb613afb80ad8c03a7f18ba6d15f641c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6256
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
* Clarify what information BWindow::WorkspacesChanged provides
* Clarify when BWindow::WorkspaceActivated is called
Change-Id: Ifcb041bcf67db1ee5c1c514a2b97baa49f8c4dcc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6257
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Obtains HDS's password requirements and displays
those to the user when creating a new account.
Relates to #13986
Change-Id: I1b76181e17bc03e9baf915dadcd3c45f9eb89b3f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6203
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
We need to assign the fallback value to the temporary variable,
otherwise there is a broken if logic in case the percent is not
formattable.
Change-Id: I90593fdf8ec29b802dff02c2fbe5d7ac40cea2ff
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6238
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
In order not to fill up the console with identical strings, show
a count of the repeated lines instead.
When the console is cleared, make sure the repeating line is inserted
by resetting the fPreviousText.
Plus a minor style fix.
Change-Id: I408a24e59a04c9e51d4ede3f272f7ca23a19b432
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6206
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tracker creates folders in
~/config/settings/Tracker/DefaultQueryTemplates with customized
attributes. In particular, each folder has relevant columns already
pre-set. These were being generated and written to disk in the host's
endian, but always written to the big endian attribute name.
This meant that on LE CPUs, Tracker tried to load _trk/columns and
convert it from BE to LE. Sanity checks failed, and each 'converted'
column was deleted, leaving Tracker to install a default set of columns.
The attribute for the host's endian is now automatically used
(_trk/columns for BE, _trk/columns_le for LE).
This fix also exposed that the 'When' column for the text_x-email
template folder was incorrectly typed as a string, instead of time.
Change-Id: I44d5f99d71d949368ff1aba1f48c03332a26d331
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6213
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Change-Id: Ibe8b260a49c1b6e51df06f82b6c3a066c44accb1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6219
Reviewed-by: X512 <danger_mail@list.ru>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Change-Id: Ie4081a3642e5de84865895e81aaa28f090b2c5eb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6216
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Change-Id: Ia16e66a7bdac37019e6256405b9f10024909c69a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6215
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Under "Select Boot Volume" you can also select an older state to
boot into: Rename to "Select Boot Volume/State".
The title on the page to select an older state was "Select Haiku
version". Since every un/install of any software package creates
a "state" it's not actually the "Haiku version" but the overall
state: Rename to "Select package activation state".
Change-Id: Ife9408c52214f6ceeb9994c8b7020cec6d679f54
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5428
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Adding a "Copy" button makes the feature discoverable.
If nothing is selected, copy all items.
Change-Id: I2004ceb621628e01018cc90ec80033b3797c4c02
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6212
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
* Replaces the relavent raw pointers with BReferences
* Fixes one observer not being released
Fixes#12076Fixes#16577
Change-Id: I67b68478911084637e9b474e56066aee7550ffaf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6182
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
This is a workaround to allow early bootup to progress further.
Eventually accessed and modified page flags will need to be implemented
but for now this patch allows to proceed with bringup attempts
for the ARM port.
Change-Id: Icad415a5d484213a76a90ca79bb76463140a8bdf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6197
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
This provides automatic percentage formatting according to the locale
setting.
Change-Id: I9a833fdc4056ac5479d8e4b4feddd0fce06d1fcd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6210
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This restores approximately the old fixed size from before the
previous commit. Ideally this would be the preferred size, not
the minimum size, but that isn't quite possible when contained in
a scroll view.