Commit Graph

61193 Commits

Author SHA1 Message Date
François Revol 0960949012 m68k: build fix
Change-Id: I3e2b106d5b14a84523e74024616a5c168f011e1a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2216
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-02-06 00:07:15 +00:00
François Revol 66f88b473a m68k: stub out more TLS
Change-Id: Ia226dcf996556622faf66798647447f2311fbb03
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2215
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-02-06 00:07:15 +00:00
François Revol f614bad4a6 m68k: fix linking atari_m68k loader
Change-Id: Idb266a55bf72d14a0ebe9a4ee16a981f39b8adec
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2214
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-02-06 00:07:15 +00:00
François Revol 086766edf9 m68k: fix math in libroot
Change-Id: Icd50c5887d1b96818c620046b20ba51aac55ec18
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2212
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-02-06 00:03:15 +00:00
Adrien Destugues 0f9ffb37c1 Add a Person file to tracker new templates
Fixes #9397.
2020-02-05 21:25:22 +01:00
X512 b3de8bea44 Package Kit: convert HTTP error code only on BHttpRequest
Other request types exists such as BFileRequest.

Fixes #15675.

Change-Id: Ib2e07fad4dd9f682d2b9fc0cdbf0ca60ecd3adfb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2200
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: François Revol <revol@free.fr>
2020-02-05 14:55:45 +00:00
Kyle Ambroff-Kao 5f4f455cfd test/storage: Fix BFile tests
After this patch "UnitTester BFile" runs with no failures.

This includes some changes to NodeTest as well since the BFile suite
inherits some tests from it, but "UnitTester BNode" doesn't pass yet.

FileTest:
* Fix format strings in log messages to use the correct types and
  quite warnings.

* Test for expected behavior with BFile(..., B_READ_ONLY | B_ERASE_FILE)

  There is a table in the BFile tests which is used as input for a
  series of tests which construct BFile objects with various
  permutations of the mode parameter.

  For two of these, the combination of B_ERASE_FILE and B_READ_ONLY
  are used for the file mode. The system rejects these with the error
  B_NOT_ALLOWED. This is enforced in bfs_open(), which looks for that
  particular combination (O_RDONLY | O_TRUNC).

  I tested this on BeOS R5 and it will indeed let you create a
  BFile(path, B_READ_ONLY | B_ERASE_FILE) which basically replaces the
  file at path with an empty file.

  The Haiku behavior seems way more sensible, so I'm changing these
  tests to match its current behavior.

* BFile(..., B_READ_ONLY).SetSize() isn't allowed.

  BeOS R5 allowed you create a BFile with the B_READ_ONLY flag and
  then successfully set the size of the file with
  BFile::SetSize(). Haiku doesn't, and that seems way better. Updating
  BFileTest::SizeTest to match Haiku behavior.

  One whole sub-test was removed from FileTest::SizeTest because it
  calls SetSize() on a `B_READ_ONLY | B_ERASE_FILE` BFile. This is
  redundant as other tests in this suite already verify that it is not
  possible to construct a BFile with that combination of flags.

NodeTest:
* Fix tests to match Haiku's max attribute length.

  Many of these tests assume that the max size of an attribute name is
  255 bytes, and it was in BeOS R5, which I just confirmed.

  But Haiku allows 256 bytes. In 4069e1f30 some compromise was struck
  that allowed this to avoid breaking userspace which had been allowed
  to use 256 byte keys at some point.

* WriteAttr, ReadAttr and RemoveAttr all return B_NAME_TOO_LONG if an
  attribute name longer than 256 bytes (excluding null terminator) are
  provided.

* Disable NodeTest::AttrRenameTest since attr rename is not supported

  Tests in BNodeTest (inherited by BFile tests) exercize
  BNode::RenameAttr(), but from what I can see attribute renaming is
  not implemented at all. bfs_rename_attr() has a TODO comment and
  just always returns EOPNOTSUPP (B_NOT_SUPPORTED). And that is the
  value returned from BNode::RenameAttr() in these tests.

  So for now I made these tests just check that B_NOT_SUPPORTED is
  returned from BNode::RenameAttr(), so when this functionality is
  implemented these tests will fail and can be cleaned up.

