Commit Graph

63188 Commits

Author SHA1 Message Date
Augustin Cavalier
895e0c8a32 launch/system: Use single-line "on" trigger.
The "user" launch file already uses this everywhere, so
we may as well save a few characters.
2021-09-29 13:33:21 -04:00
Alexander von Gluck IV
4ef28d2f12 image/definition: Add missing empty control_look, opengl dirs
Change-Id: I3db814c7a05666f4755f3375ec7d5f4295b24d84
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4507
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-09-29 15:50:02 +00:00
Andrew Lindesay
7f86c21945 HaikuDepot: Fix language selection
Fixes a problem that can arise with the
selection of language when adding or
editing user ratings.

Fixes #11316

Change-Id: I85625cdc156458d88f4d1ca01ae889d954364ffd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4511
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-09-29 15:48:38 +00:00
Augustin Cavalier
ce308ddc6b launch_daemon: Trigger sticky-already-triggered external events immediately.
If the external event is sticky and already triggered, then we want
to trigger any newly-added events immediately. This fixes "boot hangs
on rocket" regressions following 4f126f690c,
which seems to have exacerbated this already-existing race condition.

Fixes #17289.

Change-Id: Ie405826cc50255895c8831c34b8bdf902e584eb5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4510
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-09-29 15:44:35 +00:00
Augustin Cavalier
b19b3d9b39 launch_daemon: Refactor handling of ExternalEventSources.
* Refactor ResolveExternalEvent to actually return the resolved event,
   not just whether or not one was found, and then skip resolution
   in TriggerExternalEvent and ResetStickyExternalEvent, which now
   should only be passed ExternalEvents.

 * ExternalEventSources now store destination Events, not Jobs,
   following on that refactor.

 * The second variant of ResolveExternalEvents is dropped,
   and instead the Register/Unregister functions are implemented.

 * Trigger and ResetSticky are now done in ExternalEventSource,
   which now keeps track of whether it has been sticky-triggered
   or not, though it does not use this information yet.

These changes should not affect behavior, they largely constitute
a reorganization (though some TODOs are resolved.)

Change-Id: I46a51cac0edb90e90b154ef9c94791cb7a1aad94
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4509
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-09-29 15:44:35 +00:00
Augustin Cavalier
ffc83aa24a USB bus drivers: Add missing iterator increments.
Should fix boot hang regressions introduced in hrev55455
in the fix for #17275.
2021-09-28 14:36:44 -04:00
Augustin Cavalier
337b483bd8 XHCI: Use MutexLocker in _LinkDescriptorForPipe.
No functional change.
2021-09-28 13:25:27 -04:00
Augustin Cavalier
3ff662a5a2 PCI: Remove dprintfs and now-dead code following RISCV64 merge.
It appears kallisti5 forgot to remove these.
2021-09-28 12:43:30 -04:00
Augustin Cavalier
4f126f690c mount_server: Connect on-demand to app_server.
This is similar to with the registrar and debug_server,
both of which are started before app_server, already do.
In the case where we cannot connect to app_server for
_SuggestMountFlags, we default to read-only.

(This should however never happen, at present.)
2021-09-27 18:38:03 -04:00
Augustin Cavalier
65fc7380ca power_daemon: Use BServer and do not connect to app_server.
Just like syslog_daemon in the previous commit, power_daemon
does nothing GUI-related, so we can skip connecting to app_server.
2021-09-27 18:35:30 -04:00
Augustin Cavalier
ba56491ea0 syslog_daemon: Use BServer and do not connect to app_server.
axeld did all the hard work in 4bf862e368
but did not actually change the instantiation to use BServer. We now
do that, and pass "false" for "initGUI" to avoid connecting to app_server,
as syslog_daemon never does anything GUI related.
2021-09-27 18:34:45 -04:00
Augustin Cavalier
2aa85f5f78 VirtualKeyboard: Fold KeyboardLayoutView back into the Keymap preferences one.
Only one #ifdef, the rest is all in basic if-tests. Relatively minimal changes,
and now the virtual keyboard device gets all the improvements made to the keyboard
layout view over the last 6 years.
2021-09-27 18:25:44 -04:00
Augustin Cavalier
ae61e1b716 USB bus drivers: Return error when combining other transfers with a fragmented one.
The drivers do not support this properly at present, they would
run the other transfers interspersed with fragments from the fragemented one,
which is obviously the wrong thing to do.

