Commit Graph

62057 Commits

Author SHA1 Message Date
Adrien Destugues
c12c97a6f1 usb_hid: do not publish a keyboard device when a mouse is connected
My trackball has a "system control" in its descriptor, but is
definitely not a keyboard. This results in an extra entry in Input
preferences for it.

If we actually want to accept input from such devices, we should scan
them more closely to check there is actually a valid input there, and
consider publishing them as something else than keyboards, because
that's not really suitable in Input preferences.

Change-Id: I9027454b3b24d0f39ea562aed851402d0be7aeb4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2715
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-10-11 16:07:34 +00:00
Adrien Destugues
47bf2e3878 sdhci: detect Ricoh SDHCI controllers
They don't advertise themselves as standard SDHCI, but are mostly
compatible. Only check for the one in my machine for now.

Also improve tracing in the probe function.

Change-Id: Ia47238fb25b783790fa8caaedf2a71aeb6e29d89
Reviewed-on: https://review.haiku-os.org/c/haiku/+/806
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-10-11 16:04:05 +00:00
Adrien Destugues
62eaf4c0e1 mmc_bus: add execute_command function
For now it just forwards the command to the SDHCI controller.
The bus will gain more features and functions as work advances (tracking
which card is active, arbitration of DMA transfers, etc).

Change-Id: I094eb84f27e7789387a3f8fb65fba1e5fcfa3e8a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3094
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-10-11 16:02:22 +00:00
Adrien Destugues
d4a668083c sdhci: fix interrupt handling
The interrupt handler clears the interrupt register, so the main thread
cannot get the errors from there. Save the interrupt state in the
handler so that the thread can know if a command succeeded or not.

Change-Id: Ibee35c3caed6be8e2552b6c66c4e854a00f5465d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3090
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-10-11 16:02:22 +00:00
Adrien Destugues
cd78ed4d46 sdhci: fix response type definitions
These are apparently ignored by the Ricoh controller I did my previous
testing on, but QEMU is more strict about them

Change-Id: Ie70808a5c8b26e6f0f22bd8259a42452903781a3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3089
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-10-11 16:02:22 +00:00
Adrien Destugues
dedbe94e46 mmc: register devices for detected cards
Change-Id: I90891ead9a425e0e8bd25c2190fe3d430d49411b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1067
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-10-11 16:02:22 +00:00
CruxBox
fc87b4a284 xfs: Read Block directories
Block directories can now be read.
Change-Id: I9aa898638e6ac39cb903f2dd58cd184785e1a06b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2992
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-10-11 16:00:26 +00:00
Adrien Destugues
3255108dde ufs2: fix reading directories.
Main problem was the use of sizeof(dirent) instead of sizeof(struct
dirent) so it used the size of the pointer.

Change-Id: I7d9388235d583d942ada5e3650cf8320ff2be6cb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3197
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-10-11 15:57:51 +00:00
Adrien Destugues
14c58ad1bd ufs2: implement scan_partition
Not needed by fs_shell but required to use the driver natively in Haiku.

Change-Id: I547ab4c0637230d447f437cb47a419734a0401e7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3196
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-10-11 15:57:51 +00:00
Suhel Mehta
f563d6e696 ufs2: Reading symbolic links
Symbolic links are now showing path and relative path can be tested.

Change-Id: I47820a475d78d8090c02564f698e72dd8fbaa3a1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3171
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-10-11 15:57:51 +00:00
Suhel Mehta
057a3b389f ufs2: Implementing read function
Attempting to read data from direct blocks and single indirect
blocks even if the data stored is not in continous blocks and
DirectoryIterator now uses ReadAt to iterate through directories.

Change-Id: I8156aba53782da8c2bb4481db611ae26d8881b35
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3088
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-10-11 15:57:51 +00:00
John Scipione
7c095f4709 BeControlLook: Fix app integration drawing issues
Update BTab::DrawTab() to pass the current index, the index of the
selected tab, and the index of the first and last tabs into
BControlLook::DrawActiveTab() and BControlLook::DrawInactiveTab().
This allows you to draw tabs differently in your BTab or BControlLook
subclass in many different circumstances.

Modify BControlLook API to add indexes to DrawActiveTab() and
DrawInactiveTab() like so:

void DrawActiveTab(..., int32 index = 0, int32 selected = -1,
	int32 first = 0, int32 last = 0);