Change-Id: I6cfe90ca45f3a8afa709edc9b85e648fdc865e82
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2182
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-02-05 14:54:18 +00:00
François Revol 15e39e1c67 elf2aout: Fix for 32bit
Sadly the NetBSD elf2aout only support 32bit, and this one from FreeBSD
only supports 64bit. This one was simpler to fix because it only handles
basic stuff.

Change-Id: I70165f680ec1cd95c156d4116f9d96c6b4ac53b0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2206
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-02-05 14:52:31 +00:00
Ryan Leavengood e10de1ecf5 Visually align shortcuts in menus
In a menu, we use the right side both for submenu arrows and shortcuts.
As a result, when an entry has both a shortcut and a submenu, its
shortcut is not aligned with others, and this does not look so nice.

The spacing for the arrow appears only if there is a submenu in any of
the items in the parent menu.

Change-Id: If91fdcdad36abb0141fb05d1f59141f89540c1db
Reviewed-on: https://review.haiku-os.org/c/haiku/+/355
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Ryan Leavengood <leavengood@gmail.com>
2020-02-04 23:06:54 +00:00
John Scipione dcf9675793 Deskbar: Improve auto-raise and auto-hide
Activate auto-raise on the screen edge inside the Deskbar window
frame. Set the event mask to B_POINTER_EVENTS when auto-raise or
auto-hide is on and set the event mask back to 0 when we turn off
auto-raise and auto-hide. Before this change you had to click a
window twice to get it to rise above of a raised Deskbar, with
this change you only have to click once to make the window rise
above Deskbar.

The auto-hide show and hide bounds are unchanged.

There was another bug where the window was not hiding correctly in
auto-hide mode when you moused over the status bar in horizontal
mode. This was happening because the where parameter of
TBarView::MouseMoved and TBarView::MouseDown was yielding
coordinates relative to the status tray when the mouse was over
the status tray and not the current view meaning that
TBarView::Frame().Contains(where) would return false over the
status tray. Inspecting the where parameter showed that the x-
coordinate was reset back to 0 when you mouse over the status tray.
To fix this issue I pulled the screen_where field out of
CurrentMessage() instead since this yields the correct value.

The calendar window input focus has been fixed in auto-raise mode
so that you can click on calendar even when it is above Deskbar.
You may also click a window on top of Deskbar in auto-raise mode
without the Deskbar window being raised.

Don't hide Deskbar when Calendar is showing in auto-hide mode.

Put comment inside else block inside { }.

Return from TBarView::MouseDown() calling ansestor method.

Quit fCalendarWindow on TimeView deconstructor if it exists (even if
it is not curently being shown.)

Fixes #8923 #14493

Change-Id: I7ed67fdbc30a93d2782b3ab6b6738b86ec5e4043
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1966
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-02-04 20:17:56 +00:00
Adrien Destugues 53db2fc8cf Installer: Missing break
Leading to opening two Installer windows after closing EULA.

Thanks to Diver for reporting!
2020-02-04 21:10:12 +01:00
Adrien Destugues 79ded8ca16 Reduce polling interval for low-speed devices
Fixes #7651, my Logitech gamepad works.

Change-Id: Ia3f92ba817576946dabee262a2fd5af8102a109f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2198
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2020-02-04 20:05:10 +00:00
Jaroslaw Pelczar 78fea2759f arm64: Enforce PIC build of kernel
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: I4d4acf91865b182d9fd5f500978705854e0638e5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1855
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-02-04 03:36:20 +00:00
François Revol 0ef0921d99 Package Kit: Return proper errors in FetchFileJob
This should give more meaningful errors in pkgman
(not so sure, feel free to tweak the mapping),
and also avoid running the next job if fetching failed.