No USB device drivers seem to do this at present (it would cause data
corruption if they had.)

Fixes #17275.
2021-09-27 16:28:01 -04:00
Rudolf Cornelissen
1681f7f4fe intel extreme: fixed virtualscreen panning glitches on pre-Haswell. Smooth now.. 2021-09-27 22:23:21 +00:00
Augustin Cavalier
d5f7f40504 tests/interface/bshelf: Import Container and ShelfInspector.
These come from the Haiku Newsletter, issue 56 article 2, which I
managed to retrieve the source from the Wayback Machine. (They
are based on applications from Be's Sample Code distributions.)

Jamfiles not yet included; the source is in unmodified form,
except the RSRCs have been decompiled to RDEFs.
2021-09-27 16:18:54 -04:00
Jérôme Duval
08d9716a9a video_producer_demo: fix comparison warnings
Change-Id: Ibfc8780c55e229190573918a4cf1f119b5e345c6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4504
Reviewed-by: Franck LeCodeur <cassisian@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-09-27 12:15:05 +00:00
Rudolf Cornelissen
fe8f9e2326 intel_extreme: set B_SCROLL, share current mode. Cloning and BWindowScreen now work OK. 2021-09-27 10:19:43 +00:00
Rudolf Cornelissen
1e0fdd6d98 accelerants common:BWindowScreen.CanControlFrameBuffer() now says OK. Note that these mode.flags are _outputs_ from the accelerants 2021-09-27 10:16:59 +00:00
Jérôme Duval
bb187c91d8 interface: add colorspaces support for RGB48 and RGBA64
these colorspaces are packed as RGB or RGBA, not BGR or BGRA.
RGB48_BIG and RGBA64 only differ in the endianess of the channel the 2-byte value.

this is a big difference with RGB24_BIG and RGBA32_BIG, in which case _BIG
means the order is RGB (BGR) and not BGR (BGRA).
BGR48, BGRA64 could indeed be added, if needed.

I chose 0x11 and 0x12 arbitrarily, but given the order of channels 0x1011
and 0x1012 might make more sense. This would mean using another bit for "real"
bigendian colorspaces.

Only the color conversion to 32-bits is implemented.

Tested with the RAWTranslator modified to output 16bpp with success.

Found some references in enum AVPixelFormat in libavutil/pixfmt.h.

Change-Id: I4b023dec85d01f1e63e1b053139e5bb5d263a0e0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4468
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-09-27 07:21:27 +00:00
Autocomitter
c1432f757f Update translations from Pootle 2021-09-25 08:45:01 +00:00
X512
ad3f57ef5a kernel/debug/frame_buffer: Lock should always be initalized
* Without this, kernel will crash on boot when a framebuffer
  isn't provided by bootloader. (like on the riscv64 today)

Change-Id: I5ec64db30972c7c3b19e4cdb31f0fe72b5982c0f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4494
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-09-24 00:50:21 +00:00
Alexander von Gluck IV
3ea6c00608 radeon_hd/riscv64: Add radeon_hd to minimum image
Change-Id: I44211b3533f99338d7246e88593fc8838628904c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4485
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-09-24 00:48:50 +00:00
Alexander von Gluck IV
2e8ad9a706 bus_managers/pci: Init controller before io regs
* For riscv64,arm,etc, the controller init is used to
  parse the fdt to detect the PCI controller.
* Without the controller being init'ed, we don't yet know
  the base registers of the PCI controller for io activity
  on a lot of architectures / platforms
* x86 doesn't seem to use the io regs until well after
  controller init

Change-Id: I2a04e30e4dc675657b5cd9183240dafd35473998
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4484
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-09-24 00:48:50 +00:00
X512
9720782947 bus_managers/pci: add riscv64 support v2
* Refactored version of X512's original work to split out
  the ecam and fu740 PCI Controllers

Change-Id: I631885af03b0118fb0084ed7aa4a5aa0a355b0fa
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4435
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-09-24 00:46:59 +00:00
Franck LeCodeur
e5928728d5 JPEG2000Translator: Fix -Werror warnings
This fix is for ticket #9460 to potentially enable -Werror for JPEG2000Translator.
Original warning: 'char* strncpy(char*, const char*, size_t)' specified bound equals destination size [-Wstringop-truncation]

- Replaced several occurrences of same string with existing constant.
- Use strcmp instead of strncmp as one string is guaranteed to be null-terminated
- Replace strncpy use with strlcpy as seen in other code places.

Change-Id: I5e7ed0de10dc40447a64fe77a7909af577e128ac
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4472
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-09-22 07:27:07 +00:00
Niels Sascha Reedijk
158b8fdab2 libroot: return EOPNOTSUPP from posix_fallocate
The pre-allocate functionality was added to Haiku in hrev54704. It needs
support at the file system level though, and it is yet to be implemented by
BFS. Some applications (and glibc!) implement a fallback mechanism using
ftruncate(), including the LLVM tools, but they go to this fallback
mechanism when it is clear that the operation is not supported. In particular
they look for EOPNOTSUPP.

The current implementation returns B_UNSUPPORTED from the vfs layer when a
file system does not implement the feature. This error code this not map to
a POSIX error. This change converts it to EOPNOTSUPP.

Change-Id: Ief382b0f4d462dfedf84c731f68f69731de4498c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4492
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-09-21 10:22:10 +00:00
Augustin Cavalier
cc455ef461 USB: Properly set and reset fFragmented for both SetVector and SetData.
Now that we are not setting fFragmented in VectorLength(), we can
reset it in SetVector based purely on the length of the newly set vectors.

We also need to set it in SetData, as SetVector does not call this.
This fixes an oversight in bc7fd43358.
2021-09-20 12:37:39 -04:00
Augustin Cavalier
8d046e2689 USB: Split WaitForUnbusy from Object::PutUSBID.
In a few instances, we need to not wait for objects to become unbusy
during ID puts because we expect they still will be, e.g. in the case
of Control pipes with submitted transfers that are still running. There,
we need to put the ID, cancel transfers, and only then wait for the
object to become unbusy.

Technically, this is a functional change, but at least in practice
it will have little real-world effect, for two reasons:

 1. The DefaultPipe's Busy flag is basically never updated (the Device's
    busy flag is generally used instead), so it will virtually never be
    "busy".

 2. Most devices have no Control endpoints besides that default one.

