66445 Commits

Author SHA1 Message Date
Augustin Cavalier
acd4eeb8fa BFS: Give endian macros parentheses.
Some things that call these macros put expressions in them; to avoid
operator precedence problems we should put them in parens.

Change-Id: I57335ffb190c484778c4bc8075d5ca3597f1e7e5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8184
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit 1250fb8422452dc141778ed0e978ff8e0bc5ea08)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8135
2024-09-02 20:19:20 +00:00
Oscar Lesta
4dcd3641d0 libtracker: avoid Tracker crash while changing resolutions.
After settings Backgrounds to None for all worskapces, I was getting a 100%
reproducible segment violation on "fShowingBitmap->fBitmap->Bounds()" with every
resolution change.

Change-Id: I2a3640a3c33e571d772c1b38b21087346215dca8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8176
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
(cherry picked from commit b67f8f8f1468eb58a18a6aa67b99c51fa6975cc8)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8134
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-09-02 15:20:08 +00:00
Augustin Cavalier
62c620c57d kernel/x86: Rework handling of %edx in syscall handler (again.)
The previous change to this logic (9921f444625e360674f92db84ffae695492233a5)
apparently caused intermittent crashes with various applications. It
seems that EDX is not expected to be clobbered by functions that do not have 64-bit return values, and if it is, crashes result, like #19024.

This commit reworks the logic to not change %edx in the iframe at all
if we don't have a 64-bit return value, and then adjusts the debug logic
to clear %edx before invoking the post-syscall debugger hook. This means
we have to run the post-syscall debugger hook before clearing the
flags, but that should be fine (and perhaps even useful.)

Fixes #19024, and possibly other crashes that have cropped up on
32-bit x86 in the last few weeks, at least.

Change-Id: I3280033bc2dd05aca254555d6ee3b173a270ebf9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8158
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: Michael Lotz <mmlr@mlotz.ch>
(cherry picked from commit 63b183cd7c8743793d2903baf993efbcd200874d)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8128
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2024-09-02 15:16:57 +00:00
John Scipione
235b3e2ea5 AbstractSpinner: live update text color when enabled
... whatever motivated this to only work on disabled text views
has been resolved.

Change-Id: I3ae9d056870f1163d3fa074ab9a1dad96c0192f8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8168
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
(cherry picked from commit d6f2eb5368c4bf31247169586d095b5631eb37de)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8133
2024-09-01 22:55:39 +00:00
Niklas Poslovski
e0d49a94ce AboutSystem: Add nipos to contributors list
Change-Id: Ic6a77722db35d6e8199c3c2c70b3fb0f7c2e403a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7950
Reviewed-by: nephele nephele <nep-git@packageloss.eu>
(cherry picked from commit e7ddc6ca9df5abad2b4d25d1216d66cd569c40fe)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8131
2024-08-31 20:04:49 +00:00
John Scipione
4282e29d53 Tracker: Fix pose UpdateIcon() list mode top
We don't need to set the top here, it is already set by CalcRect()
a couple lines up. Our calculation was slightly off causing bug.

Fixes #12558

Change-Id: I022cc661cf55a9d016fd722c701f05fc1f9fea4f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8165
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit a2ef50a4486160e442230e29dfdf409acbea3181)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8130
2024-08-31 17:04:55 +00:00
Augustin Cavalier
fbe39bde6b mknod[at]: Implement the case where the node type is S_IFIFO.
This is the only case the POSIX specification indicates is portable.
We may be able to implement some of the others that Linux or the BSDs
support if it turns out there are applications that want them, though.

Fixes #19032.
(cherry picked from commit 1c22c2608fc46aa8b2bf42a3160bf12cbd95a50f)

Change-Id: I10f936e0f58f3beb518e46a3e93e748dddeb0754
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8129
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-31 15:57:13 +00:00
Michael Lotz
986e35ae62 DHCPClient: Fix use of uninitialized timing values.
The fRenewalTime and fRebindingTime members were never initialized but
assumed to be initially set to 0 when not provided by the DHCP server.
This could lead to negative time values depending on the uninitialized
memory content and would always happen under libroot_debug where memory
is initially cleared to 0xcc. The negative times then lead to endless
loops of sending requests.

