Commit Graph

61989 Commits

Author SHA1 Message Date
Dale Cieslak
8d3f6fce57 CharacterMap: gray out blocks that aren't supported by the current font
Fixes #15982.

Added font to UnicodeBlockView. Cache Unicode "Blocks" for both
UnicodeBlockView and CharacterView.  Added lookup of non-Be Unicode blocks
(i.e. blocks with 'kNoBlock' specified). Gray out non-found blocks.

NOTE: tested fontconfig extensively in another environment and the shown
blocks match what fontconfig returns.  However, you may sometimes see
characters in blocks that aren't 'included' in a font.  I haven't figured
out why that occurs.

Change-Id: Ia3c7f8ccc6dc43c5ce062ed002846c861a8fa223
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2739
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2020-05-24 09:25:20 +00:00
Andrew Lindesay
87016f8f49 HaikuDepot: Single Package Crash
In single package mode there was a crash owing to the
status bar not being present.  This may as well be
added because it provides some feedback that the
application is actually doing something.  The
behaviour of this is not ideal because the feedback
could be better, but it will resolve the crash
issue this ticket is raising.

Resolves #15964

Change-Id: I603a7b163139859f0c46a35ead0809e5d82e0f8d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2791
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-23 21:58:09 +00:00
Augustin Cavalier
f0a8640b45 app_server: Add locking to the Decorator class.
This class can potentially be accessed by multiple "tabs" (windows)
at once, so it must be read/write locked to account for that.

Fixes #16027.

Change-Id: I9cc741874caed4997497b03c8893bc2acb0e6fe7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2779
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-23 17:59:20 +00:00
Niels Sascha Reedijk
15aa3a02a3 Documentation: add userguide in fur, id, ro and tr
Change-Id: Iee02ec9c62a3fdf14920c3b08ebb97c282a5aa91
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2788
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit 5527f11778)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2789
2020-05-23 17:52:52 +00:00
Humdinger
b845dd656c Fix 'EULA' to mention the Quick Tour instead of Welcome page
Fixes #16108

Change-Id: Ib19b8950f6ed946444a94581f578af39f4e04bf4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2787
Reviewed-by: Emir Sarı <bitigchi@me.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-23 17:39:59 +00:00
Kyle Ambroff-Kao
44a4bc5fd6 tcp: Remove sanity checks from BufferQueue in release builds
Each TCPEndpoint has two BufferQueue members, one for the send queue
and one for the receive queue.

If DEBUG_BUFFER_QUEUE is enabled, then most methods of BufferQueue
call BufferQueue::Verify(), sometimes twice. This member function
performs some sanity checking which requires iterating through every
net_buffer in the queue.

Disabling this in a debug build improved throughput by a factor of 5x
over the loopback interface on my laptop. Using iperf the measured
throughput went from 900Mbps to around 4.8Gbps.

This patch turns this sanity checking off for release builds.

* Rename DEBUG_BUFFER_QUEUE to DEBUG_TCP_BUFFER_QUEUE
* Change the default in BufferQueue.h to disabled
* Set DEBUG_TCP_BUFFER_QUEUE to KDEBUG_LEVEL_2 in
  kernel_debug_config.h

Change-Id: I262dac5d7e2889d2942bbdcf6b667cc0cbafa4c8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2780
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-23 02:32:58 +00:00
Adrien Destugues
82817fee45 package: prevent creating a package that contains itself.
Fixes #10117.

Change-Id: I4be59189a47dd0ad400fe46786d7058be4ed6d3f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2778
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-23 00:50:45 +00:00
Adrien Destugues
984492f14a Build fix. 2020-05-22 18:13:31 +02:00
Adrien Destugues
17626df948 Icon-O-Matic: use the MIME sniffer to recognize SVG files
Our sniffing rule is not perfect, but it is already a lot better than
what was done here.

Partially fixes #14437 (the icons also fails parsing for other reasons,
but with an error message, at least)

Change-Id: I25475b419b5fbe863c71f553a336757d7950bf48
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2662
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-22 14:08:17 +00:00
Adrien Destugues
2a3b385efb Icon-O-Matic: replace SVG parser with nanosvg
The parser was based on an old example from agg. NanoSVG is originally
based on the same code, but has lots of bugfixes. So it makes sense
to use it.