Change-Id: I32ff4094effeac9ec74546c9643ea2025418e1c1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4491
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-09-20 16:28:03 +00:00
Augustin Cavalier
faae5dd726 USB: Put the default pipe's USB ID and cancel its transfers earlier during teardown.
This way, any endpoints or interfaces which are currently using the
default pipe for SetFeature/.../etc. will return immediately and
become unbusy.

Should fix the remaining KDLs in #16794 and #16969.

Change-Id: I6615fc03394a0c50eae1ca7da2fb43f243841613
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4490
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-09-20 16:28:03 +00:00
Augustin Cavalier
2ce316ccc8 USB: Refuse transfer submission on pipes that are being removed.
This mostly only matters for the Device DefaultPipe, which is still
accesible even after its USBID has been put, but it makes sense to
do this in general, too.

Change-Id: I6711f1ce8fe79dff54927e3b5e60dec15bb58b14
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4489
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-09-20 16:28:03 +00:00
Augustin Cavalier
2f496b3095 USB: Make Pipe::CancelQueuedTransfers virtual and add a ControlPipe variant.
Control pipes have internal structures to wait for queued requests.
When force-cancelling queued transfers, the callbacks will not be called,
and so such transfers would be left hanging until the timeout occurred
or the destructor destroys the semaphore and mutex.

This probably will not fix any hang-related tickets, though, as force
cancellation is pretty much only used during device/pipe teardown.

Change-Id: I41db7caf380cdd082bc3509e95262317489bf100
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4488
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-09-20 16:28:03 +00:00
Augustin Cavalier
3e0eea85ec XHCI: Add support for fragmented transfers.
I was not actually aware that our USB stack already supported
breaking (bulk) transfers up into smaller units as necessary;
these APIs are not very well documented.

This makes #15569 occur far less often, though it is still
more than possible to trigger.
2021-09-20 12:25:09 -04:00
Augustin Cavalier
bc7fd43358 USB: Rename Transfer::VectorLength to Transfer::FragmentLength.
It did not return the length of the vectors, but only the current
fragment's worth of vectors. It also modified the fFragmented flag,
which really should have been set in SetVectors in the first place.

