Commit Graph

65188 Commits

Author SHA1 Message Date
Trung Nguyen
74d2e61ee2 kernel/vm: Make cut_area respect overcommitting flag
`cut_area` now checks the protection of the target area for
the `B_OVERCOMMITTING_AREA` flag and sets it on any cache it
creates. This allows operations that split large overcommitting
areas to succeed.

Change-Id: I8dee27d22df29741cc61af2575c9e6626da25949
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6391
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-05-20 16:45:58 +00:00
Humdinger
1de4fd177c Touchpad prefs: sentence casing
Change-Id: I632ac1983880aac4ab77f85dca14c898dce4c959
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6464
Reviewed-by: humdinger <humdingerb@gmail.com>
2023-05-20 15:50:28 +00:00
John Scipione
fb1d071e14 Deskbar: Increase Twitcher team icon size from 32 to 48
Change-Id: Id9029295314f0d52df2f4a71a2ce3142f46a0947
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6414
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-05-20 15:08:20 +00:00
John Scipione
a656120f1f Deskbar: Center Twitcher window 1/16 screen height above center line
Change-Id: Ia829f9077afc0a12cb34d12b1cd8eccea2bba741
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6413
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-05-20 15:08:20 +00:00
John Scipione
fb885767b6 Deskbar: Use hvif window icons & scale with font
Add vector rdefs for shown, hidden, shown switch
and hidden switch icons. Remove unused bitmap
resources. Add window switch vector icons to
artwork.

Create window icon cache in TBarApp and cache the
window icons based on font size.
Fixes memory leak in #18357.

Don't draw off-workspace lines in Switcher, use
switch icon for that instead. Fixes crash reported
in #18359. Position icon and window name better in
Switcher.

Put BarTeamInfo icon parameter last and make it
optional, the icon gets set by caching.

Enable team icon cache and window icon cache.

Fixes #14694

Deskbar: Scale Twitcher icons based on font size

Remove the point ctor parameter and deprecate the
switcherLoc setting by not using or setting it and
leaving it at its default value.

Center window on screen resolution change and
workspace change (as resolution may not match).

Fixes #17924

Change-Id: Ib63cc307f14cda397ffb66ea74091be59e6e5535
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6335
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-20 15:08:20 +00:00
PulkoMandy
217bbbf423 Debugger: fix empty button on alerts with only 2 buttons
When no debuginfo is available from packages, the alert has only two
buttons. This was not handled correctly, leading to a small empty button
being present.

Change-Id: I44de1101f7cd539da5c582eaf34bb1476aa9ab20
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6462
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-05-20 14:52:26 +00:00
PulkoMandy
6a06a56256 Debugger: fix width of alert for short messages
Don't force a larger min size if the message is short enough.

To do this:
- Get the TextRect without word wrapping
- If that is small enough, nothing to do
- If that is too wide, set a minimal size that will be used for the word wrapping so the alert
  doesn't get too large and also doesn't get too narrow

Fixes #18404

Change-Id: Iee2704377180510edf7bdf930583b8a7cc47ef2e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6461
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-05-20 14:52:26 +00:00
X512
ef240bfffa makefile-engine: fix for riscv64
Change-Id: I85c18ce812db65606ef6aba64f81b80872618263
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4317
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-05-20 14:05:57 +00:00
Autocomitter
35a88355ad Update translations from Pootle 2023-05-20 08:11:06 +00:00
Jérôme Duval
ec97248c2a tcp: handle linger with zero timeout
ReadData() should return the current error on closed state, not always not connected.

Change-Id: I286ac1dd9ded127e8658ceb61088783b9993eacf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6459
Reviewed-by: Rene Gollent <rene@gollent.com>
2023-05-19 18:55:04 +00:00
Jérôme Duval
740f3ca4ae net_socket: binding on the same socket should return an error
Change-Id: I7b948435f6e4009d9c11d2163172ad0ab6484e1d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6458
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-05-19 18:55:04 +00:00
Jérôme Duval
e5f221f598 ipv4: bind() should return EADDRNOTAVAIL when the address isn't available
"EADDRNOTAVAIL: The specified address is not available from the local machine."

Change-Id: Ic306acc60459f5b518eb53f4123c5e3a255b178e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6457
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-05-19 18:55:04 +00:00
Jérôme Duval
b7d9790fc2 unix: accept() shouldn't return B_TIMEOUT but B_WOULD_BLOCK
it's already handled when breaking the loop.

Change-Id: I47aa8105ff32e97aa4e1c0b2e9292e4516ee155a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6456
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-05-19 18:55:04 +00:00
Jérôme Duval
fc13358aca net_socket: getpeername: IsConnected() when parent is not set
this fixes a test in libuv

Change-Id: I3002f9c44794ff3f8215ebc000fefa0f90b80279
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6455
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-05-19 18:55:04 +00:00
Jérôme Duval
9c1af36c30 tcp: report disconnected events for tcp
* FIONREAD shouldn't report errors, only EINVAL when listening
* read available data in closing and closing-wait states
* fix #18327