void DrawInactiveTab(..., int32 index = 0, int32 selected = -1,
	int32 first = 0, int32 last = 0);

These extra indexes are not used by HaikuControlLook which relies only
on if the tab is active or inactive to draw.

Add IndexOf(BTab* tab) method to BTabView and document it to get the
index of the current tab in BTab::DrawTab(). Also add a warning in the
BTabView::DrawTab() method not to use the position and full parameters
anymore, use BTabView::IndexOf(), BTabView::Selection(), and
BTabView::TabCount() to get the info you need.

Using a dynamic_cast to a BTabView in BeControlLook to determine if the
view is derived from a BTabView didn't work in the case of WebPositive.
Furthermore, WebPositive does custom tab drawing which needed to be
updated for alternative control look. These index parameters passed from
BTab to BeControlLook allow us to draw the tab like BeOS without relying
on a dynamic_cast to BTabView to get the info.

Reproduce the functionality described above for BTab in WebPositive's
custom tabs. Eliminate no longer needed code in favor of using indexes.
Update WebPositive custom tabs to use BControlLook::DrawTabFrame()
instead of BControlLook::DrawInactiveTab() matching the update made in
BTabView.

In BeControlLook::DrawTabFrame() fill rect with base color, WebPositive
doesn't draw any tab background, so it expects this work to be done for
it.

Eliminate hasFrames variable from WebPositive.

Rename TabSelected(index) to UpdateSelection(index) in WebPositive to
better reflect its purpose.

Adjusted HaikuControlLook::DrawInactiveTab() to draw the tab borders more
selectively. Only draw border if left border is set for top and bottom tabs
or top border is set for left and right tabs. Undo no longer needed frame
manipulation border drawing workaround in HaikuControlLook::DrawTabFrame().

Draw scroll bar triangle without using DrawArrowShape().

Unlike in HaikuControlLook, DrawArrowShape() is used to draw arrows in
BOutlineListView and menus distinctly from how it draws arrows in scroll
bars. Draw our distinct arrows in DrawSrollBarButtons() instead.

This fixes overflow of time edit up-down arrows in Clock prefs and the
collapse-expand arrow in Deskbar not being vertically centered.

In DrawBorders() only inset if we actually draw the border.

Fix alignment issues with DrawSliderThumb dots for example in
MediaPlayer volume knobs.

Draw using line arrays calling AddLine instead of StrokeLine in
several places.

DrawMenuBar() extends to draw final pixel which eliminates an extra
lines at the end of menu bars.

Truncate button labels better fixing a few issues for example keymap
keyboard layout button labels. Button insets has been updated a bit
to fix drawing issues with buttons missing a border.

Using a dynamic_cast to a BButton to determine if a view is a button
in BeControlLook didn't work in the case of the keymap label. Look for
B_FLAT, B_HOVER, or B_DEFAULT_BUTTON flag in BeControlLook::DrawLabel()
to draw the label inverted on click. Pass the B_FLAT flag from Keymap
keys when drawing using BControlLook so that the label is inverted.

Change-Id: I07631f4b006bdb9aeca2adc9cbdf2da54dae8e92
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2866
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-10-11 15:50:18 +00:00
Alexander von Gluck IV
186dc96ef6 libroot/os/x86_64: clang says to never include ia32intrin
Change-Id: I08ecdfdc82f89c56081a8873d6263c30bad129b6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3302
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-10-11 15:48:30 +00:00
Murai Takashi
d3179631c9 file_systems/udf: Reduce indent
Reduce indent in walk_volume_descriptor_sequence() for readability.

Change-Id: Ie4d46fc69ebee3b74f0410639f06010351e71894
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3294
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-10-11 15:48:14 +00:00
Niels Sascha Reedijk
1e22d0d338 HaikuBook: Improvements to the GraphicsDefs.h documentations
Still lots more to do, but it is a start.

Change-Id: Ia83e7f4b751a860b3005d34841b58f31450613ce
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3309
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-10-11 15:46:06 +00:00
Niels Sascha Reedijk
5a6d68bbfa HaikuBook: add instructions for including INTERNAL documentation
Change-Id: Ifb539a0a11d6aa9f496aa493d7a47a08016818be
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3308
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-10-11 15:46:06 +00:00
Niels Sascha Reedijk
2cb5a2c394 HaikuBook: Add skeleton for support/DateTime.h and support/Job.h.
These are marked internal for now.