Change-Id: If76968f705ff25f7ecf1a5f91d88a02040d24665
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2186
Reviewed-by: Ryan Leavengood <leavengood@gmail.com>
2020-02-04 02:18:09 +00:00
Adrien Destugues 8769583f90 Build fix. 2020-02-03 22:19:22 +01:00
Adrien Destugues 3bea15adca BSecureSocket: retry reads after interrupted syscalls.
SSL_AUTO_RETRY does not cover this case (it only covers SSL errors, not
underlying socket ones), so we still need to retry reads manually here.

Fixes #14638.
2020-02-03 21:47:08 +01:00
Adrien Destugues 9762e2fe45 Update readme.compiling
- Clarify why building jam is not needed on Haiku
- Put the 64bit instuctions first, as they apply to both Haiku and other
  platforms and are the way to go for people discovering Haiku, usually
  (only oldtimers will care about BeOS compatibility)
- Remove the "from non-haiku platforms" from 64bit instructions because
  they work just fine on Haiku as well
2020-02-03 13:39:46 +01:00
Kyle Ambroff-Kao e7fd54fcde tests/haikudepot: Fix build of ValidationUtilsTest
Changeset 835e7239d added some additional tests for HaikuDepot, but
ValidationUtilsTest::AddTest references a test method which doesn't
exist.

I think the intention was to have TestEmailInvalid defined, but it was
split into more granular tests like TestEmailInvalidNoDomain,
etc. Just removing this undefined test from the suite.

Change-Id: I858233df29657d07d78ad1784691572e65a26045
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2183
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-02-03 11:36:07 +00:00
Adrien Destugues d439721d6c Bootloader menu: update copyright year. 2020-02-03 12:28:06 +01:00
Adrien Destugues cc55d41273 efi loader: implement simple in-memory log
This lets us see the bootloader log from the boot menu, which is very helpful
on machines with no serial port or other way to debug.
2020-02-03 12:28:05 +01:00
Andrew Lindesay 835e7239d0 HaikuDepot: Refactor of Login
These changes cover a rework of the login and
account creation logic before making additional
changes related to the user usage conditions.

Relates to #15209

Change-Id: I90b7dbcee5b0285476938c6ced0afc89483d6227
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2023
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-02-03 08:51:55 +00:00
Adrien Destugues dcee1c8ce4 Installer: do not Quit() the EULA window directly
Fixes #15021.
2020-02-03 09:45:46 +01:00
Adrien Destugues af5b356d7d Installer: small tweak to layout
Should fix #14574.

Change-Id: I0aa13eda0af936d371664c678a6ff5b8ceabff79
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2181
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-02-02 23:45:05 +00:00
Adrien Destugues 8095ab5a4b Installer: use Walter as a placeholder logo
For non-official builds, Installer had no logo. This led to a window
sizing bug which is not seen in the official builds (both nightlies and
releases) as they both use the Haiku logo there.

Use Walter as a placeholder logo in that case. The png is generated from
the wonderbrush file in the separate artwork repo.

Change-Id: Iea361d7ac0fd2bdb147318632ff198c86c4b89c2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2180
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-02-02 23:45:05 +00:00
X512 c529e2a354 debug heap: implement malloc_usable_size
Change-Id: I49d7918df00cca4b889f6a3cf52c3f903ee5fa2a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2179
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-02-02 23:38:37 +00:00
Adrien Destugues fdc13d7d97 Installer: do not allow installing to read-only partitions.
This would probably not work, right?

Fixes #14614.
2020-02-02 22:14:39 +01:00
John Scipione 151a4f7f93 API Docs: Clarify BLooper::PostMessage and BMessenger::SendMessage
... docs to make it clear which methods work synchronously and which work
asynchronously. A small number of related edits are included as well as a
couple of pedantic whitespace changes. Clarify sync vs. async reply
handling better in BMessenger class description. Add The to make sentences.

