Commit Graph

65080 Commits

Author SHA1 Message Date
Alexander von Gluck IV
d9642c25bb headers/os: Bump max gcc to 13.x
* riscv64 builds fine
* x86_64 builds and boots fine

Change-Id: I98b72a9d57b1a6ea0fae5c113a4c24b32fd68a52
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6425
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-05-09 13:58:07 +00:00
John Scipione
396f398d35 Deskbar: Fix horizontal mode window size limits
When your font size and team icon size is large
enough horizontal mode Deskbar gets cut off.

Compare composed to composed, this restores the icon
size scaling behavior as indended before compose
changes in Deskbar: label is positioned to the right
of the team icon until after the third icon size
notch regardless of your font size.

Change-Id: Ia1d1418cc3b04536a55860d3889d2437c40986cc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6415
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-05-08 16:18:26 +00:00
John Scipione
9da3977cfa Deskbar: Rename IconSize() to TeamIconSize()
Change-Id: Id536bacd60334cd167051a785e7fff819359aacf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6412
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: John Scipione <jscipione@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-05-08 16:18:26 +00:00
John Scipione
69bbd7ad86 Deskbar: style fixes only
Change-Id: Ia5a94ded518a9b55aac94a69bcd393338bf90ebc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6411
Reviewed-by: John Scipione <jscipione@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-05-08 16:18:26 +00:00
David Karoly
00377c99e7 libroot/uname: remove unused architectures alpha, mips, sh4
Change-Id: I38b273d8d7c16a34552cc4aaed7d54b7026d590c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6410
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-05-08 06:49:01 +00:00
Trung Nguyen
f967e2c0c7 headers/bsd: Export pthread_attr_get_np
Exported `pthread_attr_get_np` under `_DEFAULT_SOURCE`. Otherwise,
the presence of this function in `libroot.so` without a definition
would confuse some configuration scripts.

Change-Id: I623ebefc98800e9528dc48859c2aefc828821f27
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6383
Reviewed-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-05-08 01:38:41 +00:00
David Karoly
19537d01d1 kernel/arm: adjust function names for getting/setting SCTLR
Change-Id: I28d6101c772a5065beec5af20f6d2a0c1855ae6c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6421
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: David Karoly <karolyd577@gmail.com>
2023-05-07 17:35:21 +00:00
Murai Takashi
18f35e4ebd libroot/os/driver_settings.cpp: fix memory leak
Fix leakage of memory allocated to 'text' when new_settings() fails
in load_driver_settings() at line 767.

Pointed out by Clang Static Analyzer.

Change-Id: I5888e2377c4da63040d5a66199f04aebd2034728
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6382
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2023-05-07 15:49:58 +00:00
John Scipione
cfbfb8473c BTextView: Allow nav on selectable but non-editable views
This allows arrow keys, page keys, home, end and the
blinking cursor on selectable views even if they are
non-editable. Input of text characters and backspace
are guarded on editable. Paste remains disabled.

Change-Id: Ifa5ed8673104e9abd51c52d394894aef48243965
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6407
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-05-06 16:39:58 +00:00
Autocomitter
8b33ac6bff Update translations from Pootle 2023-05-06 08:11:25 +00:00
David Karoly
2b9f3f2962 libroot/uname: fix uname for arm
Change-Id: I2538c3f00307ccf9c71dd602eae383136f81cd3f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6409
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-05-04 20:28:15 +00:00
Máximo Castañeda
7858871ed4 DrawState: disable drawing when clipping to an invalid rect
An invalid rect would mean an empty area to clip to. Its inverse would
be an infinite area with no holes.

Fixes #18395.

Change-Id: I5c739149e539ab63e9aaab6e8716aa73e3ee9d2f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6406
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: John Scipione <jscipione@gmail.com>
2023-05-04 14:43:48 +00:00
Mashijams
43a8874973 xfs: remove unnecessary macros
No functional changes just remove all the clutter caused by macros and flags that are never used

Change-Id: Iac0cc3fd873dbf11a379b33e4371902fa1181804
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6405
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: John Scipione <jscipione@gmail.com>
2023-05-04 14:43:22 +00:00
Mashijams
c6bb93278e xfs: fix performance issue related to xattrs
xfs by default adds xattrs format as extents in inode for directories even when there are no disk blocks allocated to extents, this made our driver looking for invalid extents and caused performance issue.