Change-Id: I74a5fbd0c75f7de925f591f09db663978ea3f0ea
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8157
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit ad0d2e43c3713948d850b93472dc54d49bb77334)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8127
2024-08-30 16:13:35 +00:00
John Scipione
6520addc92 Tracker: Fix "Find" window menu field truncating
Minimum menu field width is set by "multiple selections" string width
on volumes menu field or a smaller size that matches R1B4 on rest.
Maximum menu field width chosen to match current based on font size.

Set the max content width to truncate long mime-type names that don't
fit. Add room for the pop-up indicator.

Create member variables to hold menu fields. Resize the menu fields in
AttachedToWindow() after they have been marked because the width
depends on the marked item.

Set member pointers to NULL in constructor where not already set.
ASSERT variables we use are not NULL, they aren't but check anyway.

Use DefaultLabelSpacing() for the spacing between icon and text to make
them font sensitive. DefaultLabelSpacing() is 5px at 12pt font matching
current.

Fixes #18999

Change-Id: I0e52b5aa557c8b5d76f09e0b60fcb965e3ff65e0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8143
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-29 19:36:33 -04:00
Autocomitter
a653545a37 Update translations from Pootle 2024-08-29 19:33:15 -04:00
Augustin Cavalier
16e95e04dd DateTimeEdit: Use document colors.
Otherwise the controls look like they are "disabled" and can't be
edited.

Ideally this class would be refactored to use BAbstractSpinner rather
than drawing its own arrows, but that's a problem for another day.
2024-08-29 19:28:55 -04:00
Augustin Cavalier
0eb97928a4 protocols/unix: Hold an extra reference during stream endpoint close.
See inline comment: otherwise it might be deleted when we
release it in Disconnect() but before we unlock it.

Also fix _LockConnectedEndpoints() to unset the locker object if
returning an error, rather than returning a locked endpoint that
we don't hold a reference to.

Fixes #18927.
(cherry picked from commit 33e9a82042d48c3e18dabc360c3854cf2ebe05dd)

Change-Id: Ib349cd312a4f41d3f699f875a98ca89c9540bc5d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8126
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-29 20:15:07 +00:00
Augustin Cavalier
57114149c7 libnetwork: Only build BeOS compatibility code if _BEOS_R5_COMPATIBLE_ is set.
(cherry picked from commit e776c8dee5617a43dee0f2fe973d97956875697e)

Change-Id: I099d494c56bc7bbf4eb6b341f0d48017343c13d2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8125
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-29 19:30:56 +00:00
John Scipione
2aa9cba987 Create symbolic link when drag and dropping files from a virtual folder
... instead of making a copy like normal. This changes the default
behavior, you may override it by context-click dragging and selecting
Copy or holding the option key to force copy.

Implements #18729

Change-Id: Ib13bec347f300d25de77064ced79693ecbc3a85c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8144
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
(cherry picked from commit 2f621127f10412a58a700d261cc8eccb835baf67)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8124
2024-08-29 16:46:12 +00:00
Humdinger
1ffd784937 HaikuDepot: fix copy paste error in status string
Change-Id: I9d0bd0183d9ac0e43d4746753818c6eee1931da1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8142
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
(cherry picked from commit e5767a2833e2c5e7962ff6c169f50d105a22b9d8)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8121
Reviewed-by: Andrew Lindesay <apl@lindesay.co.nz>
2024-08-28 15:20:33 +00:00
Murai Takashi
55e266f6a1 FindPanel: fix branch condition evaluates to a garbage value
Fixed dynamicDate used without initialization at line 730,
since GetPredicateString() might not set value to dynamicDate.
Pointed out by Clang Static Analyzer.

Change-Id: I4698fdada4b91183c7bdba5aa980ddc6b55e6312
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7946
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
(cherry picked from commit d12f9b56059df7b1ab2adb811f9a6184ef02f629)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8120
2024-08-27 15:29:11 +00:00
Augustin Cavalier
1df87e95a1 QueryParser: Unsupported value type conversion should not KDL.
Enhance the warning message and return a more relevant error code.