Change-Id: Idd53a043a72ef6c7b282ea669895ff2e947adbb4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6420
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-05-19 18:55:04 +00:00
Jérôme Duval
30d2a5e189 kernel/fifo: just send a disconnect for readers without writers.
just send an error for writers without readers

Change-Id: I4808e5dec29c840b72423a1bb10cb8f0ebc23bb5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6419
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-05-19 18:55:04 +00:00
Jérôme Duval
030814a8fc kernel/wait_for_objects: make select() watch more events
read: read + disconnect + error
write: write + error

Change-Id: I68a0cfc47b155d56a69e459f0dda1736c3a2a215
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6418
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-05-19 18:55:04 +00:00
Jérôme Duval
702e7b011c kernel/fifo: fix commands like "tail -f file | grep"
'tail' selects read events on its write-only file descriptors,
so let's use B_SELECT_READ only for read-write file descriptors.

Change-Id: I5bb3837f82a7b06ec367fe871c15d67beb2d412c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6417
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-05-19 18:55:04 +00:00
Zardshard
74dc1de3a3 libicon: Add tool to encode/decode custom float format
I've encoded and decoded the HVIF format's custom three byte float
format by hand several times by now. This adds a python tool to
automatically encode and decode these.

Change-Id: I92cc1697a0b4fc3b55bb20a5bbcf6e93e3c0738b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6448
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-05-19 15:35:59 +00:00
Jérôme Duval
fa82fcc532 ifconfig: check the family is available
* fixes #6489
* fixes 64-bit warnings

Change-Id: I6ddfee8ec418881fddc0561b8b464a7d739dec9e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6454
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-05-19 15:35:00 +00:00
Jérôme Duval
4e9653027d net_stack: for local delivery, also capture packets when enabled
the packet capture expects frames: prepend an ethernet header for the capture.

Change-Id: I3d09da2a5a6924a545cc4fbc9dd1577bd3248226
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6452
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-05-19 15:33:09 +00:00
Jérôme Duval
e2b57695fc loopback_frame: apply an ethernet header for packet capture
* the packet capture expects frames, so loopback_frame should actually apply framing and deframing
for loopback packets.
* datalink: set the address for host routes
* device_interfaces: call the deframing if any in device_enqueue_buffer()
tested with ping 127.0.0.1 and ping6 ::1, while removing the local flag on both routes.

Change-Id: I2085735bdac3bb85908189a2e1acb2540818c7bd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6451
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-05-19 15:33:09 +00:00
Jérôme Duval
9ef39f3c0c icmp6,ipv6_datagram: disable tracing
Change-Id: Idb7593c3463c79dc4caff27b427e970c7fe94a8b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6453
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2023-05-19 12:21:20 +00:00
Humdinger
80c9f890df Tracker: improved strings
* For these error messages, asking to try with another/shorter file name
  is unnecessary, because obvious.

* Distinguish file and folder name in alert text.

* Remove the "r" shortcut. There's only one OK button which already is
  the default and therefore triggered with ENTER. Why 'r' anyway...?

Change-Id: I608ea1505ae51605d4a1b644e5468990a4300683
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6437
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-18 17:19:18 +00:00
Alexander von Gluck IV
ae4d11a4d2 icons: Add dedicated patch file icon
Change-Id: I85c13054b403a94e6ed6b30eefbdac6b50685461
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6447
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-05-18 10:46:19 +00:00
Zardshard
8ffe04780d Icon-O-Matic: Remove unused function parameter
Change-Id: Idbcddacb54597eb10c95de3db2b08067e507bbda
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6446
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-05-18 10:45:45 +00:00
Zardshard
496d59e107 Icon-O-Matic: Document the document saver classes
Change-Id: I1985108bbc4e1030b2dc0e94cfb1c0706b1806a4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6442
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-05-18 10:45:21 +00:00
David Karoly
d38dcdde74 kernel/arm/paging: implement Accessed flag querying
Change-Id: I519235124bbc93d41eec4be3e773576758a575a7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6445
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-05-17 19:32:29 +00:00
David Karoly
cce0386a4d kernel/arm/paging: implement Accessed Flag handling
Change-Id: Ida5f8faa538df9244e44ef30a73b61b2ffb693af
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6444
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-05-17 19:32:29 +00:00
David Karoly
0d5bde4295 kernel/arm/paging: remove empty code block related to global pages
Change-Id: I2f8b9da371cb4e2e496e985035bda78b139ff8e4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6443
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2023-05-17 19:32:15 +00:00
Trung Nguyen
b809279cd8 kernel/team: Allow retrieving more attributes
- Stored the additional start time of each team, expressed by
milliseconds since boot.
- Added more fields to the `team_info` structure. These field
include those provided by the `get_extended_team_info` syscall as
well as the newly introduced `start_time`.
- Extended the `_kern_get_team_info` system call to receive an
additional `size_t` argument. If this size is smaller than or
equal to the size of the old `team_info` structure, the newly
added attributes will not be retrieved.