By adding a simple check for number of attribute extents in inode we fix this issue.

Change-Id: Idf86bb7822926c2ea311f6bbc2dfdcbee4d8930f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6403
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: John Scipione <jscipione@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-05-04 14:43:22 +00:00
John Scipione
d34f1c40e0 Tracker: Add BPoseView::CountSelected() method
Replace count variable with either selectCount
or poseCount depending on what is being counted.

Change-Id: I5e5caffd71bb932d93a822b28e73cdcfebff7135
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6399
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-05-03 07:31:42 +00:00
John Scipione
b7dd18b22c Tracker: Style fixes only
... including whitespace, brackets, rename loc to where or
location, add a pragma.

Replace min_c with std::min.
Replace BPoint(0, 0) with B_ORIGIN
Use make_color() function to make static rgb_color objects.

Change-Id: I47a4e5e5f0e7038643baca7539d211350bbb8f20
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6404
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2023-05-03 07:30:59 +00:00
Freaxed
dc3f8c631a BOutlineListView: fixed compression causing inconsistent selection update
When compressing an item containing a selected  item, the selection is wrongly moved to the parent as the selection code is not
called. This is causing no visual change in the selected item. Morehover the next user click will always invoke the (wrongly) selected parent.

This can be easily reproduced in the FileTypes application:
 * expand the application item and select an application
 * compress the application item
 * expand the audio item and select and audio item
 * the invokation is performed on the application item and not on the selected audio item.

This fix takes into consideration both single and multiple selection mode.

Change-Id: Icf7c63e6d44f039a8bdf3bb7d343d7aed6b7ac7d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6402
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-05-02 16:14:05 +00:00
Mashijams
28cea299f7 xfs: return B_OK in xfs_free_dir_cookie() function instead of B_NOT_SUPPORTED
Change-Id: If9fa6deff9057653e7cb717fe9fe6ef1b0964c40
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6401
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-05-02 15:14:16 +00:00
John Scipione
f18d2effbf API Docs: Update BVolume::SetName()
Update \since to BeOS R4. This method definitely predates Haiku,
it has existed since at least R4.5 despite not being documented.

Document B_NAME_TOO_LONG return value.

Change-Id: I0816e4e89ae2710f6123e10ee41145a83fdca66f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6363
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-05-01 14:21:41 +00:00
X512
b3fc3bc71d kernel/arch/riscv64: disable debug stack trace when sending signal
Writing stack trace outside of kernel debug mode may cause locking
related assert violation.

Change-Id: I7c77dd8a8de2831d528b6307b19a576398c1edb9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5256
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2023-04-30 23:47:26 +00:00
X512
b01b40745e kernel/arch/riscv64: restore SSTATUS register first
It cause to disable interrupts needed for correct trap frame restore.

Change-Id: I8b60023c9a878eb147796e76adb344c377cfcf11
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5255
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: X512 <danger_mail@list.ru>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2023-04-30 23:46:57 +00:00
Augustin Cavalier
997adc7e61 kernel/fd: Add missing NULL checks in user_io routines.
I am not sure how this path could be hit besides having
O_APPEND set on a socket, which appears to be possible,
though I don't know what purpose that would serve.

Tested by adding these two lines between the sleep() and close()
in the in-tree tcp_connection_test:

fcntl(fd, F_SETFL, O_APPEND);
write(fd, "Hello", 5);

Before this commit, the above lines cause a KDL.

May fix #18133, but I don't presently have access to the
reproduction setup described in that ticket.
2023-04-29 20:01:30 -04:00
PulkoMandy
d1aa4a4295 Fix typo
Change-Id: I38b5496f8f1afac24e41f3408b10371e932a47f5
2023-04-29 22:46:03 +02:00
PulkoMandy
b289c1e406 Fix typo
Change-Id: I99137ae4d9cc40aa3142220191e7a0f638c60367
2023-04-29 22:46:03 +02:00
Máximo Castañeda
b00da680fb BTabView: remove obsolete code
Seems to come mostly from before the move to ControlLook, and it's not
been working for some time as the drawing rect passed now to
DrawInactiveTab is invalid in one direction. tabsBounds should be
initialized to tabFrame (as set before DrawTabFrame changes it), but
then BeControlLook would draw something we don't want.