Fixes #19017.

Change-Id: I13d01ce206a27e5c9a35debc8081219422bfb10a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8136
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit be52613c12dfe357f38b763f547ca200cebdb488)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8119
2024-08-26 18:25:31 +00:00
Augustin Cavalier
3e44d6522a kernel/vm: Insertion into the Areas AVL tree can fail.
So we need to check that it didn't when creating areas.

Change-Id: I4342463113046b543722faa7a51ca269ed67e8bf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8137
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit cae7920b1eecd4cac167fa5dace57f3c3f675c4e)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8118
2024-08-26 18:25:21 +00:00
John Scipione
e4b2c29b04 Tracker: Change kMoveSelectionTo to kCopySelectionTo on paste
This restores cut items state to full opacity on paste.

Reverts the part of hrev53329 for cut items. We only copy duplicates
on copy operations, not cut, but we have to make all cut operations
copy after paste is over to restore the state. The clipboard mode is
altered but not the contents.

Fixes #15267

Change-Id: I8a036a548719fe49c512bd38ff1a072890ab2325
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8100
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
(cherry picked from commit 8c124cce0c40b738c559b6e60c60b80480ebdfc1)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8117
2024-08-26 18:21:40 +00:00
John Scipione
5bf6f3a20a Keymap: Restore menu field status icons
Fixes the missing piece of hrev57496
"Keymap: Put status icons inside menu fields"

Change-Id: I824f8c105036ae7ea6535f33e0ec0fa8f812f39d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8112
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: John Scipione <jscipione@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
(cherry picked from commit 649e84c6f346cad3c620f06bb8e2bbbd902f43a2)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8116
2024-08-26 17:14:55 +00:00
Jim906
82791033c5 FAT: fix volume label errors
* Initialize pm_firstcluster in dosfs_identify_partition for use by
  read_label, for FAT32 volumes.  This is necessary for reading the
  volume name from the root directory.
* Create label_to_fat() and call it at both points where volume
  labels can be assigned, for uniform behavior in setting
  labels.  Force all-caps when setting labels, for widest
  compatability of the volume with other systems.
* Remove the redundant LABEL_ILLEGAL string listing illegal label
  characters, and consistently rely on sAcceptable (a list of legal
  characters) when setting labels.
* For clarity, rename sanitize_label() to label_from_fat and remove code
  that causes labels to be displayed to the user in all lowercase.
* See #11119.

Change-Id: I7b5e6b998f13d9eb7ba56ed50c0d53b8c051fad0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8115
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit d648149f6682cdc1bcb2de0ab65afbb1110a4024)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8075
2024-08-26 17:13:07 +00:00
Humdinger
2d657a8134 New templates: add menu item to create a submenu folder
* Add a menu item at the bottom of Tracker's "New" menu and all
  submenus to "Add new submenu...".

* The menu creates a folder "New submenu" under
  "~/config/settings/Tracker/Tracker New Templates" and adds the
  attribute _trk/_template_submenu = true to it. That results
  in showing it as a submenu in Tracker's "New" menu.

* Finally "~/config/settings/Tracker/Tracker New Templates" is
  opened and selected, so the user can edit the folder name that'll
  appear as submenu label in the "New" menu.

Change-Id: I1783f8a88c8e56fbe33012c7312cc97e9401f7f5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7931
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: humdinger humdinger <humdinger@mailbox.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
(cherry picked from commit f73431b3ad57f05c976e2171ac582320815a303d)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8074
2024-08-25 19:23:56 +00:00
Augustin Cavalier
9de483f61a sys/uio.h: Use __inline instead of inline for C89 compatibility.
Fixes https://github.com/haikuports/haikuports/issues/10822.
(cherry picked from commit 4944d70dd107d30f7f0274ab0978f19b0639a0e7)

Change-Id: I741f3cd3bee7b8ededb449af060ef644888cadb3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8073
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-24 18:55:46 +00:00
John Scipione
69792664f1 Tracker: Override Open with... pose view text color and back color
Make TextColor() and BackColor() virtual in BPoseView so that we can
override them in subclasses. These are used to invert colors on select.