Change-Id: I22ee6b91ad2ee3b66a7f770036c79a718c5f115c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6390
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
2023-05-17 11:07:14 +00:00
X512
fe3f797dc8 kernel: fully remove arch_check_syscall_restart
Currently there are only stub implementations that are never used.

Change-Id: I00dc42cad7d24f40761b93e325d3df8683745b57
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6441
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-05-17 05:34:59 +00:00
David Karoly
290e43c06e boot/efi/arm: enable access flag
Change-Id: I29bfc2183f180291d6a1a9b11d1d6fd2dce4878d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6438
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-05-16 18:07:55 +00:00
David Karoly
84745ade1b kernel/arm/paging: use simplified permission model
Change-Id: Ie0ed357ee9ca5bee4c10c6cbf74eaba77acdd179
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6435
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: David Karoly <karolyd577@gmail.com>
2023-05-16 18:07:45 +00:00
David Karoly
c10c49daf7 kernel/arm64: refactor TLS initialization
Change-Id: I3022749d49ca4159ef2e3c129178be12f8b3b972
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6440
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2023-05-14 19:18:31 +00:00
David Karoly
191eff4135 kernel/arm: remove unused function arch_check_syscall_restart
Change-Id: I5cb8643937cf1dccfce21dbb1478b0468e99a7e8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6439
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2023-05-14 19:15:40 +00:00
Autocomitter
e82f2e1943 Update translations from Pootle 2023-05-13 08:13:54 +00:00
Trung Nguyen
b197dcbafa tty: Implement exclusive mode
Implemented exclusive mode on Haiku and added the related `ioctl`
operations (`TIOCEXCL` and `TIOCNXCL`).

Change-Id: Iaa201ea20eec0e45d02dd5db9ba6aa35fd27dfb2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6387
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
2023-05-13 00:41:16 +00:00
Trung Nguyen
bbd6beb7ee kernel/vm: Allow more maximum protection for mmap'ed areas
Always allow a memory region mapped by `map_file` to change its
protection to any user protection flags other than `B_WRITE_AREA`.
This flag should only be settable when the file is opened with
write access.

Change-Id: Icc00c08fc033b3bd6b6ceb2833bf566c72914007
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6389
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: John Scipione <jscipione@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-05-12 16:43:48 +00:00
Máximo Castañeda
44233abf11 Painter: change to a solid pattern for gradients
Gradients don't use patterns, but then some common drawing code makes
decisions based on them. Let's set the pattern to B_SOLID_HIGH so that
we get the expected result, in particular one that does not depend on
the last pattern used by a previous operation.

Fixes #18370.

Change-Id: I9d71c6d334d77be8fe4783a072b8df519486d74e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6416
Reviewed-by: John Scipione <jscipione@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2023-05-12 09:15:12 +00:00
Trung Nguyen
412bcb11fd kernel/vm: Fix area_for with PROT_NONE address
Do not assume "no user protection" means "kernel area".

This allows calls to `area_for` for addresses with protection 0
to work properly.

Change-Id: I54cbcc154d10b63359a2e1233f0c0f45d0d8e21e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6388
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-05-11 15:08:35 +00:00
David Karoly
786c14d06d boot/arm64: set trace level with constexprs
Change-Id: I8d37065cd84476b07df4756659bb011c2b877397
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6434
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-05-11 11:24:17 +00:00
Trung Nguyen
d97ad7c4dc termios: New ioctl: TIOCOUTQ
Change-Id: I86f2a7b007137e22cf7d6fc8ad6675ff5de267d4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6386
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
2023-05-11 02:57:36 +00:00
Trung Nguyen
568b8f9395 headers/posix: Add TIOCM_RNG as a synonym for TIOCM_RI
dotnet uses it.

Change-Id: Ie5658263a0fd9c0aa833cc468ddcafe08116a30d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6385
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
2023-05-11 02:55:38 +00:00
X512
6550124ea0 riscv64: implement memory barriers
Change-Id: Ied9e6dad38968cee6e828dff6ec413e6281086cd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6436
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-05-10 20:55:18 +00:00
Augustin Cavalier
88306be95c drivers/pty: Check slave TTYs also in get_tty_index.
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.
2023-05-10 12:59:13 -04:00
Augustin Cavalier
071ff801ee BSerialPort: Implement WaitForInput() using wait_for_objects.
Fixes #17867.

Change-Id: Ib59781128d5d21317c4042f250333b177a0ed91b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6432
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-05-09 23:33:43 +00:00
David Karoly
54fc4c3c49 boot/arm: set trace level with constexprs
Change-Id: Ib5671238cd9c442f9948c6bee2aff30cbfbff0f0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6427
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: X512 <danger_mail@list.ru>
2023-05-09 21:09:11 +00:00
David Karoly
6c58b765f3 kernel/arm: use inline functions for accessing coproc registers
Change-Id: I626ef5722f4ae043de9e8b0c37dbde97ac0513be
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6422
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-05-09 20:50:42 +00:00
David Karoly
9875f74d65 kernel/arm/paging: fix alignment issue in InterruptGetPageTableAt
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>
2023-05-09 20:10:32 +00:00