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>
In the boot menu, tab cycles between the menu items.
In the pager for logs, j and k allow to scroll the log (vim style keys).
These allow using the pager and menu on Sun machines, where Openboot
does not manage the keyboard arrow keys. It may be possible to get more
low-level input from the keyboard openboot device, but I think it is not
worth the effort for now, especially as we would need different handling
for the local keyboard and for serial ports.
Change-Id: I5fe74eb9f7a952ae49ae3c8a6bfae6ba4a16ae07
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2368
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
If I understand the openboot specification correctly, we should not call
the forth words directly. Instead, we should rely on the
terminal-emulator package to parse ANSI escape sequences and manage the
display for us.
Unfortunately, the ANSI parser is very limited, many sequences don't
work, including the ones for colors. But we can at least have inverse
video, which is good enough to let the menu show.
I think the PowerPC console can be modified to use the same code, at
least partially. So for now I'm keeping this code in a cross-plaform
file.
Change-Id: Ie77b9ddcc18acb735c0d77cb574e28fbabd266e6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1989
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This protects against malicious programs trying to steal/overwrite
kernel memory by overflowing user buffers.
Note that this constitutes a behavioral change to user_strlcpy:
previously, address overflows on the "source" side would either
copy less data, or copy some data and fail anyway. Now, address
overflows on either side will always fail before any data is
copied at all.
Change-Id: I01d8b22672ab3758a9dd87b521af6fedd0487417
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2361
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Activating all these packages on live boot (especially live DVD where we
also have the write overlay eating up RAM) significantly increases
memory requirements for running Haiku, to the point that Installer may
fail to run. Move them outside the packages/ directory so they are not
activated.
Installer already skips the _sources_ directory when installing, and
lists the contents of _packages_ with checkbox to decide what to include
in the install (they are put in system/packages on the target disk).
Fix from previous version: the Haiku package was installed to /system
instead of /system/packages.
Fixes#15621.
This header was not included when Haiku is built with KDEBUG_LEVEL=0,
causing build failures.
Change-Id: I690064f7c1a9818056a394e2655811775c4cc554
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2360
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Re-offset red_error, green_error and blue_error when deleted,
since they are offseted at line 99, 109 and 120
after they are allocated.
Pointed out by Clang Static Analyzer
Change-Id: Ic12a754dff7049fc4fbfd25ababafd8243db6baa
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2354
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
The dma-alloc method is in the parent node (the PCI bus), not directly
in the network device.
Change-Id: I18f6a9333f3afa78033042e75a86b00872515f2c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2359
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Sending packets from 0.0.0.0 doesn't work quite right, so better admit
we failed.
Change-Id: Iddece4a7269abbdd8e93f0cbbc9a9e43fcbe8a69
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2358
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Of course Sun and Apple didn't put it at the same place...
Change-Id: I974caff7335bb25a0e8dd4f7da8bdb9a737d011e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2357
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
It is used only in the TCP loader to initialize a random TCP source port.
Since the RTC device does not exist on sparc, this is not portable. A
simple solution is to use a non-random source port, maybe based on the
powercycle count or something like that. For now, I don't need the TCP
loader, so I'll just disable this.
Change-Id: I6e279a77bb90a8b8b989f06dd9fb256156f71635
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1988
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
The address-size property is missing, but we don't really need it.
Change-Id: Iff3de89c811d16a263eadf796a0e6eb157dbe18b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2356
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Apparently it worked by luck only on the Ultra60. Physical addresses for
openfirmware are on two cells (128 bits!) and we were passing only one
cell, of course this wouldn't go well. On the Ultra5 it ended up having
the heap point to unused space besides the RAM, so it was mostly reading
random data from there.
Change-Id: I4f9010013fe91a582e5daa83e6bf458703adba2b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2350
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
The position is on 2 cells even on 64bit systems.
Change-Id: I97f4e3fc02734c548ed23445a917a894ff548379
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2351
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Activating all these packages on live boot (especially live DVD where we
also have the write overlay eating up RAM) significantly increases
memory requirements for running Haiku, to the point that Installer may
fail to run. Move them outside the packages/ directory so they are not
activated.
Installer already skips the _sources_ directory when installing, and
lists the contents of _packages_ with checkbox to decide what to include
in the install (they are put in system/packages on the target disk).
Fixes#15621.
Change-Id: Ibfac14c43dbe708316a0d82ca1c9d49b5cba2aef
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2157
Reviewed-by: Sergei Reznikov <diver@gelios.net>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>