Move InvertColor() and InvertedBackColor() to Utilities.

Move Desktop...() methods to DesktopPoseView overrides, this does the
same thing but in DesktopPoseView as an override.

Add override methods to Open with... pose view. Open with... window
text color were not updating with color settings making text unreadable
in dark mode. Open with... background and text colors update based on
tooltip colors which was chosen previously.

Change-Id: Id605f1887d6018766b09a6de372b6071de8b83ea
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8105
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
(cherry picked from commit 9d4d102df2147ca981aaa81080601690412aaee0)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8072
2024-08-24 18:21:19 +00:00
Jim906
ffc23c2bef FAT: Speed up mounting of large volumes
* Skip the complete comparison of FAT mirrors if the FAT size is over
  4096 blocks.
* This complete check was not done in either the previous Haiku
  driver, or in the original FreeBSD driver that the current driver is
  largely based on.
* Remove the media descriptor byte check of the active FAT, which is
  redundant with fillinusemap().
* Follows up on #18969.

Change-Id: I34dd1d71852e1f3e9dc42d125759989c091f5108
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8095
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
(cherry picked from commit 2bca8281a31b0ce8e99f5648b98c0eba7c04e6b9)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8071
2024-08-24 17:17:32 +00:00
Joachim Mairböck
e8577cf1da headers/bsd: fix comments after #endif
gcc2 complains otherwise when using -ansi -pedantic-errors that
"text afer `#endif' violates ANSI standard" because it doesn't
recognize C++ comments in C mode.

Change-Id: Icb091d15a4324625ce305aa89391c44a94f4a38e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8094
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
(cherry picked from commit 175e8825a9aa9621021b2a946bf081f4b3406b1b)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8070
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-23 15:16:52 +00:00
John Scipione
f76ac0ff1b Tracker: Do not alter selection on Copy and Cut or Copy more, Cut more.
Fixes #5585

Change-Id: I75ff282febb81854088d731b9e54120161377b60
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8090
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
(cherry picked from commit c12de68606c1052a2c1091b13f2230ac634f705e)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8069
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-23 15:15:08 +00:00
Augustin Cavalier
14def264e3 Debugger: Don't return if package kit threw an exception.
Instead just proceed as if no package was found.
(cherry picked from commit 8ce920280db3214e876b050454b25708c7c28c96)

Change-Id: If6721b988928481db00fdbef4c4c279554301873
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8068
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-22 19:42:45 +00:00
Augustin Cavalier
bf34eab876 Debugger: Don't query the package kit in non-interactive mode.
We always skip loading debug information in this case, so
querying the package kit is just a waste of time. And it could
result in hangs or crashes if the package kit is in an invalid
state (e.g. if we are debugging package_daemon.)
(cherry picked from commit 69f1c57f0cc40fd0d32e61dc01507b234e498df8)

Change-Id: I9ce322bce111a458e830ace2286274bae126a861
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8067
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-21 19:37:50 +00:00
Augustin Cavalier
c99033f8a8 Debugger: Catch exceptions thrown by the Package Kit.
e.g. if package_daemon doesn't respond, it may throw an error
on initialization, which we don't want to bring us down.
(cherry picked from commit d1d5a4b958c6380f6833fb4df18ed649bcbf32f4)

Change-Id: Ibe4ff9752b9d6f71cb1ee5d1fda83b02927f6794
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8066
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-21 19:37:34 +00:00
Augustin Cavalier
6c06256863 repository_infos: Fix baseurls & identifiers. 2024-08-20 13:57:39 -04:00
Augustin Cavalier
8ecc7fa1e4 WebPositive: Update bookmarks.
* Rework redirection to not use synchronous XHRs.

 * Fix QuickTour LoaderPage (and update bookmark to point to it.)

 * Change default view of LoaderPages to List mode.

 * Other misc cleanups.

Fixes #19005.
(cherry picked from commit 0e07f2994d28a37f95094ec28a1eb0bf549f4998)

Change-Id: I9da8d80f5e04af6ef5bf519cf44120caf4b29a96
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8065
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-20 16:32:06 +00:00
Augustin Cavalier
8ded736cfe Disable a bunch of Radeon HD devices that likely don't work.
Just for the beta branch. Can be reactivated when fixed.
Ticket #18023.

