Commit Graph

65112 Commits

Author SHA1 Message Date
Augustin Cavalier
958b83c3ed PoorMan: Default to UTF-8 character set.
Ideally we would default to no character set, but
libhttpd does not seem to support that.

Fixes #18424.
2023-05-25 16:21:40 -04:00
Augustin Cavalier
c098332d7b usb_disk: Retry actions after reset_recovery.
This is mostly important for B_GET_MEDIA_STATUS, which actually will
retry actions if the err_act is set appropriately.

Following this change, stalls are now fully recoverable without causing
the file descriptors of the mounted partition to be cleared, and the
system can resume normal operation without a problem.

Fixes part of #15569.
May help with #16745, #18185, #17543, #18421.
2023-05-25 15:47:40 -04:00
Augustin Cavalier
0a9e5c9e58 usb_disk: Cancel queued transfers when clearing HALTs.
XHCI, at least, has "sticky" HALT states which must be cleared at
the controller level. Invoking cancel_queued_transfers takes care
of this.

This fixes USB disks spontaneously unmounting whenever stalls occur.
However, trying to read anything from the mounted partition results
in "Bad file descriptor", probably due to media-status error propagation.
2023-05-25 15:31:34 -04:00
Augustin Cavalier
1886d5692e XHCI: Handle an unlikely corner case in CancelQueuedTransfers.
See inline comment with reference to the XHCI specification.
2023-05-25 15:29:31 -04:00
Zardshard
400eedd0c8 leak_analyser.sh: Remove usage of obsolescent egrep
Change-Id: Ibd1228238901cb7b1e117e0c611be64046c14b4e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6472
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-05-25 17:38:55 +00:00
X512
b3e608ab9f keymaps/Japanese: Japanese keymap do not use Alt Gr key
Set modifier keys as following:
- Right Cmd -> Right Alt
- Right Opt -> Right Win

Change-Id: I61a193a7690fca8486ecd2c17eb672d24d69e241
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6471
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-05-25 17:38:43 +00:00
Augustin Cavalier
1a88b571ca pci/x86: Reimplement PCIe configuration mechanism using ECAM.
This allows us to drop the PCI-specific ACPI management entirely.
Confirmed working on x86, and the fallbacks when there is no ACPI
also still work.

Change-Id: I6dac9f5539f99b934b17b341634ce22628bc66fd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6470
Reviewed-by: X512 <danger_mail@list.ru>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-05-25 17:35:53 +00:00
Augustin Cavalier
19ae638fb6 pci/ecam: Fix reading config registers using ACPI method.
Also adjust end-address computation: we read up to 4 bytes past the offset.

Change-Id: I76343aba38cddb614394bd0dca1b36094b8dd85e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6469
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: X512 <danger_mail@list.ru>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-05-25 17:35:53 +00:00
Augustin Cavalier
769b4ee4aa XHCI: Implement support for MSI-X.
Works in QEMU, at least.
2023-05-24 15:42:59 -04:00
Augustin Cavalier
5dcae7c6b8 ECAM ACPI PCI controller: Fix computed length being unused for 32/64.
Amends 8be0a59e77.
2023-05-24 15:03:07 -04:00
PulkoMandy
8be0a59e77 ECAM ACPI PCI controller: handle missing address_length
On my machine, the address_length somehow is 0, but can be computed from
the minimum and maximum values.

Change-Id: I2262263915319e0d97a2cd9b9fde3f6af1f79a84
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5759
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-05-24 11:00:07 +00:00
PulkoMandy
4dbd474753 Add BIconUtils::GetSystemIcon
Allow to easily access the alert icons and anything that's added to app_server
resources.

Fixes #10887.

Convert BAlert, Debugger AlertWithCheckbox and Keymap ModifierKeysWindow
to make use of it, removing the duplicate code to locate app_server
resources.

The resources are initialized only once (per application), so there is no need
to reload them for every access to the icons.

In the ticket there is discussion about putting this in BControlLook,
but I think this should in fact be moved fully into app_server with
special drawing commands for well-known icons. That would avoid loading
and rendering the icon on the application side to then send it to
app_server (especially in remote_app_server case)?

In any case, this simple API can serve as a base for applications to
use, and we can change how it is implemented later on.

Change-Id: Id370526ae5cf165cfb8bc277bc8a7f46c26f542d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6463
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-05-24 10:58:48 +00:00
Zardshard
13f2f8de06 Icon-O-Matic: Move some functions to header files
Change-Id: I3b12e88e133cfe8e9b0f5830f69d582bbaaa93c2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6466
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-05-24 10:58:19 +00:00
Zardshard
41bd89a9fa Icon-O-Matic: Document the importer/exporter classes
Change-Id: I04e920e873efffa0756bb7d0391ac0f898128204
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6465
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-05-24 10:58:10 +00:00
Swangeon
2815686c1d network/tun: modify mtu and some checks to give correct types/flags
tun & tap tested

Change-Id: Ifac4ba40c56358ac9e845aa3d07cee75f1e8ce46
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6460
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2023-05-24 05:17:04 +00:00
Jérôme Duval
840faa402b strace: add network definitions
move select/poll to network.cpp

Change-Id: Ie70b2f5ae890b69db633ea5f45d2e8f0a2441a13
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6468
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-05-23 18:41:51 +00:00
Augustin Cavalier
c2e8b3177b usb_raw: Fetch default language before fetching string descriptors.
This fixes strange hangs that occur with some devices when fetching
their string descriptors with language-id "0".
2023-05-23 14:23:14 -04:00
Zardshard
943b5775f8 Icon-O-Matic: Fix memory leak
I found leak_analyser.sh and gave it a try. Indeed, it did find many
leaks, including this one.

Change-Id: I7d36274f3f7772aa459c4bf1d30392e7b8cfa171
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6467
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-05-23 15:47:34 +00:00
Augustin Cavalier
57d035af1c listusb: Dump Super-Speed Endpoint Companion descriptors. 2023-05-22 20:06:14 -04:00
Augustin Cavalier
ed01a46241 listusb: Split CDC listing into a separate file. 2023-05-22 19:53:10 -04:00
Augustin Cavalier
67df1af45a listusb: Fix verbose class/subclass/protocol printing.
There should always be a space between the hexadecimal number
and then the looked-up string.
2023-05-22 19:50:45 -04:00
Augustin Cavalier
bcc72455d3 freebsd_network: Add missing NULL check in get_usb_device_attach_arg.
May fix #18418.
2023-05-22 19:23:04 -04:00
Augustin Cavalier
605bd3f09d termios.h: Undefine/remove some unimplemented BeOS extensions.
We did not ever implement these, it seems, and so they are just
cluttering up the global namespace.

Change-Id: Ib37c3a31663525a18268c9bfe326bfba9afbc794
2023-05-22 18:20:17 -04:00
Augustin Cavalier
5d4fe207c7 scsi_disk: Remove unused blockShift and log2.
These were used when this driver was first introduced,
but are no longer.
2023-05-22 18:10:28 -04:00
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