Commit Graph
65544 Commits
Author SHA1 Message Date
Humdinger 32ed03a521 ShowImage: Add "Open with..." menu
Populate a new sub-menu with all applications that support the current
image's MIME type. Launch the chosen app with the image entry_ref as
B_REFS_RECEIVED message.

The sub-menu listing supporting apps is separated into apps supporting
the supertype ("image/" and full support (e.g. "image/png").

Add the new "Open with..." menu to the "File" menu and the context menu
of the image.

Most of the code was grabbed from the FileType prefs PreferredAppMenu,
therefore its copyright was copied and extended.

Change-Id: I0190cf4b78c59e429f4e67654665598340653c5d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7072
Reviewed-by: Axel Dörfler <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2023-11-01 03:20:30 +00:00
Axel Dörfler e39fc9c4bd DiskProbe: Make FindWindow use BLayoutBuilder
* No other functional change intended.

Change-Id: I2f95e66ce79ed0a26bb848973466227e80620171
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7086
Reviewed-by: waddlesplash <[email protected]>
2023-11-01 03:01:23 +00:00
Jérôme Duval 53e2dc0f85 kernel/x86_64: clear any pending exceptions on #MF
* also on x86 for simplicity.
* fixes #18624
* also makes x87 FPU data registers available for x87 floating instructions. EMMS is cheap.
see https://github.com/cloudius-systems/osv/commit/25209d81f7b872111beb02ab9758f0d86898ec6b

Change-Id: I5c1b399377102f3eb10bc6d7f7247afbaf6d8483
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7089
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2023-10-31 18:15:42 +00:00
Alexander von Gluck IV 106388ddbf 3rdparty/cloud: Minor cleanup to gcp sysprep script
Change-Id: I64081e18ebb64b58223b5f693339d82820bb6ccb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7087
Reviewed-by: Alex von Gluck IV <[email protected]>
2023-10-31 15:47:27 +00:00
Augustin Cavalier eb4d2229f0 Debugger: Select "local" interface if none specified in MSG_DEBUG_THIS_TEAM.
The debug_server sends MSG_DEBUG_THIS_TEAM but of course it doesn't
have a way to specify the internal interface pointer. We should thus
assume the local one is implied.

Fixes #18645, which is not a regression but has been the case since
the initial host-interface refactors years ago, apparently.

Change-Id: I48078232f154f2f8f7cdf28792d39ae58471ce19
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7074
Reviewed-by: Jérôme Duval <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2023-10-30 23:57:14 +00:00
Jérôme Duval 208006054c kernel/vm: put pages in order on the clear page queue
possibly help with #15789:
I was testing virtual_block devices with dd, and noticed it didn't work with higher block sizes.
Indeed the driver was passing a list of single pages, very inefficient. To be remarked is that
the physical pages were reversed in memory, causing get_memory_map to provide a map of single pages.
What happens: dd fills up the buffer from 0 until the block size, causing soft faults for still unmapped
pages. Each fault maps a cleared physical page out of the clear page queue. This means that some page runs
are actually put reversed in the clear page queue, which this commit fixes.

Change-Id: I36395849c7f13086b44a1b284cc0c858d8c29f75
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7081
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: Axel Dörfler <[email protected]>
2023-10-30 19:04:51 +00:00
Jérôme Duval 1a497824d8 ext2: recalculate extent metadata checksum each time the metadata changes.
this fixes an assert when reading extents written in Haiku.

Change-Id: Iba2cc3b35ed6886db0749a0f50b24053def5aac3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7079
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2023-10-30 09:16:07 +00:00
Jérôme Duval 6dd8733058 ext2: ext2_rename(): if the target exists, it should be unlinked.
* the target inode would still exist, unreferenced.
* also remove from entry_cache.
* this fixes fsck complaining about unreferenced inodes.

Change-Id: I4d48d6bf89bdd37d366da0ae4795e42bcc0532d9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7078
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2023-10-30 09:16:07 +00:00
Jérôme Duval 7b97f05bb9 ext2: DirectoryIterator: the dotdot entry size is the entry block minus what comes before.
* the problem appears after the directory has been splitted.
* this fixes fsck complaining about an invalid directory entry.

Change-Id: I1566a279fc6438cb735439be002c634882e5a83b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7077
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2023-10-30 09:16:07 +00:00
Jérôme Duval 3319ef3f8e ext2: BitmapBlock::FindPreviousMarked(): index shouldn't go negative
fix #14404

Change-Id: I831c7d5cabbb804ab74d582caafb1d6cd281ca34
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7076
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2023-10-30 09:16:07 +00:00
Niels Sascha Reedijk f8d7e36f00 UI text: minor fixes to strings (courtesy of jt15s)
Change-Id: Iebeb64eeea2fd98cf0f7a86be759939d86b600b3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7083
Reviewed-by: humdinger humdinger <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Niels Sascha Reedijk <[email protected]>
2023-10-30 06:31:27 +00:00
Niels Sascha Reedijk e1c4049fed cross-compiler image: update to newer bookworm-slim Debian base image
Change-Id: I1770093c91ed00e4bbae58f44ad7f86874ec0512
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7082
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2023-10-30 06:31:27 +00:00
Andrew Lindesay 3538133f9f HaikuDepot: Log Process Report
To make it easier to understand what process
elements are taking a long time to run, a
small simple report is output as debug log
at completion of a process.

Change-Id: I09b93c494961e7abbbd22a3c58c64631f08025af
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7075
Reviewed-by: Jérôme Duval <[email protected]>
2023-10-29 23:29:42 +00:00
Augustin Cavalier e8d328979c ICUTimeConversion: Fix buffer overflows and add more error handling.
* Declare databridge buffer lengths in LocaleBackend.
 * Use strcpy instead of strlcpy when writing to databridge buffers
   (this is the first fix for #18598.)
 * Check for overflows and error out when they happen.
 * Verify that ICU actually knows the timezone in question
   and fall back to GMT if it does not (this would also fix that crash.)

Fixes #18598.
2023-10-28 16:36:12 -04:00
Augustin Cavalier c199c568de DebugAnalyzer: Fix -Werror=mismatched-new-delete. 2023-10-28 14:20:31 -04:00
Autocomitter 23486c0db3 Update translations from Pootle 2023-10-28 08:20:11 +00:00
Andrew Lindesay e526b61813 HaikuDepot: Avoid Corrupt Username (2)
Previous changes removed the ability to supply
control characters at the start and end of a
nickname; this change removes them from anywhere
in the nickname when supplied.

Change-Id: I0631fffa8aaf2c0e267c777892044c53faa4334e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7071
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
2023-10-27 11:15:07 +00:00
Andrew Lindesay b02777c1a8 HaikuDepot: Avoid Corrupt Username
If the user happened to enter control characters into
their username when authenticating then the username
may cause problems later when communicating back to
the server. This is a hard problem to diagnose and
this commit will remove the problem.

Change-Id: Iad3c24f16cc6799ad8ddad634b8621a0aaadb921
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7067
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2023-10-26 16:44:38 +00:00
PulkoMandy 0822ec27a9 libicon: Fix dangling references to VertexSource in PathTransformer
PathTransformer keeps a reference to the VertexSource used (which can be
either another PathTransformer, or the base path for a shape). When a
shape is cloned, this should be retargetted to the new object in the
clone.

However, references are not settable, and so, what would happen instead
is the original (non-cloned) vertex source was reinitialized (through
the default implementation of the assignment operator) using data from
the clone, and the clone would still point to it. Then, if the original
object is deleted, the clone would point to freed memory.

To avoid this problem, replace the reference with a pointer (which can
be set to point elsewhere, as the code intended to do). To make sure
this does not happen again, make the VertexSource copy constructor and
assignment operator private, and deleted when the compiler supports
that.

Fixes #18577

Change-Id: I8870d9471c5064e922a84eff8447cbda783b13e6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7052
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Zardshard <[email protected]>
2023-10-26 12:34:24 +00:00
PulkoMandy 51355272b3 ArchitecturesRules: error on use of deprecated functions
The previous commits have cleaned all the remaining ones.

Change-Id: I6b12ba4f23779f3e2e4fd5a00c6acfaaeb50f4d6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6804
Reviewed-by: Fredrik Holmqvist <[email protected]>
2023-10-26 10:50:02 +00:00
PulkoMandy 9858be4f63 ffmpeg: remove usage of deprecated method avcodec_decode_audio4
Use avcodec_send_packet and avcodec_receive_frame as recommended in
ffmpeg documentation.

Change-Id: Ib9dc343a9f5cfbc50192158934e5e80c09a37fab
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6803
Reviewed-by: Adrien Destugues <[email protected]>
2023-10-26 10:50:02 +00:00
Humdinger 6de9c42da6 BootManager: improved layouting
Addresses #15418 without completely solving it.
At least for font sizes >= 11 points it works mostly. Buttons are
no longer cut off, though the summary page showing all partitions
is taller than necessary for > 3 partitions, esp. for smaller font
sizes.

Views aren't vertically centered at least.

Change-Id: Id6224b83f27510c9ed45e303f0b5dabf47af0574
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7062
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2023-10-26 07:56:47 +00:00
JackBurton79 3c3462995f AbstractSpinner: fix calling base class virtual methods (untested)
AbstractSpinner inherits from BControl, so it should call BControl's virtual methods, not BView's.
Found by Andrea Anzani

Change-Id: If4c921d91a5095769d5f2da1832ad5bf4533becc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7066
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2023-10-26 07:55:51 +00:00
PulkoMandy 538f9a182c MIDI kit: remove obsolete comment
The function used to be "not supported", but now it is implemented.

So, the comment about printing a "not supported" message for debugging
is obsolete and can be removed.

Change-Id: I2db26ef5a59e6e04bf903a29563d88d1d98fc303
2023-10-26 09:41:34 +02:00
Augustin Cavalier bb2808d615 bootloader: Implement TSC calibration via hypervisor CPUID leaf.
While debugging some problems on the HaikuPorts build VMs, mmlr
noticed their clocks had an alarming amount of drift. This prompted
an investigation into TSC calibration mechanisms, and the discovery
that there is a VM-specific one which we did not implement.

This mechanism is more accurate than counting cycles on VMs where
cycles can be "stolen" (the probable cause of the aforementioned
clock drift.)

Tested in VMware (works out of the box) and on QEMU/KVM
(may need TSC frequency specified or a host with invariant TSC.)

Change-Id: I4ccfdb2e4e2621404ec9026e7106c02bf96faf18
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7063
Reviewed-by: waddlesplash <[email protected]>
2023-10-25 00:53:55 +00:00
Augustin Cavalier b8fbb723ea fs_shell: Use UINTPTR_MAX not LONG_MAX.
Fixes the build after the previous commit.
2023-10-24 19:16:19 -04:00
JackBurton79 4b3e80f6b5 Fix build on arm64 (and other 64 bit non x86 platforms, probably)
Change-Id: I0b09ab8925244746eded66de924d9dbf36693c22
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7064
Reviewed-by: waddlesplash <[email protected]>
2023-10-24 22:26:23 +00:00
David Karoly 9435152cbb Debugger: implement ReadU24
Change-Id: I1385b935f229da51df959fd7644a9cd2d36e0e25
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7058
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
2023-10-24 17:15:25 +00:00
Augustin Cavalier 5c040b731c People: Fix buffer overflow in string handling.
Also move some variable declarations closer to their usages.

Fixes #18618.
2023-10-23 22:15:27 -04:00
Augustin Cavalier de9f473cda Terminal: Colors are stored using untranslated names.
The previous code did not work on non-English locales,
a problem readily detectable when running in Terminal
inside a Terminal session, e.g.:

PrefHandler::getRGB(Hintergrund) - key not found

Fixes #18614.
2023-10-23 21:29:12 -04:00
Vladimir Serbinenko 782bb0fea1 ufs2: Fix compilation of ufs2_shell
Change-Id: Ib92666d70aabd68df7218600f84c32dbd86c974b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7061
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2023-10-23 23:02:10 +00:00
Vladimir Serbinenko a5bda648dd ufs2: Fix computation of partition size
Change-Id: If8e82b85c51db150c04d44ad11e0e82b29e14373
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7060
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2023-10-23 23:02:10 +00:00
Alexander von Gluck IV dd04895cfa build: retry-on-host-error while downloading files
* We might as well "try as hard as we can" to get build files.
* With this setting, DNS resolution errors count as retryable
  errors.  wget will retry to get files up to 20 times by default.
* Should improve build relability on less-than-ideal network
  connections. (aka, a brief network disconnection shouldn't stop
  a local build if possible)

Change-Id: I39652fafb5eee237c463e1b777b1057ee1d53db1
2023-10-22 09:36:47 -05:00
Autocomitter 2dbdfc7635 Update translations from Pootle 2023-10-21 08:29:40 +00:00
Andrew Lindesay 08a5804d6f HaikuDepot: resolve occasional segfault in logging
From time to time there is a segfault seemingly coming from the log
macros. This seems to be coming from some logic to get a single
character to denote the level of the log line. This commit simplifies
that expression which seems to have resolved the problem.

Change-Id: I8d5325feb6d534ec38c653397585318b5dcbad39
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7057
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2023-10-19 15:41:20 +00:00
Andrew Lindesay bf697877c1 HaikuDepot: fix issue for user check
On startup the application will check a users' credentials work; if
not then it will log them out. This was broken after the move to
token-based authentication and this commit will fix that.

Change-Id: Ic9460b668422312ed5a856a92c5b99d9bd724801
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7056
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2023-10-19 15:40:52 +00:00
Andrew Lindesay 338b492e0e HaikuDepot: minor performance improvement
Owing to the larger number of files involved, reducing the `stat`
operations from two to one seems to make some difference to the
performance.

Change-Id: Ia4f92e23a90967bbd12735a81be8ceecc605e385
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7055
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2023-10-19 15:23:00 +00:00
Humdinger de1e2d9227 BSpinner: Simplify SetMin|MaxValue()
After the last change, korli suggested this simplification that lets
SetValue() do all the in/decrement-widget en/disabling.

Change-Id: If87579d9104bbc9ae279aa5f2f99c9921bb238ea
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7053
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2023-10-19 08:14:12 +00:00
John Scipione ac121994b1 Deskbar: Set sub-menus to menu font
Top level "menu" still uses be_plain_font, submenus use menu font.
Window submenus use menu font, but in super-expando mode they use
the plain font since they are on top level.

Change-Id: I704e9baa1ec46d1cbf7b9401ba4e49b5e2dff27c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7041
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2023-10-18 08:25:01 +00:00
Gerasim Troeglazov 554dc8b060 VideoWindow add-on: Fix add-on loading (Remove unnecessary check) 2023-10-18 10:05:20 +10:00
Humdinger ad7c4e2dbd BSpinner: Fix in/decrease widget behavior
Say you have a BSpinner with a fValue of 10 and a fMaxValue of 10.
The +-widget is correctly disabled.
If you now set the fMaxValue to 20, the +-widget stays disabled.

With this change the state of the +/- widgets are set correctly when
the Max/MinValues are changed.

Change-Id: I4dce7f0ecd6aee8e9b562618ec1367dbeb212dc4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7050
Reviewed-by: waddlesplash <[email protected]>
2023-10-17 15:19:52 +00:00
Jérôme Duval 8b5675204c virtio_block: serialize requests, copy using user_memcpy
fix #18621 #18286

Change-Id: Ia1ecb1b3623b10b42bf6153bdbabb7053179ee3d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7048
Reviewed-by: waddlesplash <[email protected]>
2023-10-16 20:05:08 +00:00
Jérôme Duval 0decdc641e virtio_pci: fix support for MSI-X shared
remove support for MSI

Change-Id: I8049030b2febd3558a7710cfd89db03a17cb5f7f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7036
Reviewed-by: waddlesplash <[email protected]>
2023-10-15 13:02:41 +00:00
Jérôme Duval 6d42b430d1 virtio: support modern devices
fixes #17239 #17238

Change-Id: Ia5b6347110a60fab18852079b30dca6301010474
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6995
Reviewed-by: Jérôme Duval <[email protected]>
2023-10-15 13:02:41 +00:00
Alexander von Gluck IV 518e9cb9f2 radeon_hd: Add missing USB C connector type
* Solves a few "Unknown connector" errors on newer cards.
* It's just another physical name for DisplayPort

Change-Id: I37a6f1bb1db66279b305bdbce3c200612eac1130
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7042
Reviewed-by: Alex von Gluck IV <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2023-10-14 17:19:12 +00:00
Autocomitter 9ded6e6a33 Update translations from Pootle 2023-10-14 08:21:54 +00:00
Augustin Cavalier 8764a29843 build/jam: Only add C++ header directories to include path for C++ code.
There are now some system headers (e.g. <stdatomic.h>) that have outright
different versions for C and C++ which are not compatible with each other.

Change-Id: Ibf797e0817f0fe4d5241424d7d06023b19888c02
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6991
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2023-10-13 16:18:47 +00:00
David Karoly d5be5b61c5 Debugger: handle call_site similarly to GNU_call_site
Change-Id: I37c6a2903bd5001c03b86aa09f1d2d04ab87365e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7040
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2023-10-13 10:51:23 +00:00
David Karoly 7dec7afe4b Debugger: add DWARF5 attribute and form definitions
Introduce new attribute classes:
* addrptr represents an offset into the .debug_addr_section
* loclist represents an offset or an index to a location list
* rangelist represents an offset or an index to a range list
* stroffsetsptr represents an index to the indirect string table

The semantics of some existing attribute classes changed:
* loclistptr represents an offset into the
  .debug_loc / .debug_loclist section
  It will be used only when setting loclists_base attribute.
  In all other places we should use loclist attribute class.
* rangelistptr represents an offset into the
  .debug_ranges / .debug_rnglist section
  It will be used only when setting rnglists_base attribute.
  In all other places we should use rangelist attribute class.

Define lookup table for new DW_AT_* attribute types
* change the existing references to AC_LOCLISTPTR to AC_LOCLIST
  as in those places now either an index or an offset can be accepted
  (previously there were no indexes, only offsets everywhere)
* only DW_AT_loclists_base uses AC_LOCLISTPTR
* similarly for AC_RANGELISTPTR and AC_RANGELIST as ranges
  can be specified using either an index or an offset
* only DW_AT_rnglists_base uses AC_RANGELISTPTR

Define lookup table for new DW_FORM_* attribute forms
* similar reshuffle for location lists and range lists

Change-Id: I78d307889cd6082a19870afdc571dc0c83d19644
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6982
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2023-10-13 10:50:55 +00:00
David Karoly 0ec674cdcc Debugger: fix lookup for DWARF5 tag names
Change-Id: Ibbc47d031deee387d93bcfec5cc629230f891b0e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7039
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Rene Gollent <[email protected]>
2023-10-11 20:01:57 +00:00