Change-Id: I9dafc6a7fe72c1144fde8b07bafd59952d1310a3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8080
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-20 15:04:33 +00:00
Jim906
e1aff8b7d4 FAT: Fix media byte initialization error
* Ensure that when initializing a FAT partition, the media byte value
  assigned in the bootsector matches that in the first FAT entry.
* See #18969.

Change-Id: Iffc3dd7549b918954e9145a2a02221616c38a016
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8081
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit 493cff03288e08000a74225530dfb2239769b027)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8063
2024-08-20 14:53:29 +00:00
Augustin Cavalier
64ec22728b unix: Fix another leak of ancillary data.
This time in the datagram logic. Also clean up some of the logic
around unsetting the data from the request after adding it.
(cherry picked from commit 3fb6cfce6b4b586a5a76fc4c269c9944f06307e6)

Change-Id: I8dbb824503b8c3cbcdc2e11dde6ac03d244d1a35
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8062
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-20 03:23:05 +00:00
Augustin Cavalier
23b9ef334f network/stack: Define maximum ancillary data size based on void*.
Otherwise we would support sending up to 32 FDs on 32-bit and
only 16 FDs on 64-bit. This way we will support 32 FDs on both.
(cherry picked from commit ad20cd0c530a28ed2cd838a655e93c3bd7c96c64)

Change-Id: I36613ab1e6ac135f7fb307282a6a6d20abc437ce
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8061
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-19 22:52:00 +00:00
Augustin Cavalier
4b85519020 network/stack: Actually delete the ancillary data container.
We freed its contents but missed deleting the container itself.
Fixes a 2-pointer-size memory leak on every use of ancillary data.
(cherry picked from commit da1e76be7945e6cbb558a8264b8d4f8d836b6cd9)

Change-Id: Ia2862d60e9a71a9db5ba02f0eacdbbeea23cd356
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8060
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-19 22:51:49 +00:00
Augustin Cavalier
cf40b6bf5b unix: Use BStackOrHeapArray in add_ancillary_data.
(cherry picked from commit a5bf9e3b0e04b674d9ff1f28f69cdc4c265161dd)

Change-Id: I5678cc71eea961bf4e597f7f5501deb89c7f811c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8059
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-19 22:51:34 +00:00
Augustin Cavalier
1587ce3d7f kernel/vm: Add page structure offset sanity checks.
The sanity check of the physical_page_number can't work in many cases
since physical page ranges may be discontiguous. Instead what we should
check here is that the page structure address is at an expected offset
within the pages array, and print messages if it's not (and also don't
try to read the mappings linked list if it's not.)

This would have more easily caught the problem fixed in hrev57945:
the KDLs that commit fixed were "invalid concurrent access to page",
but with a very large "expected" number, indicating an overflow.

Change-Id: I784c183c2c146077ffe3c1dede2e54817bde52c7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8051
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit e1c13f3ff7b700c20dde1e82febd5ada14b14330)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8058
2024-08-19 17:42:50 +00:00
Niklas Poslovski
26b3b99daa Cortex: Use B_LIST_*_COLORS for Media Add-ons list
Change-Id: I65e37f7c2ef91e96fb009b3636279832ef1de771
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7942
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit 7db19fa2937ff7e3185b57e1ebb9c8acda3132f1)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8057
2024-08-19 17:30:08 +00:00
Niklas Poslovski
ea55c7990f FontDemo: Add support for theming by using B_DOCUMENT_BACKGROUND_COLOR and B_DOCUMENT_TEXT_COLOR
Change-Id: I8686e1e0607f3d007971f909d66f57c834363520
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7941
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit c02c239d8d676dbc56e0bb2483e12cb351fe41dd)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8056
2024-08-19 16:21:51 +00:00
John Scipione
0790989100 Decorator: Redraw phantom tab
Add the area of the tab that just got removed from the stack
to the update (redraw) region so that it will be redrawn.

Fixes #16006, #18517

