Commit Graph

61203 Commits

Author SHA1 Message Date
Jérôme Duval
08bc0cc9ca device_manager: add find_child_node
to find a node in the hierarchy.

Change-Id: Iee858f21ce134569bf25fccbef9fe18ea8787e9d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2419
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-04-10 11:25:39 +00:00
X512
f4fce2fd2e HttpRequest: use off_t for reply content size
Fixes #15850.

Change-Id: Ic5d64ecba92306cbe798c94ac8e4a7626125e09b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2464
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-04-08 14:16:46 +00:00
CodeforEvolution
d12bb8b148 Fixup Tracker Icon
The last time I checked, dogs don't have the power of telekinesis. :)
Primarily changed the Tracker icon in all places to have the Tracker
mascot hold the window in its mouth (like in BeOS), rather than the
window just levitating in front of the dog.

Change-Id: Ic60d3b0cb47e5995a639b494bf63af9ca21ef7d7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2408
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-04-08 14:13:53 +00:00
navinbarnwal
c770613157 libprint: Small code formatting fix
Change-Id: I40735e8994a8a4804401ce2694bb0f305216bbf4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2453
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-04-06 07:02:00 +00:00
Kyle Ambroff-Kao
40aa43588d tests/net: Fix NetworkAddressTest::TestUnset()
This test just checks a default-constructed BNetworkAddress and a
BNetworkAddress that has had its Unset method invoked are in the same
state.

It also compares against a BNetworkAddress that has been constructed
with the AF_INET family. In BeOS R5 this worked because you could
construct a BNetworkAddress with nullptr for the host parameter, but
in Haiku this this leads to Unset() being invoked. So
BNetworkAddress(AF_INET, NULL) is the same as a default-constructed
BNetworkAddress object.

This patch just changes the test to construct the BNetworkAddress used
for comparison with a valid host using the IPv4 loopback address
instead.

Change-Id: Id890110cfa1f3c40a630f9005e2a390e25f6baae
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2388
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-04-04 22:44:37 +00:00
Adrien Destugues
61557c8240 BListView: do not spawn a thread on every mouse click.
That's a bad idea. The drag and drop tracking could get confused enough
to crash app_server (possibly because of calling InitiateDrag multiple
times?)

Fixes #14983.
2020-04-04 11:50:07 +02:00
Autocomitter
1e4cb11ffd Update translations from Pootle 2020-04-04 08:57:41 +00:00
Niels Sascha Reedijk
9663972932 HaikuBook: Add documentation for BSplitView and BLayoutBuilder::Split<>
Change-Id: I4cfb369d21097ff49a53ebfc52ca57cab7c8049b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2443
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-04-03 17:04:33 +00:00
Jérôme Duval
c4f5ebc3df PCI: add set_powerstate and get_powerstate hooks
Change-Id: I8e32b5fccba3461cdb1b0c6e81b15705b2be1c57
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2447
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-04-02 13:31:56 +00:00
Niels Sascha Reedijk
f62c154804 Documentation: synchronize the userguide and the welcome guide from i18n.haiku-os.org
This also applies the change in #15393
2020-03-31 07:05:33 +01:00
Leorize
d7e2195b89 installer/CopyEngine: don't return values via class states
_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>
2020-03-29 16:33:52 +00:00
Augustin Cavalier
a73bad3ed2 nvme_disk: Add locking around request queue access.
Should help with #15123 further.
2020-03-28 16:27:37 -04:00
Augustin Cavalier
ce363eca71 nvme_disk: Remove nvme_qpair_poll from nvme_internal.h.
This is now declared in the public header.
2020-03-28 16:27:37 -04:00
Andrew Lindesay
32ed76599d HaikuDepot: Check Working Files Writable
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>
2020-03-28 20:06:08 +00:00
X512
663c9749e1 Pulse: fix type for format string
Pointed by clang.

Change-Id: I3809c15ccc7c1f268ac3d9088896d7cd1488226d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2405
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-03-28 20:04:49 +00:00
X512
bf9093e794 Efi: fix headers for 32 bit platforms
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>
2020-03-28 20:03:37 +00:00
Augustin Cavalier
a5ca573d27 ArchitectureRules: Add -fno-semantic-interposition to kernel rules.
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.)
2020-03-28 14:52:17 -04:00
Autocomitter
ece3c314d2 Update translations from Pootle 2020-03-28 08:51:26 +00:00
waddlesplash
8e12c92fee freebsd_network: Implement mtx_destroy for spinlocks.
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.
2020-03-24 21:06:37 -04:00
Alexander von Gluck IV
cb837539f5 build/scripts: make toolchain scripts more self-sustainable
Change-Id: Ibe4cf105a20184392498371ba770529d69bd61a7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2417
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-03-24 18:24:13 +00:00
X512
9d6177614b PPMTranslator: fix clang warning self-assign, remove redurant braces
Change-Id: I2b3f61fdf482c56b4520174e7a9c48f4ac64e1f2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2404
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-03-24 03:09:55 +00:00
X512
33378c1413 Bluetooth: fix out of bounds access
Pointed by clang.

Change-Id: If8f60619bd98027ae7bc0e7ecaa1c86db6bacf0e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2403
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-03-24 03:09:55 +00:00
Jérôme Duval
39a7a69b07 boot_loader: add missing stubs
u_boot build still broken