Change-Id: I3069934fc5e82dda25331e85884d6d0c0c100dfd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2178
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-02-02 00:52:41 +00:00
Humdinger e557eb2c66 More email provider infos
Added provider info for mail.ru, courtesy of GCI 2019 student tejasmate.
Added missing provider infos in the Jamfile.
2020-02-01 16:57:46 +01:00
Panagiotis Vasilopoulos 5a57c0442c Mail: added email configurations
Change-Id: Ibe827df8be8141f0b2c775195c42d234ce2066c3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2158
Reviewed-by: humdinger <humdingerb@gmail.com>
2020-02-01 15:53:29 +00:00
Kyle Ambroff-Kao 2112748284 tcp: Fix KDL when sockets are reused
This fixes a KDL that is triggered by the following scenario.

1. A socket is created, attempting to establish a session
   between (loopback, ephemeral port) => (remote address, remote
   port).
2. That socket ends up in the closed state because the remote is not
   accepting connections.
3. The socket is re-used to connect to a different (remote address,
   remote port).

The problem is that fConnectionHash is a BOpenHashTable<TCPEndpoint>,
and inserting endpoint multiple times can create a linked list
cycle (TCPEndpoint is an intrusive linked list node). That means that,
even though TCPEndpoint's destructor removes itself from
fConnectionHash, there will still be a pointer to it left behind,
which means that future accesses within that hash table bucket will
result in a segfault.

The added fConnectionHash.Remove(endpoint) here prevents the KDL, as
it ensures that socket reuse doesn't result in a cycle.

Fixes #13927, see that ticket for a detailed explanation of the
problem.

Also added some regression tests:
* Added SocketTests::ClientSocketReuseTest to PosixNetTest, which
  reproduces this KDL.
* BOpenHashTable: Added tests to cover RemoveUnchecked and removal
  of an object that isn't in the table.

Change-Id: If4bcc1e0d94350a5ad9ba8e7ae6f1b783b3f6d34
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2173
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2020-02-01 11:52:34 +00:00
Autocomitter 4a2bab12b1 Update translations from Pootle 2020-02-01 08:52:52 +00:00
Adrien Destugues 3aba70f980 install_wifi_firmwares: fix build of b43-fwcutter
byteswap.h was removed from glibc in current versions, so point to an
older git revision to get it.
2020-02-01 09:28:39 +01:00
Kyle Ambroff-Kao e8a484b0f6 tests/kernel: Fix KPath tests
42e3c6f97 changed the default buffer size for KPath, but the tests
still assume the original default.

Change-Id: I2712d81bbdc678bbaae11e975b0a9a05f5a9151f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2175
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2020-01-31 15:22:55 +00:00
Murai Takashi 6a27de893b deskbar Fix PVS V595
Add NULL check for 'fBarView', since it might be NULL
at line 107.

Change-Id: I293e551dd4ab6ac33b7d4a6d1bf736bcd142cb80
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2170
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-01-31 11:49:51 +00:00
Murai Takashi f67a677986 soundrecorder: Fix PVS V595
Add NULL check for 'fBitmap', since it might be NULL
at line 71.

Change-Id: I70bf4d29e20bbe1c62d972f576dc52d4783933d1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2169
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-01-31 11:46:42 +00:00
X512 958d3f4375 BeBuild: set default visibility for _EXPORT
This is required for building shared libraries with hidden by default symbol
visiblility such as mesa.

Change-Id: I7150629aaea61d7c9b6e641d32913c5cc7c96543
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2159
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-01-30 00:32:32 +00:00
Kyle Ambroff-Kao aa7ac127f8 tests/kernel: Add tests for BOpenHashTable
Linking libkernelutilstest.so with libbe to for use of BObjectList in
the tests.

Change-Id: I1abb991e240dd522821a71ef54d22a1ca7957283
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2165
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-01-30 00:30:00 +00:00
Alexander von Gluck IV e53e22439c efi/types: Only set ms_abi on x86
* Upstreamed to Fuchsia via:
  https://fuchsia-review.googlesource.com/c/fuchsia/+/358320