Nanosvg revision 25241c5a8f8451d41ab1b02ab2d865b01600d949

Fixes #5955, #8586, #13021.

Change-Id: I38ff9aa4e1d403c41979ebe42f7b45d4500a870c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2661
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-22 14:08:17 +00:00
Andrew Lindesay
c419919252 HaikuDepot: Performance
This change removes two mistakes I made a long time ago
that caused unnecessarily copying of lists of data. This
fix speeds up the UI alot.

This change also clears data in UI list elements when a
bulk load is requested.  It stops clearing otherwise and
instead uses "add" and "remove" operations in the lists
which is OK now because the UI list elements are much
faster than they have been in the past.  This removes
the strange clean-and-reload that was visible in the UI
previously.

A threaded package loading system was put in place a long
time ago, but with these performance improvements this
mechanism is no longer necessary; it has been removed to
simplify the code.

Fixes #16012

Change-Id: I393cee929695726539602b51630ae285fb8384f1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2748
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-05-22 10:08:11 +00:00
Andrew Lindesay
9d8d114499 Packages: Local Repo Config Formats
The local storage of the various repositories' config
needs to cater for different generations of storage
formats and also needs to be able to swap out legacy
repository identifiers.

Change-Id: Ib4b3857254b7b703858eff6815e2d6c54d69da3c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1963
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-05-22 10:04:51 +00:00
Adrien Destugues
582b7d1685 MediaPlayer: missing localization
Fixes #16062
2020-05-22 10:36:36 +02:00
Adrien Destugues
95b2739da8 FirstBootPrompt: adjust window size to font size
At 12pt, we try to fit a 640x480 display. But at larger font sizes we
have to allow some more space.

Fixes #16066.
2020-05-22 10:17:21 +02:00
Adrien Destugues
afc74b61fe Add Thai font to the font fallback system.
Fixes #16077.

Change-Id: I9809dcdcad61fc2956a270ff92b1ccaef4e8efb3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2768
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-22 01:28:57 +00:00
Adrien Destugues
4dcd8c81b1 app_server: fix font fallback
Actually check that the replacement font contains the needed glyph.

Change-Id: I6d774361fcf16a36dc3d05ce8b0fe1cb407fabff
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2767
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-22 01:28:57 +00:00
Adrien Destugues
c0e0ba1fd8 GlyphLayoutEngine: cleanup, no functional change.
Change-Id: I688d4a5f1c93de10f15bd34045cf342ea03fa984
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2766
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-22 01:28:57 +00:00
Humdinger
cdd33d8e61 Pulse: fix typo in signature
Fixes #16088

Change-Id: Iccfcd5c59c9eca989872d76ddf5cac5f06ef85e3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2751
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-21 17:28:29 +00:00
Humdinger
9f29580908 TextSearch: translate system name of the app
Change-Id: I2d120b8b92af8cecc8c55ed9ff8ed829f30456c2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2686
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-05-21 17:27:52 +00:00
Jérôme Duval
2905c9fcef packagefs: for symlinks, return the symlink length as size.
Change-Id: I60cc9c751a7426d18e27a9cbb163d43b80bcfa28
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2761
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-21 14:39:28 +00:00
Alexander von Gluck IV
42f51416eb docker/bootstrap: ensure work volume exec, fix dependencies
Change-Id: I8b8d3a2f3b5a09063b183dc355407908cc2640f6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2763
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-21 14:03:24 +00:00
Adrien Destugues
13d66b6d24 Fix building on Haiku 2020-05-21 10:47:31 +02:00
Augustin Cavalier
550e8532f8 nvme_disk: Perform the new lba_count computation only once.
As suggested by korli. No functional change.
2020-05-21 00:40:52 -04:00
Jérôme Duval
3966c60139 write_overlay: readlink behavior change
Change-Id: I036f3e7f84e4a771846482fe81c2db4c4d718aef
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2754
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-21 01:42:58 +00:00
Jérôme Duval
bc231fc782 kernel/fs: rootfs and devfs readlink behavior change
Change-Id: I23ec687965493162594924c32f8ff31e7da396d7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2753
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-21 01:42:58 +00:00
Jérôme Duval
10b5c00fca kernel/vfs: follow up for hrev54107
_user_read_link: don't write after the buffer end, anytime the buffer is too
short. It should honor the user bufferSize, instead of using the link length.
normalize_path: null-terminates when bufferSize is lower than B_PATH_NAME_LENGTH.

