The old TTY driver had one set of indexes for both master
and slave TTYs, and it used those indexes interchangeably.
We thus need to check both lists here also.
Fixes SSH passphrase prompts not working.
Page tables are 1KB aligned on ARMv7 so in some rare cases the
assertion for checking page alignment could trigger.
This change introduces an offsetting mechanism similar to GetPageTableAt.
Change-Id: Ibf5cf60d35573143fa7c750ef9e3627f693005a7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6423
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
This new driver uses the "generic" TTY layer, unlike the old driver
which had its own implementation (which the generic module was derived
from, originally.)
The remaining bits of support for controlling TTYs is added to the kernel &
generic layer at the same time, which should allow for serial interfaces
to be controlling terminals now, as well.
Tested with bash, nano, vim; all seems to still be working as expected.
This was used by the BeOS port of ncurses, as well as our own ncurses
port until not too long before the alpha1 days, so we should keep it
around for compatibility.
Implementation copied directly from the "legacy" TTY driver.
It doesn't make much sense to have separate window sizes, termios, etc.
settings for the two halves of a TTY. Moreover, having separate settings
which can get out of sync breaks applications, e.g. double-printing
in shells.
The original TTY driver has unified settings. It seems likely that the
settings were separated as part of the locking simplification, however
the lock separation was reverted a while back, anyway.
This allows, for example, to skip all the "get debug info" alerts when
starting a debug session. But it is a generic implementation and will
work for all "question" alerts in Debugger.
For now, the user choices are not saved, this could be done, but then we
need a way to access that setting later.
Fixes#14601
Change-Id: Icc49d1b5bc4168d15d7f740d422f464e996f7c9d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6398
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
... such as virtual directories or read-only media.
Also applies to open/save panels.
Menu items disabled on read-only volumes:
* New >
* Duplicate
* Move to Trash
* Move To >
* Cut
* Paste
Other reasons a menu item is disabled:
* Duplicate, Move To Trash, Cut, Copy, Move to >,
Copy to >, Create link > and Identify require a
selection.
* Paste requires something in your clipboard.
* Edit name requires a single item is selected.
Edit name is permitted on a read-only volume so
that you may copy the name. However the name is
not editable, you may only select and copy.
Pop system folder warning dialog on Edit name
commit instead, this way you won't see the dialog
if you just want to copy the name.
Move "Create link here" option last in the right-
click drag menu. Disable "Move here" if source or
dest is read-only, rest if dest is read-only.
Ignore Paste to virtual directory, (even more)
but permit Edit name.
Allow drag-and-drop to virtual directory but alert
and disable all right-click drag menu items like
other read-only directories.
Tint window backgrounds on all read-only windows
darker, not just on virtual and query folders.
Automatically switch the background color as you
navigate in and out of read-only folders.
Fix highlight color on column resize when background
color is not white. Fix "reverse video" effect so
that the highlight color is the inverse of the
background color. On Desktop however, highlight
color is always black or white.
Do not alter focus in save dialogs after initial
focus on the file name because focus on the pose
view is required for cut/copy/paste to work.
Make Edit Name work in file open/save dialogs and
make Cut/Copy/Paste work while editing file name.
Make Select all work in Edit name.
Duplicate code cleanup:
NameAttributeText::CommitEditedTextFlavor() and
HeaderView::FinishEditingTitle() call common
EditModelName() function in FSUtils.
RealNameAttributeText inherits from
NameAttributeText and calls its inherited
CommitEditedTextFlavor() method.
The alert text is defined in just one place in
FSUtils ShouldEditRefName() instead of three.
Consequently file name changed in the info window
can now be undone.
Change-Id: I3a78960057b8fb42d1f71af2ec3c808754c9b314
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6357
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
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>
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>
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>
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>
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>
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>
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>
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>
... 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>
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>
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>
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>
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>
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.
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>
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>
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
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
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>
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
* 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