If HaikuControlLook (or any other) wants something special for the last
tab, it should handle that itself using the tab indexes.

Change-Id: Iabecb27d1d30d91423c51e7bc03cf7906e530afe
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6397
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-04-29 16:15:13 +00:00
PulkoMandy
0ba60bc743 Move BarberPole from HaikuDepot to libshared
I want to use this in at least 2 third-party applications. I think it's
time to make it shared?

Change-Id: I855a59aab4ad6d47d77cf2901cb3dfc34c108059
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6296
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-04-29 16:11:43 +00:00
Máximo Castañeda
cd6e756df5 FlatControlLook: fix clipping
Remove ConstrainClippingRegion calls as they do not take into account
view transformations.
Clip drawing to the drawing rect, not the updated area.

Part of #12890

Change-Id: Icbc07f5431cf8ee826f28e6d5683135d1171d75a
2023-04-29 11:17:14 +02:00
Autocomitter
0357155683 Update translations from Pootle 2023-04-29 08:13:46 +00:00
Jessica Hamilton
e673ca9491 cdboot: add missing PCI x86 module.
Fixes #18391; introduced in hrev56936.

Change-Id: I7c2166f9f0198bbbfbd296a19679345cfb82302d
2023-04-28 23:55:39 +00:00
Augustin Cavalier
be8080575a IORequest: Refactor IOOperation transferred-bytes and status accounting.
Until the introduction of the nvme_disk driver, these classes were
mostly only used directly by the IO scheduler, and then a few direct
usages of IOOperation itself in the individual disk drivers; so
API confusions were easily missed.

When writing the nvme_disk driver's IORequest support, however, it
became readily apparent that there were some pretty bad confusions
around transferred-bytes accounting in IOOperation. This commit
attempts to resolve all of those.

There are two basic changes here:

1. Move transferred-bytes accounting into IOOperation::SetStatus.

The "TransferredBytes" field of IOOperation is against the *original*
range, not the actual operation's range (which will be wider, due to
bouncing, etc.), and furthermore only applies to the actual content
of the request (and not e.g. to a read half of a bounced write.)

These two facts meant that determining what value to pass to
SetTransferredBytes was not trivial, and was easy to get wrong.
I recall messing that up when working on nvme_disk multiple times
before reading the API carefully.

2. Do not pass redundant values to IORequest::OperationFinished.

All of the values here can be derived (albeit indirectly) from the
IOOperation, and all consumers of this API basically did just that.
Rather than make them do it, make the IORequest take care of
computing all of those values itself.

Change-Id: Ic9ae29e1100319e5b7647647c4db7e5aad4d125e
2023-04-28 14:59:21 -04:00
Oscar Lesta
8561b2c894 AboutSystem: update CPU info on replicant constructor.
This is similar to changes made in hrev56526 and hrev56815,
but for CPU related info this time.

Extracted some new _Get*() methods for the code that will get
called from both the normal and the replicant constructors
of SysInfoView.

Re-arranged the code a bit so the BStringViews get created /
updated in the order they appear on the GUI.

Change-Id: I2a371ec623e0b4d7497056fae6d5346b98d07ee2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6396
Reviewed-by: John Scipione <jscipione@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-04-28 18:37:13 +00:00
Augustin Cavalier
103c671ef0 AbstractModuleDevice: Add generic read/write hooks via "io" hook.
This substitutes for the already-existing behavior of scsi_cd, scsi_disk,
and virtio_block, so we can delete their hooks and let them use
these new generic fallbacks.

Some other drivers perform clamping, and so using these fallbacks would
constitute a behavioral change.

Change-Id: I9a2e503f2e03abc276bdfc02d1cff1565a9742e9
2023-04-27 16:24:08 -04:00
Augustin Cavalier
be67f14dcb mmc_disk: Refactor read/write/io hooks.
* Move geometry fetching to open(); it was not done
   in io() and was duplicated in multiple places.

 * Clean up clamping and bounds checking.

 * Use IORequest::TransferredBytes().

 Change-Id: I4157e516098dc0362c1478abd21a545c1f235cd7