Change-Id: Iba93ce7bf0d5c30a95ff98420a2e419eb28bb398
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2412
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-03-23 18:29:56 +00:00
Jérôme Duval
bed01fe356 AreaKeeper.h: move to headers/private/kernel
Change-Id: I9ae2b9a6243809a618c0520a26e064ce3c5be2b4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2410
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-03-23 16:38:01 +00:00
Jérôme Duval
2930142932 ArchitectureRules: define HAIKU_KERNEL_PIC_CCFLAGS for x86
fix broken x86_gcc2 build after 515ec47340
2020-03-23 17:24:13 +01:00
Jérôme Duval
0dbbeede37 kernel: map signal processing/data acquisition in the device manager
Change-Id: I1ef8b1d2c26a7dcf04956e6ca3c591d480c881a0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2387
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-03-23 15:38:52 +00:00
Jérôme Duval
e2a1fdf983 PCI: add subclasses for data acquisition
Change-Id: Ic4326300e4be0d9dccb4a1c8c50c0118318f62d9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2386
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: John Scipione <jscipione@gmail.com>
2020-03-23 15:38:52 +00:00
Jérôme Duval
3bb1319682 pch_thermal: driver for intel pch thermal devices
Change-Id: I7b750957727d222b464acf3b84fb9a9d6efee9b5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2385
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-03-23 15:38:52 +00:00
Jérôme Duval
11f8b65a79 boot_loader: load intel microcode update data file
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>
2020-03-23 15:33:34 +00:00
waddlesplash
6f857fa9fb Revert "boot_loader: load intel microcode update data file"
This reverts commit a732059324.

It broke the build on most boot platforms (including EFI.)
2020-03-23 10:09:21 -04:00
X512
e2c0896a2b Sudoku: 64 bit fix
Pointed by clang.

Change-Id: I996454dcee8484716946d08d3318daf8d815b7cf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2402
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-03-23 10:20:38 +00:00
Jérôme Duval
a732059324 boot_loader: load intel microcode update data file
Change-Id: I323a57cc0b1f05ad7b60b6a141d068a3e618ee4d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2263
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-03-23 06:16:28 +00:00
X512
fc179324b0 radeon: fix computing difference
Also fix clang warning self-assign.

Pointed by clang.

Change-Id: I0e104420414fecece87015a0af9a4535ccfc8263
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2401
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-03-23 01:30:23 +00:00
X512
39be4f89f5 Fix clang warning string-plus-int
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>
2020-03-23 01:30:23 +00:00
X512
f17d2fbb4e app_server: fix clang warning tautological-constant-out-of-range-compare
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>
2020-03-23 01:30:23 +00:00
X512
668ecf4f09 Kernel: fix operator priority warning
Pointed by clang.

Change-Id: I16aa242c94abdf1fa22c4651e63c8c236e6c1a82
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2393
Reviewed-by: John Scipione <jscipione@gmail.com>
2020-03-23 01:30:23 +00:00
X512
f7db27344f Keymap: remove iterator change inside for loop, no functional change
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>
2020-03-23 01:30:23 +00:00
X512
1e3d4cf78c Kernel: remove dead code
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>
2020-03-23 01:30:23 +00:00
X512
8152128002 Fix clang warning "mismatched-tags"
Change-Id: I00f26e27d8ac24a46b528ea7ed47b92c2967ff2e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2390
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-03-23 01:30:23 +00:00
X512
77f5125586 Fix double extern "C" pointed by clang.
Change-Id: Ie595dd99d01149868a4f60354ef89fa861cf856b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2389
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-03-23 01:30:23 +00:00
Augustin Cavalier
cc0823d82e nvme_disk: Undefine PTHREAD_MUTEX_INITIALIZER before defining it.
Some things seem to indirectly include <thread_types> which includes
<pthread.h>.

Fixes a warning.
2020-03-22 20:52:46 -04:00
Augustin Cavalier
9c878a9a89 nvme_disk: Use addr_t for pointer arithmetic.
No functional change (intended).
2020-03-22 20:52:01 -04:00
Augustin Cavalier
515ec47340 ArchitectureRules: Make HAIKU_KERNEL_PIC_CCFLAGS empty by default.
This makes it entirely up to the per-architecture setup as to
what to put into it.

No functional change.
2020-03-22 20:49:55 -04:00
Augustin Cavalier
625dc38a28 libnvme: Rework qpairs to lock themselves.
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.
2020-03-22 17:36:31 -04:00
Leorize
f1e5a6c914 Installer: supports installing .hpkg-based optional packages
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>
2020-03-22 20:40:21 +00:00
Leorize
bf551d3889 installer/CopyEngine: now only exposes a Copy() method
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>
2020-03-22 20:40:21 +00:00
Leorize
fd09d551e1 installer/CopyEngine: _CollectCopyInfo now works with all file types
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>
2020-03-22 20:40:21 +00:00
PulkoMandy
18da5c3042 Bootloader log: check for buffer overflow
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.
2020-03-21 18:30:25 +01:00
PulkoMandy
99195e3c36 bootloader ethernet: fix tracing 2020-03-21 18:30:25 +01:00
Jérôme Duval
6d72c4188e virtio_net: add VIRTIO_NET_F_MTU support
Change-Id: Ie61fa0e0fe13a63d5b0ebde08303a1df836b1b52
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2384
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-03-21 17:16:45 +00:00