Change-Id: I09859060021e4b35c355c9a0400da6f8bc6653e2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3307
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-10-11 15:46:06 +00:00
Niels Sascha Reedijk
85b475f07b HaikuBook: Add missing protected methods to BControl
Change-Id: Ia230272efa66bff96f9cd34ec910f4d1315fd1aa
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3306
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-10-11 15:46:06 +00:00
Niels Sascha Reedijk
42dcaf375d HaikuBook: Hide BLaunchRoster and BToolTip documentation from book
These two classes are not yet in the public API, as such they are hidden behind
the INTERNAL conditional variable.

Change-Id: I4ac204a600715937ef99d8ff56c4026d06abec3f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3305
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-10-11 15:46:06 +00:00
Niels Sascha Reedijk
ae78fb3062 HaikuBook: Add Makefile that supports the default and the develop configurations
I use the develop configuration to generate a warnings file, which is useful to
find undocumented members. The default configuration hides the undocumented
members and does not warn about them.

Change-Id: I09248c95bd51ea21118ff4f7ce57427d033981d2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3304
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-10-11 15:46:06 +00:00
Alexander von Gluck IV
5646b99778 input/MouseSettings: Fix return to NULL per clang
* This looks wrong, but is functionally equal.
* Supposed to return a MouseSettings*, but returned
  a B_OK (0) on a seemingly error result (NULL).

Change-Id: Id6c50369790b90e38fd6ec037c466c5fb314edf5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3303
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-10-11 15:44:42 +00:00
Augustin Cavalier
e43fabeb86 libroot: Add new method to musl atomic fallbacks.
It is used by musl's malloc.
2020-10-10 16:38:33 -04:00
Augustin Cavalier
64b46b706b headers: Adjust GCC2 stdbool to be usable by modern GCC.
musl's allocator needs to be built with GCC 8, but we need to link
it into GCC 2 libroot, which uses GCC 2 headers.
2020-10-10 16:36:59 -04:00
Augustin Cavalier
fb0391c28b ArchitectureRules: Fix typo in CC_IS_CLANG test. 2020-10-10 16:26:41 -04:00
Augustin Cavalier
af07b876ad HelperRules: Fix typo in the new CC_IS_LEGACY_GCC test. 2020-10-10 16:24:43 -04:00
Augustin Cavalier
b7fd72cdbb ProcessController: Fix memory leak. 2020-10-10 16:11:42 -04:00
Augustin Cavalier
f65814780e ProcessController: Relicense as MIT.
We received permission from the original author and all relevant contributors
(see the mailing list) to do this. (As best as can be established, BeUnited
did not modify the source code after importing besides adding their copyright.)
2020-10-10 15:57:49 -04:00
Augustin Cavalier
844ff609b4 Revert "ProcessController: solve BMessage kind of memory leak."
This reverts the ProcessController portion of commit edcc37c64a.

Barrett refused to relicense his contribution to ProcessController.
2020-10-10 15:43:03 -04:00
Humdinger
fed8255311 HIG doc: Fix typos etc.
Fixes #16562
Change-Id: I866512b4254bdeb4287b6dd41aca74a76f78c3ca
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3298
Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
2020-10-09 11:09:02 +00:00
Augustin Cavalier
47320dd0ab configure & build: Rework legacy GCC detection to parse versions outside of Jam.
Jam comparison logic is string-based, and so was detecting GCC >= 10
as being < 2. This rectifies that by removing the GCC version parsing
from Jam logic entirely, and setting various BuildConfig variables
instead.

Change-Id: I0c0ae3b9002fb5e77f9ca7a78600c91871657f03
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3293
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2020-10-09 01:20:02 +00:00
Jérôme Duval
a3f0a36a79 pch_thermal: add Cannon Lake LP id
Change-Id: I00ab55ae2549e3d91ff4dc23106db3ebe45478d2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3296
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2020-10-09 01:16:27 +00:00
Jérôme Duval
7280961a74 pch_i2c: add Comet and Tiger Lake ids.
Change-Id: I449f22ef0babededbd64bc00c6c14e3bb495138e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3295
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2020-10-09 01:16:18 +00:00
Jérôme Duval
06ed32b8c4 BCursor: add a constructor with bitmap and point
* enhancement #15169
* get_mouse_bitmap(): also reads the colorspace from app_server.
* docs and tests