Change-Id: If3892dc1ffc4aa7a79a333bbe607449ca409a7f0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2752
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-21 01:42:58 +00:00
Augustin Cavalier
8ba0b5eb9b kernel/file_cache: Properly size I/O request vectors when writing zeros.
Should fix #16039.

Change-Id: Ifc5c79354979aaa7b27b09acc6d6450e21146e76
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2727
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-21 01:41:41 +00:00
Alexander von Gluck IV
a742970be5 Fix build of Haiku on gcc10 host
Change-Id: Iea16a7d07a32497c4f228739945356b5c8be9897
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2540
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-21 01:35:10 +00:00
Jérôme Duval
0ad4a233f6 bios_ia32: continue on invalid ACPI RSDT/XSDT table checksum
like ACPICA does by default. should help with #16055.

Change-Id: I2379d99ecda93007b0dd316b3c94eb1a36ccd7e5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2740
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2020-05-19 17:08:28 +00:00
Augustin Cavalier
4d0ad37aba nvme_disk: Avoid doing I/O larger than the maximum size, if possible.
libnvme can break up transfers that are too large, but to do so,
it allocates one nvme_request struct (of which it has a large,
but finite, pool) per segment. Since we are already iterating
over "vecs", we might as well cut off transfers after they
would otherwise go over the limit.

Individual IOVs that are too large are left alone, though;
libnvme can still handle this. But at least we no longer try
to do all I/O in one go.

Tested in a similar manner to the previous commit.
2020-05-19 00:33:06 -04:00
Augustin Cavalier
8eb950cd64 nvme_disk: Fix ior_reset_sgl.
The "offset" parameter was not actually an IOV offset, but actually
a byte offset across all IOVs... whoops. Somehow, this went unnoticed
as most controllers have large enough maximum transfer sizes
that we would in practice not hit the limit (even with bs=1M
dd tests!)

KapiX's controller, as seen in #16049, however, has a maximum
transfer size of 64 pages; much smaller than these other controllers,
so it did trigger this behavior and exposed the bug.

Tested by adding an artificial limit of 2 blocks as the max
transfer size (which makes things pretty slow, as you might
expect.)
2020-05-19 00:30:59 -04:00
Augustin Cavalier
16a59954e7 nvme_disk: Error check after do_nvme_io_request.
Fixes partial transfers being reported as larger than they actually were.
2020-05-19 00:28:18 -04:00
Augustin Cavalier
4d2de4ea40 HaikuDepot: Fix GCC2 build. 2020-05-18 22:37:23 -04:00
Suhel Mehta
ac754f75e9 ufs2: Reading inodes of ufs2.
Now file system can be mounted sucessfully.

Adding documentation for using the code.

Change-Id: I2bd1b72e06ffc3b5f6306aaa69c59becf4cb882b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2696
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-05-18 12:16:32 +00:00
Andrew Lindesay
9883929b9c HaikuDepot: Featured Pkgs View
This change will move the display of the featured packages
from a dynamic layout to one that is static.  This should
improve layout consistency and ui performance as well as
introduce keyboard navigation in the featured packages
list.

Resolves #11675, #15012
Helps #14675

Change-Id: Iddac7a9562763c7a890ec5dcf633e94f84684f43
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2708
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-05-18 06:39:21 +00:00
Augustin Cavalier
cb53bf1e28 nvme_disk: Fix nvme_qpair_submit_queued_requests.
I added this function to make the queued requests logic more robust,
but I failed to notice that since it is called from nvme_qpair_submit_request,
it would just result in a deadlock of any qpair that had requests
queued.

May help with some of the "qpair lockup" tickets.

Change-Id: I5ff63b509ae8812356d0d33f019027d3159b6685
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2735
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-18 00:23:23 +00:00
Augustin Cavalier
f37d2d10a0 idualwifi7260: C89 fixes.
Change-Id: I8138f4ed4877b3f7e8eb54ad0bc64a60278e8b61
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2734
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-17 23:38:30 +00:00
Augustin Cavalier
ba5694b017 idualwifi7260: Port changes from newer FreeBSD.
This adds support for the 9xxx series of devices.

