_CollectCopyInfo uses fBytesToCopy and fItemsToCopy for the sole purpose
of returning the scan results. This variable in turn was used to add to
the amount of files to copy in the progress bar, causing it to grow
exponentially with every CollectTargets calls.
With the current use case, the variable would have to be reset to 0
everytime CollectTargets is invoked, making it rather useless as a class
state.
This commit turns those variables into _CollectCopyInfo return values,
and also fix the exponential growth of the progress bar target.
Fixes#15826
Change-Id: Ib734febfdd8aaaa12fdfac61be124adb61b28f6c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2445
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
At start time, it is possible that the local disk
system is not able to be written to where the
application is trying to store working files. This
change introduces a check at startup that ensures
working files can be written to and warns the user
if this is not the case.
Change-Id: I907bf41a3b4eceb0083119a082fd5e68e4d534c1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2397
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Change-Id: Id43bfcbfc24b1adb8f6e9fff587c6df9b62910f2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2413
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Should constitute a minor performance gain, with no functional change
(the kernel ELF loader does not do any semantic interposition; or
any interposition for that matter.)
Somehow, I missed this when implementing MTX_SPIN in the first place,
and it went largely unnoticed because MTX_SPIN is rarely used and
apparently even more rarely destroyed.
Should fix#15749.
Previous version of the patch was broken by the EFI refactoring.
Change-Id: I6dd125100b22b2461c531bfd8f81b3dd28e2b751
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2409
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Clang message: error: adding 'size_t' (aka 'unsigned long') to a string
does not append to the string
Change-Id: Ice854f584e92917aca6821d5ec2352fc4e38f2f0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2395
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Clang message: error: result of comparison of constant -1 with expression
of type 'direct_driver_state' is always true
Change-Id: I0ae352985a143f1d97b02ca01550480613db6c3e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2394
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Pointed by clang.
Change-Id: I3aaad5b1e03385358ccb729251fa31d35108f389
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2392
Reviewed-by: John Scipione <jscipione@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
area->name is a fixed array inside struct, not pointer, so it should
be never be NULL.
Pointed by clang.
Change-Id: Ic8930450cb8461eef158bc854f214eb47d92ce22
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2391
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
They were theoretically guarded by the controller lock, but it appears
nvme_ns bypassed that, meaning that if ns_read was executed at the
same time as qpair_poll, unpredictable races could occur. This solves
that by making the qpairs guarded by their own mutex, which also
has the advantage of poll() being executable on more than one qpair
at a time.
Seems to fix the KDLs in #15123 (and maybe other NVMe tickets),
though the I/O corruptions remain.
Most of Installer was designed for old-style optional packages (files in
a folder that's copied to the target volume). This commit modifies
Installer so that it can process and install .hpkg packages.
Change-Id: Ib7d69a04ccb7879b956b5c3f0df1241c56e4987d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2400
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Previously this class exposes two methods:
- CopyFile(): only copy the file data, nothing else.
- CopyFolder(): copy files & directories between two folders, while
preserving the attributes as well as symlinks.
With this commit, everything is unified into one method: Copy(). This
method can handle files, directories, symlinks and optionally also copy
attributes. Since most of the logic was just moved around, we can be
rather certain that this won't disrupt CopyEngine behaviors by much.
In the future we should look into using BCopyEngine to replace the
copying part of CopyEngine, as they seems to be compatible.
This change allows the Installer to make use of CopyEngine as a
general-purpose copier, in preparation for optional .hpkg installation
support.
Change-Id: Iad5ba2ebc9f34b7822e550b415308fd2b43eed47
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2399
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
CollectCopyInfo was designed to process directories only. This commit
makes it more versatile and works with everything instead.
Change-Id: Ifa74db3815411f7348e3bcc230842710058b1111
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2398
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
We could overflow the in-memory log. The bounds check was there for BIOS
already but was missing in EFI and openfirmware. Could fix some crashes
when there is lots of loging.
... so that you can click it on the screen edge in vertical mode on
the right side. The BarMenuBar was 1px too narrow and didn't take up
the last pixel of its parent BarView container and therefore wouldn't
open the menu on click on the last pixel.
MenuBar width is increased by 1px in all modes but you probably won't
be able to notice the difference in other modes.
NULL comparison style fix and floorf call to prevent non-integer width
are included.
Fixes#15813
Change-Id: Ic5ebef5a63846a397a55358a111e33987538c455
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2377
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Since the entry_cache operations go through the mount lock,
this may considerably speed up parallel entry cache operations.
Change-Id: Ib2f841e288eb593ee3f795922103459c77764c22
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2362
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
The goal of this documentation is to help people that find code that uses these
classes, understand that the code is outdated and to refer them to the newer
template-based layout builder classes.
Change-Id: I4ba632be989686749181bdbc4e7f8a29adf01a5e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2353
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
- Disable tracing where it's not needed by default
- Convert some drpintf to TRACE statements
- Comment some dprintf out completely in files that don't have a TRACE
macro.
Change-Id: I1f6062bce74bcf1dbf77bf7bccadeeb12a4df46c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2370
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
We should probably make this code more platform-generic, the
implementation is very similar to the EFI one.
Change-Id: I17c9db933bfc2a81c96816dd6348d2d0c9627951
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2369
Reviewed-by: waddlesplash <waddlesplash@gmail.com>