Change-Id: I3232cc1a5bf6194d5f2fa82f13668ca089faca92
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2174
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-01-30 00:21:54 +00:00
Murai Takashi 5529e8d2df deskbar: Fix PVS V757
Use dynamic_cast to menuItem after NULL checking to it.

Change-Id: I3fdabf5a091922587f498cf5fa116f8824bbfc6b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2160
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-01-29 09:34:22 +00:00
Alexander von Gluck IV 250b21a583 system/u-boot: Some 64-bit cleanups to our u-boot code
Change-Id: I70c50b36cd56263dcb37faeffc4037dea4af88c0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2171
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-01-28 18:32:09 +00:00
JaniceTr 3b11f603cf Adding 96 and 128 size icon options for Launchox
In the desktop the icons can reach 96 and 128 pixel. With the increase of resolution those are good dimensions.
The max size of icons in LaunchBox was 64, so new sizes were added.
Fixes #13835

Change-Id: Id4db66f52b265aa4f94742c83f7d65ed136ba9c2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2172
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2020-01-28 18:16:14 +00:00
Murai Takashi 2afe4c52c8 appserver: Fix PVS V595
Add NULL check for fAllocator, since it might return NULL.

Change-Id: Ifb72266b4d4c5f076f0c663066dc9b81e94fc201
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2162
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2020-01-28 18:01:14 +00:00
Adrien Destugues 88d73c6cf8 intel_extreme: set the "image size" register on generation 4 and below
This is undocumented, but required for GMA 945 and probably earlier
devices as well. The register is reserved in later generation 4 devices,
and not mentionned at all in later versions.

Fixes #15655.
2020-01-28 18:56:59 +01:00
Alexander von Gluck IV 1d622b8d66 build/repositories: Add riscv64 HaikuPorts and fix Cross
Change-Id: I8963a66dd30e8d964c1a1cf0b9140615592f7e46
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2167
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2020-01-28 13:45:49 +00:00
Adrien Destugues d8572f79ba Fix x86_64 build.
__rdtsc is not directly a builtin, x86intrin.h needs to be included.
2020-01-28 13:04:39 +01:00
Alexander von Gluck IV 3a85d802ee libroot/riscv64: Fix build. Add MIT optimized bswap from rv8
Change-Id: I4d0e1ec34d1568594cac0f7378f87852c997ab81
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2166
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-01-28 11:48:42 +00:00
Alexander von Gluck IV 15fb7d88e9 riscv64: Add missing (slightly modified) fenv.h from FreeBSD
* A few tips for future folks follows.
* fenv.h gets wrapped in our buildtools
* If anything in the arch fenv.h "doesn't work" buildtools
  will silently fail early on (autotools HAVE_FENV_H)

Change-Id: Icae064fde42af3bbed5ea2eadfaa8c18c677e6a6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2164
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-01-28 11:48:42 +00:00
Adrien Destugues 2d697067b2 Further cleanup/optimization of system_time
On gcc4, we can use the __rdtsc builtin. On gcc2, provide a similar
inline-able version of rdtsc, and remove the rdtsc function written in
assembly, saving a call/ret on every call.

There has been some discussion about performance, but note that this is
only bootloader code, it is not used when the system is up and running,
therefore performance is not that critical.
2020-01-27 21:46:43 +01:00
Alexander von Gluck IV 97e67e3f63 repo/HaikuPorts: Bump gcc for sparc to resolve post-musl changes
Change-Id: I900712b13275f64c5f0955a7b9818b2e4d450a9f
2020-01-27 13:50:36 -06:00
Adrien Destugues ec4e9ea8bc intel_extreme: remove unhandled generation defines
- 7xx (1st gen) has no driver in Haiku or is handled by the intel_810 driver
- PowerVR has no driver in Haiku

So there is no point in having those in the intel_extreme driver.

While I'm at it, fix the video timing/resolution constraints for
sanitize_video_mode.
2020-01-27 13:58:52 +01:00