Change-Id: Iba63f8a2789530ae596c30b92f14828f31761d98
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3292
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-10-08 08:23:31 +00:00
Adam Fowler
e5af52cede Documentation: Added Accelerant documentation
Change-Id: I5b1e853a4e250a1e9a57d951cf44c14af80e58c9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2064
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-10-08 07:15:28 +00:00
Murai Takashi
6b6aa8ad5b file_systems/bindfs: Fix -WFormat=
Change-Id: Ibcaf7954c43755aa16e146cc53b085ae48a94d86
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3290
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-10-07 08:40:38 +00:00
Murai Takashi
3218588cc7 file_systems/udf: Fix -Wformat=
Change-Id: I560764359c783917df63fb70edc456a20c143b0a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3289
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-10-07 08:39:32 +00:00
Murai Takashi
f0d9590e51 file_systems/ext2: Fix -WFormat=
Change-Id: I10d3ab0343c4226dc19e0eade0e91eed6f27eb07
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3291
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-10-07 08:38:03 +00:00
Jérôme Duval
6a44d4c527 runtime_loader: define _LOADER_MODE for arch directories
Change-Id: I7eb6b77502eed76a529657d9ec733b72c9fc89c0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3275
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-10-04 19:34:40 +00:00
Jérôme Duval
125a4e9c32 kernelland_emu: avoid dprintf conflict from stdio
pretending to be in kernel mode

Change-Id: Ib396f9aae0b6d8ebff0edc332a583c66c59f1067
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3283
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-10-04 19:34:40 +00:00
Jérôme Duval
db9d2a6f14 POSIX: add dprintf
Change-Id: I577d5283a9be04924a8dd05c3be3969b41da60db
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3282
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-10-04 19:34:40 +00:00
Murai Takashi
8e71287b6f BeDecorator: remove dead assignment
Pointed out by clang static analyzer.

Change-Id: Ib91123f70bc07666737bbfedbb794ff43ac39905
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3287
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-10-04 08:29:40 +00:00
Murai Takashi
93c530009c pairs: remove more dead nested assignment
Pointed out by clang static analyzer.

Change-Id: I21cd0a779a50f26d713ae1203024b2b0f2f4bd49
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3288
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-10-04 08:27:47 +00:00
Murai Takashi
aa2632939c intel_extreme: Fix dead store
Pointed out by clang static analyzer.

Change-Id: If75c625a9d568db1081ddc83f98a85d361ebf5e2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3286
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-10-04 08:26:55 +00:00
Jérôme Duval
513955e6c0 GraphicsCard.h: remove declarations for dprintf and set_dprintf_enabled
Change-Id: Ie8bbfcf2f23cf0ee36dc74e76062f21c99effc96
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3281
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-10-03 11:52:37 +00:00
Jérôme Duval
fa51454b25 userlandsfs: needs AppDefs.h for B_QUERY_UPDATE
Change-Id: If39a60089873b20dedadd05ee69628d14585fdbd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3278
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-10-03 11:52:37 +00:00
Jérôme Duval
5e43ea2ed8 block_cache: use printf when not built in kernel mode
this is used by userlandfs

Change-Id: I2f7971be819c36fcab78eca2d18b45bb0b1a5fad
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3277
Reviewed-by: Rene Gollent <rene@gollent.com>
2020-10-03 11:52:37 +00:00
Jérôme Duval
1a58c4171d accelerants/common: useless include
Change-Id: Ice7aa5a01347d8052fea0de5bd2ee854d08b8b38
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3276
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-10-03 11:52:37 +00:00
Autocomitter
d0e006f556 Update translations from Pootle 2020-10-03 08:53:57 +00:00
Alexander von Gluck IV
14d8c772a1 configure: Break out cross-tools source path
* Stops the ackward "buildtools sources on first --build-cross-tools"

Change-Id: I683acf5ccc2a83b526a58aa54c7716d28d47b52d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3206
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: John Scipione <jscipione@gmail.com>
2020-10-02 19:52:41 +00:00
Jérôme Duval
64331e96ca kernel/x86: extend CR4 flags
Change-Id: I4861f6cd61d0daeeb2403d07e703b83cd6a00666
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3280
Reviewed-by: Rene Gollent <rene@gollent.com>
2020-10-02 17:12:06 +00:00