Change-Id: I43385e91b91201732397b79c38bd9bb4f3a18f1b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2733
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-17 23:34:32 +00:00
Augustin Cavalier
a3a192c1cb acpi: Use mutex_trylock() for ACPI_DO_NOT_WAIT.
We do not need to go through all the overhead of mutex_lock_with_timeout()
if there is in fact no timeout.

Change-Id: I7891ae9138a7d45be934ac53412b82546d52b901
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2730
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-17 19:34:02 +00:00
Augustin Cavalier
97310aa7fc Deskbar: Fix build after last commit.
Change-Id: Ice721e56b9ff8bbdd01dde65933d6fa0c750823a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2728
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-17 18:42:41 +00:00
Adrien Destugues
54bff8ec82 TimeView: fix direct messaging to another window
The window may be gone (if its B_QUIT_REQUESTED was called before the
main Deskbar window one), so we can't safely call Quit() on it. Instead,
just send a B_QUIT_REQUESTED through the BMessenger, which is a bit
safer.

Should fix #16026.

Change-Id: I4c99c3a7f994044c3c3f0c08b35ae451c3ff9ea7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2721
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-17 18:27:13 +00:00
Adrien Destugues
d9ef4f90bb Remove GPL-licensed implementation of MD5
APE reader was using a GPL licensed version of MD5. A similar
implementation in the public domain was available in libnetapi, which I
moved to libshared so the APE reader can use it (and made some fixes,
missing const mainly). It only needs a small wrapper to use it easily
from C++ in a way compatible with the previous implementation.

Part of #13814.
2020-05-17 19:06:59 +02:00
Augustin Cavalier
8ea697ab38 HaikuDepot: Move TextDocumentTest to "tests". 2020-05-17 12:36:08 -04:00
Augustin Cavalier
150edea615 HaikuDepot: Remove usage of ICU build feature.
Not needed after the last commit.
2020-05-17 12:30:21 -04:00
Adrien Destugues
05d6891800 HaikuDepot: do not use ICU directly.
Change-Id: I0097fe51cc9b41509e5ba0d2452c5f28eac0538a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2724
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-17 16:00:53 +00:00
Panagiotis Vasilopoulos
79ca65ac9d Deskbar: Improved UX in the shutdown submenu
* Moved 'Power Off' on top of 'Restart system'.
* Made a few visual changes to the code that adhere better to the Haiku coding style.
* 'Suspend' is now at the bottom of the shutdown submenu.

Change-Id: I0d41e3e5656d5d9ea02e3cb072b6a6092c70c640
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2701
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-17 08:14:04 +00:00
Augustin Cavalier
e54b2d7cf2 kernel/lock: Fix build under non-KDEBUG.
I forgot to change MUTEX_INITIALIZER following removal of the
unused field.

Change-Id: I011c023ae00bb4576c8bcecf83546892fef3a77e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2719
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-17 03:36:04 +00:00
Augustin Cavalier
fd161d7bf2 kernel/locks: Remove ignore_unlock_count and fix races in lock timeout.
As far as I can tell, there is no reason to ignore unlocks, ever;
if no threads are waiting, then mutex_unlock() will act appropriately.
So all we need to do is increment the lock's count here,
as we are relinquishing our request for locking.

On the other hand, if we did not find our structure in the lock,
that means we own the lock; so to return with an error from here
without changing the count would result in a deadlock, as the lock
would then be ours, despite our error code implying otherwise.

Additionally, take care of part of the case where we have woken up
by mutex_destroy(), by setting thread to NULL and checking for it
in that case. There is still a race here, however.

May fix #16044, as it appears there is a case where ACPICA
calls this with a timeout of 0 (we should make this be
a mutex_trylock, anyway.)

Change-Id: I98215df218514c70ac1922bc3a6f10e01087e44b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2716
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-17 00:22:15 +00:00
Adrien Destugues
785518beef wacom: start node monitor earlier
Should fix #16003 but I don't have the hardware to test.

Change-Id: I0e6c0df7b66adf72e35e4afa272cd907427a9427
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2714
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-17 00:14:33 +00:00
X512
ec43e4f4c2 AutoDeleter: do not allow copy
Change-Id: Ieab0fea46fc23c446bbaca407e3e80a4a7901896
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2704
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-16 18:23:09 +00:00