As everything seemed to call IsFragmented after VectorLength,
this is not a behavioral change.
2021-09-20 11:52:54 -04:00
Coldfirex
120e8f6ace Listusb: Fix Wformat-security
Change-Id: Ibd750392467ae097b8728346bd0e9ce33a461a06
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4481
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-09-20 13:38:53 +00:00
Coldfirex
01d5efe3d9 Malloc_debug: Fix Wformat-security
Change-Id: I2f891fff74a003aac7774ee91f2c28d5e65a18f7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4486
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-09-20 13:38:53 +00:00
Coldfirex
5d9604a222 ifconfig: Fix Wformat-security
Change-Id: Ie4cf563f1ac333824932e1154e44d23e5ea046e3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4482
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-09-20 13:38:53 +00:00
Augustin Cavalier
c8eaa6f988 packagefs: Use WeakReference in PackageNode.
This allows us to stop storing the package flags, which saves 4
bytes per package node (a value that really adds up when there
are thousands upon thousands of PackageNodes), at the cost of an extra
sizeof(int32) allocation for the WeakPointer object per-package (of
which there are are much fewer, of course.)

This also is safer overall, as now consumers of GetPackage() or VFSInit()
will now hit a NULL dereference if they have failed to check if the
package still exists, instead of a use-after-free.

Change-Id: Iea97ffcd491c6e2da7093730a7fa951b84dcefdf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4478
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-09-20 11:08:13 +00:00
Augustin Cavalier
522c74f3e7 libroot: Use strnlen in strndup.
This is both more correct, as we need to not read past the 'size'
position of the passed pointer, and much faster, in the case where
the passed pointer is into some very large block of memory.

This provides an unbelievable speedup to a microbenchmark posted on IRC
that makes heavy use of this function in tandem with some rather
large allocations. (Some variants of it go from multiple minutes
to under a second!)
2021-09-18 18:20:44 -04:00
Autocomitter
ed246fcd6e Update translations from Pootle 2021-09-18 08:45:44 +00:00
Rudolf Cornelissen
96c8657d24 intel_extreme: fix haswell virt display scroll/pan, ticket #17261 2021-09-17 23:46:00 +00:00
Coldfirex
4411ed75b4 Kernelland_emu: Fix Wformat-security
Change-Id: I3b031335844ab4512b8eebc8ead216af9c5fc4ee
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4476
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-09-17 21:24:13 +00:00
Coldfirex
b1ce138fe8 PXE_ia32 Network: Fix Wformat-security
Change-Id: I926cdafa422f7544ff7a0fdcc9c5561759066a3e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4475
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-09-17 21:24:13 +00:00
Coldfirex
81329d5c90 ATATracing: Fix wformat-security
Change-Id: I36e71a4705b811e45935bf3faa11b15617b04cc0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4474
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-09-17 21:24:13 +00:00
Coldfirex
a33cf10dcf USB Vision and FreeBSDCompat: Fix Wformat-security
Change-Id: Idd7fd80546b414c9db21bc0979412bcd4bf7878d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4460
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-09-17 21:24:13 +00:00
Coldfirex
59642dc3e8 ACPICAHaiku.cpp: Fix wformat-security
Change-Id: I6d06e68e60ced2ca311c3fc505f9f9f51ee05563
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4473
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-09-17 21:24:13 +00:00
Augustin Cavalier
5ea9360258 package_infos/haiku: OpenSSL is enabled for minimum images and not just regular ones.
It has been since 2019. It seems to be added to images anyway,
probably because something else depends on it, but for correctness,
it belongs outside the REGULAR section.
2021-09-17 16:27:59 -04:00
Augustin Cavalier
744f487bc5 headers/libs: Remove expat headers.
We now have an expat build feature that uses packaged headers instead.
2021-09-17 16:26:06 -04:00
Augustin Cavalier
a812e3cab1 kernel/debug: Only create an area for the debug syslog if reusing one.
If the debug_output pointer is just a kernel_args_malloc'd structure,
then it is already mapped and we should not be re-mapping it; we only
need to do that if we are using a fixed-map ring.
2021-09-17 16:06:13 -04:00
Augustin Cavalier
4d1c59078b EFI: Hand off bootloader log to the kernel.
Eventually, EFI should get support for the debug log ring_buffer
like bios_ia32 has for transparent handoffs, but this preserves
everything except for the pre-start MMU dump, which is an improvement.

Fixes #15455.
2021-09-17 16:04:20 -04:00
Augustin Cavalier
80519e78aa bootloader: Clarify comment in text_console.h.
The following colors are "foreground colors only" not "foreground colors,
only if".
2021-09-17 15:36:57 -04:00