2023-04-27 16:24:02 -04:00
Augustin Cavalier
e0f07d3ce0 IORequest: Add an assertion in SetTransferredBytes. 2023-04-27 15:20:17 -04:00
Augustin Cavalier
f64b099191 scsi & virtio: Clean up IORequest usage.
* Use TransferredBytes() instead of assuming length.
 * Consolidate checks and invoke io hook instead of scheduler directly.
2023-04-27 15:19:39 -04:00
Augustin Cavalier
8d2c997da2 nvme_disk: Add missing bounds check and adjust clamping. 2023-04-27 15:12:14 -04:00
John Scipione
fc12af740f netfs: Restore status_t result, fix build
result is being used on VisitReadQueryRequest().

It was not being used on ProcessQueryEvent() though
so leave that off still.

Change-Id: I8fbfbb3edef6ff962237f696fe315b66900b4376
2023-04-26 19:16:47 -04:00
mbrumbelow
7b3bfaf34f netfs: Removed 'result' variable
Return B_NO_MEMORY on error creating volumeIDs object
in VisitReadQueryRequest() and return nothing on error
in ProcessQueryEvent() because the method's return
value is void.

Change-Id: I23c6f12258a702b6ffff667639e01fdbac928d6d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6371
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-04-26 21:45:58 +00:00
Augustin Cavalier
8540053c8a xsi_message_queue & xsi_semaphore: Downgrade a lot of traces.
Reduces syslog spam.
2023-04-26 17:17:57 -04:00
Augustin Cavalier
d8f78afc8a xsi_message_queue: Permit incoming buffer to be NULL.
The user address space has not included NULL for a while, so this
has actually been broken for years, and nobody noticed. I guess
XSI message queues are not very well used?

Fixes the in-tree "xsi_msg_queue_test1".
2023-04-26 17:17:19 -04:00
Augustin Cavalier
6acd708e97 xsi_message_queue & xsi_semaphore: Use condition variables to wait.
This removes a lot of custom logic for managing waiting threads,
which was not even correct in all cases (and the code actually
acknowledged this with a big TODO about it, which weinhold
added all the way back in 2008!)
2023-04-26 17:16:07 -04:00
Augustin Cavalier
9747721a43 kernel/condition_variable: Add a fast-exit from Wait() for negative timeouts.
acquire_sem_etc does something very similar.
2023-04-26 17:12:24 -04:00
Augustin Cavalier
d8e4f52b78 kernel/condition_variable: Add a ConditionVariable::EntriesCount() routine.
Will be useful in changing the XSI subsystems to use condvars.
2023-04-26 17:08:15 -04:00
Augustin Cavalier
484bf053dc VMCache: Use THREAD_BLOCK_TYPE_OTHER_OBJECT.
This would have assisted in debugging #18390.
2023-04-26 15:34:24 -04:00
Augustin Cavalier
557f0446b3 kernel: Introduce THREAD_BLOCK_TYPE_OTHER_OBJECT.
THREAD_BLOCK_TYPE_OTHER implies the "object" pointer in the
wait information is a string. But sometimes we want to pass
through objects which are not strings, for inspection in KDL.
2023-04-26 15:33:53 -04:00
Augustin Cavalier
f5e531e92e kernel/thread_types: Remove Thread::condition_variable_entry.
Unused, and "struct PrivateConditionVariableEntry" no longer exists, anyway.
2023-04-26 15:32:20 -04:00
John Scipione
c7cd1bae68 BeControlLook: fix clipping rect, part of #12890
Change-Id: Ib3c29dd1ffba1f0456a5043b62d943123335e966
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6366
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-04-26 16:43:38 +00:00
Máximo Castañeda
e6a598a2f4 ControlLook: fix clipping
Remove ConstrainClippingRegion calls as they do not take into
account view transformations.
Clip drawing to the drawing rect, not the updated area.

Fixes #12890

Change-Id: Ie76cb83e0af03213008da78407de25261daea5df
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4457
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-04-26 10:41:04 +00:00
Autocomitter
af3dceb279 Update translations from Pootle 2023-04-26 06:31:10 +00:00
Augustin Cavalier
3c51bd6a2b libroot: Fix initialization of LocaleNumericDataBridge.
We need to store the isGlobal value, so that the destructor
can take care of unsetting the glibc locale properly.

It seems this has been broken since d338200e2b.

Fixes #18344 and probably #18336.
2023-04-25 15:55:42 -04:00