Change-Id: I5a26c353e2dd2e63f72440ddd0b522b52b02b2a2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8046
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: John Scipione <jscipione@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: X512 X512 <danger_mail@list.ru>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit d35bcb118c183533f29733bfce1a29cf6fe8150f)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8035
2024-08-19 16:01:20 +00:00
John Scipione
c17e778103 ListView: Do not alter selection on mouse up if was dragging
Fixes #19001

Change-Id: I2e5956f4f4e48f1032e46e9b5bcd0cf03f1eb568
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8045
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: John Scipione <jscipione@gmail.com>
Reviewed-by: humdinger humdinger <humdinger@mailbox.org>
(cherry picked from commit eb1dc4b1a858cb7e825bea129193ecc925fadadc)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8034
2024-08-19 16:00:50 +00:00
Oscar Lesta
257cc41e63 Clock: make sure the first on-screen draw uses current time.
This avoids starting the clock at 00:00, just to jump to current time.

Change-Id: I911b60716ab60722e4ac38a3d597ab495fb5945d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8049
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
(cherry picked from commit 03766d494bea7e39b5a9114a445e8bf904976ff1)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8033
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-19 15:58:52 +00:00
PulkoMandy
da0fd8635d ECAM: do not convert 8 and 16 bit access to 32 bit ones
May fix #18536

Change-Id: I8854350b70793160548fe96e15d95874deed4f7b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8042
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit feff791acc350f4f0e8372dcd8109a3f0d9d0d80)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8032
2024-08-17 16:31:29 +00:00
PulkoMandy
399dfac046 ahci: make Intel quirk more similar to Linux implementation
May help with #18536

Change-Id: I5755b3484eb8e89fba6fd49a31dd701b8fe884d1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8041
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
(cherry picked from commit 3a84f6fc568a0a50619592e8681d9e67756a46eb)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8031
2024-08-17 16:30:58 +00:00
John Scipione
67d3cb2ec9 Tracker: Enable/disable New Folder/Template menu on context-click.
(kWindowPopUpContext not kPosePopUpContext).

Fixes #18975 again on context-click

Change-Id: I4e3cf134f318e513c40aad42001257437aea70c7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8039
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: John Scipione <jscipione@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit d5a862047c1dc6ce857f4476cbd5e51d8c449b51)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8030
2024-08-15 16:18:00 +00:00
PulkoMandy
f2457192e2 BMenuItem: draw checkmark on marked item in matrix-layout menus
Fixes #18990

Change-Id: Id2f3b78bb443b8f76ab0bdde4318ddfd95d283bf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8038
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
(cherry picked from commit d289e5bfabe51dc8e85d3d38428e5743a137782c)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8029
Reviewed-by: nephele nephele <nep-git@packageloss.eu>
2024-08-15 11:19:24 +00:00
Augustin Cavalier
0750f5b62d ramfs: Properly acquire/release references to the vnode in VMCache.
This is what AcquireStoreRef/ReleaseStoreRef are for. We don't use
VMVnodeCache here because that is a non-"temporary" cache that
writes its pages back to disk, while we need a store for the pages
that won't discard unmodified ones when memory is low.

Add a close() to the mmap_cut_tests, which triggers the case where
this is important (a file is unlinked, mmap'ed, and then the lone
FD referring to it is closed, triggering the file's deletion unless
the mmap also acquired a reference to the vnode.)

Fixes KDLs with Firefox test builds.
(cherry picked from commit c0a12a6b7d697382511ff36e7815aad6a379b3a7)

Change-Id: I589325966f7b8eb837750aea1f5adbdd94e06aeb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8028
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-14 22:37:43 +00:00
Augustin Cavalier
47e97829f6 kernel/vm: Add "unmergeable" flag to VMCache.
ramfs needs to create caches that are both temporary and unmergeable,
so add another flag to make this state possible.

Otherwise, mmap'ed files from ramfs might wind up in VMCache
trying to merge the caches when the last one is closed, which
we don't want.
(cherry picked from commit a8877df135c0395285945b11a75d57e10b7aecdf)

Change-Id: Iec9549f5f36207968e1502ce1a0d5fb9354f02d1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8027
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-14 22:37:36 +00:00