Commit Graph

60416 Commits

Author SHA1 Message Date
Augustin Cavalier
19f8517fc3 Tracker: Link against the right libcolumnlistview. 2019-08-26 22:13:34 -04:00
Augustin Cavalier
60baa09ba0 rpmalloc: Switch back to using 2MB heap areas instead of 4MB.
There seem to be some cases that severely fragment rpmalloc's heap,
wasting large amounts of memory (in #15264, some 750+MB it appears
are wasted this way.) This is a stop-gap measure to cut the wastage
in half (or more) until a proper solution is implemented.
2019-08-26 22:01:48 -04:00
Adrien Destugues
84dc116351 Tracker InfoWindow: add a tab with file attributes
Now there is no need to resort to listattr and catattr to see the
attributes of a file. You can get them easily, from the GUI.

Limitations:
- No editing support
- Only a few well-known types are handled
- No support for attributes with array of values or otherwise unexpected
  size
- Special handling for B_TIME_FORMAT which is annoyingly of a different
  size between 32 and 64bit systems, making the attribute format
  slightly incompatible.

The window is a bit small to show all the information, so the "Type"
column is put off-view on the right, one can scroll to it if needed.

Vertically there is space for only 4 to 5 entries. It was suggested that
we could merge the permissions and information tabs, making the new
first tab higher, and thus adding more space to this one as well.

Change-Id: I75d192314bc60378c2f058547485cb9c30263485
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1748
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-26 23:38:18 +00:00
Adrien Destugues
9bb8d3a40a Tracker InfoWindow: fix regressions
- Misplaced popup window for showing truncated paths in full (#15301)
- Crash when using Alt + E to edit the filename (#15302)
- "Link To" information for symlinks does not fit in window (#15303)

Change-Id: I72416ab4473e0b01c33817b9364eb9e9e59172e1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1747
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-26 23:38:18 +00:00
Adrien Destugues
2140520f96 Tracker InfoWindow: layoutify, use tabs
- Use layout kit to make a few things simpler
- Separate the view showing the header (icon/name) and the one showing
  the extra details, making two simpler files instead of a complex one
- Fix some layouting issues
- The permissions are now in a second tab, allowing to add a third one
  with other things (more on that later)

screenshot: http://pulkomandy.tk/drop/fileinfo.png

Change-Id: Ief80815eba749723664f40f1317f8aa4cf692162
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1745
Reviewed-by: Ryan Leavengood <leavengood@gmail.com>
2019-08-25 19:17:14 +00:00
Adrien Destugues
ebb30434c9 Tracker: move AttributeView to own file and rename
Change-Id: I046eb9aa0fef792e9e940d0a6dfd887ede2fa996
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1744
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-25 19:17:14 +00:00
Adrien Destugues
79d1a09c19 Adjust SEARCH_SOURCE also for the DoCatalogs invokation. 2019-08-25 20:19:11 +02:00
Adrien Destugues
97218560be Tracker: move InfoWindow to a subdirectory.
I'm going to split it into even more files, and it's easier to track
what's part of it this way.

Change-Id: I09c302da38ce96f0077c5f53fd17c08cdd6c22c9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1743
Reviewed-by: Ryan Leavengood <leavengood@gmail.com>
2019-08-25 17:41:45 +00:00
Jérôme Duval
ce4e12ca3e ext2: implements metadata_csum and 64bit features.
* Some PVS-Studio warnings are removed.
* fixes hardlink count in source and destination folders on rename.
* tested with fstorture and fsx (one job).
* add new definitions.
* import crc32c code from BSD.
* add some consistency checks at mount.
* DirectoryIterator::_AllocateBestEntryInBlock(), the direntry is checked for
consistency before using it, which should avoid crashing on bad data.
* DirectoryIterator::_SplitIndexedBlock(): the dotdot entry length should
include the dot and dotdot entries length.

Change-Id: I0f80d73b65b1ae6ddb2e746a6f85ef806f23dbb0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1735
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-24 17:18:44 +00:00
Zoltán Mizsei
ec6b0f4650 Add various module formats to the mime-db
Change-Id: I3e3dc235d8146107aa45f356fdd03d66f6f69dba
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1737
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-24 16:31:49 +00:00
Zoltán Mizsei
805d7a776f Add various module formats to the ffmpeg plugin
Change-Id: Ibc8cd6a21edc9f94f5c7cd51227868eb8bcbab01
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1736
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-24 16:31:49 +00:00
Adrien Destugues
4eaa1f35e5 BRoster: preserve symlink as "app" if given one
Symlink name or attributes may be relevant to the launched app, so it's
important that we pass the unresolved symlink as argv[0] when running
it.

Change-Id: Ie1d73bc4e9d5c3d0476f205ce635aafd9203e553
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1739
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-24 16:28:45 +00:00
Adrien Destugues
6faf979da7 BRoster: Fix infinite loop when trying to launch app with missing libraries.
Fixes #14986.

Change-Id: I727fde0c475f0684567a46be5af616cad56a9b4c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1738
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-24 16:28:45 +00:00
Autocomitter
2d181d97e8 Update translations from Pootle 2019-08-24 08:19:09 +00:00
X512
8043df7a45 Fix BMenuBar width in Tracker 2019-08-23 22:19:27 -04:00
X512
f146f74b42 Fix BMenuBar width 2019-08-23 22:14:05 -04:00
Augustin Cavalier
a830ec9a1c BSecureSocket: Don't continue with an untrusted certificate by default.
It has been multiple years since this comment was written; all relevant
apps have added their own hooks around this, so we should now be
"secure by default."

Also spotted by a random Hacker News commenter.
2019-08-23 17:56:09 -04:00
Augustin Cavalier
8d63a9060e BSecureSocket: Pass the hostname to the X509 layer to validate it.
Now SSL certificates with the wrong hostname actually fail to validate.
While I'm at it, remove the usage of BString and just check [0] directly.

Spotted by a random commenter on Hacker News.
2019-08-23 17:51:59 -04:00
Adrien Destugues
759ee24c4c Game Kit: do not allocate BBuffers before initializing the Media Kit
The port pool now being created in BMediaRoster init, we must make sure
the media roster is initialized before doing anything else.

Change-Id: I5a3cc61c993e9be4078772bbf341b637d951d239
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1734
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-23 03:22:49 +00:00
Adrien Destugues
478ea25152 Fix directory layout for game kit tests
Change-Id: I59fbee4b71cea7e959a8c05fd870b3a43fa9832e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1733
Reviewed-by: Ryan Leavengood <leavengood@gmail.com>
2019-08-22 17:59:54 +00:00
Alexander von Gluck IV
3d4c153e17 buildtools: Disable tls on riscv64 for now
Change-Id: I8084e0fa2ffbaf04242fa14617807d83abbd5586
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1556
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-08-21 12:00:51 +00:00
Ryan Leavengood
d2a69b8bd9 Tracker: Improve pose loading speed, add comments
If a new pose is going to be placed below the current view bounds, we
definitely do not need to do any drawing. If it is above or inside the view
bounds we do this special drawing method.

Overall this method of doing updates is complicated and hard to adjust without
introducing drawing artifacts. As noted in the TODO, this should be rethought
from scratch.

But for now in one case of over 8000 files in a single directory this improved
the loading speed from about 8 or 9 seconds to 1. Queries results also load
much faster. I am testing in a VM with a single CPU on a host with an SSD, so
others may see better performance with more CPUs, or less with a spinning hard
drive.

But at least now the drawing won't be the bottleneck.

Should finally fully fix #3011, or at least good enough for close.

Change-Id: I3806ffa7674e404c9db24edb33d6ab4eb2d825f7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1726
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-21 02:10:10 +00:00
Adrien Destugues
5eec8d3be6 au_reader: allow to build for secondary architecture.
This is a very simple reader for the media kit, useful to make sure
ffmpeg isn't at fault when you get a crash. Also, unlike ffmpeg it
allows you to see the full backtrace.
2019-08-20 20:40:31 +02:00
Adrien Destugues
a8d1f93424 resizefs: fix build 2019-08-20 20:40:15 +02:00
krish_iyer
8f76c031fc Adding MMC bus in device manager
Change-Id: I4db868e89f426b0e9c7f8ed77d8f96442f7525e4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/293
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-08-20 09:53:19 +00:00
Preetpal Kaur
8272123ea5 Connected Devices: Mouse, Touchpad and Keyboard
-Resolve some issues.
-Added the connected devices code in the main window.
-Replace BUTTON_DEFAULTS and BUTTON_REVERT with kMsgDefaults and kMsgRevert.

Change-Id: I3b0c86fc581056859239df0fbf2c085b8d168136
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1619
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-08-20 09:52:25 +00:00
brjhaiku
262348afe7 btrfs: documented Chunk class (no functional change)
Change-Id: I9f1c47728297d7e29033beed7338bbd44d6d13cd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1492
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Chế Vũ Gia Hy <cvghy116@gmail.com>
2019-08-20 09:51:59 +00:00
ahenriksson
03867a467e Add resizefs utility
Change-Id: I5f503cf07216df64dcc33081f24cd083d003e581
Reviewed-on: https://review.haiku-os.org/c/haiku/+/943
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-08-20 09:48:51 +00:00
Simon South
a7536efa8b BKeymap: Add unit tests and fix issues
Add a preliminary set of unit tests for BKeymap and fix these issues:

* BKeymap::operator=() caused a crash by allocating a zero-byte array to hold
  the other object's character data.
* BKeymap::SetToCurrent() and SetToDefault() leaked memory by not freeing an
  existing character array before allocating a new one.
* BKeymap::SetToCurrent() incorrectly determined the size of the current
  keymap's character array, causing GetChars() to fail whenever the current
  keymap was loaded. Now SetToCurrent() uses the _get_key_map() private
  function, which accurately reports the size of the array.

This commit also updates a Jamfile by replacing a use of "UseHeaders" to
include private header files with the more concise and expressive
"UsePrivateHeaders".

Change-Id: If6f71b209f1bd395be57835c4dd89f0e3f845994
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1724
Reviewed-by: Ryan Leavengood <leavengood@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-08-20 07:49:49 +00:00
Alexander von Gluck IV
890224c31c scripts/find_triplet: Fix shell, requires bash not sh
Change-Id: Ie8219230810856c2a5f1c99bb6f3162eeff0964e
2019-08-19 09:05:52 -05:00
Augustin Cavalier
f70930539e rpmalloc: Add missing NULL checks to the allocation paths.
Fixes #15258.
2019-08-17 12:29:20 -04:00
Murai Takashi
cc7e844c12 drivers/graphics/radeon: Fix -Wformat=
Change-Id: I1bfb70b9fb492140621d4d936ae8c29985f78d64
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1544
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-08-17 16:09:29 +00:00
Murai Takashi
77fb9ca3e6 Keymap: Localize keyboard layout menu.
and modify keyboard_layouts/Jamfile to remove "<keyboard-layout>"
from KeyboardLayoutNames.h.

Change-Id: Ibd68bfa165089e77cfeb6ade17f6135ac5608b46
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1719
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-08-17 16:07:37 +00:00
Ryan Leavengood
472d26a3c0 Media Kit: Delete the PortPool in a more deliberate way
Letting it get deleted statically can cause segfaults since it is needed for
some final quit messages.

This mimic changes Axel made for the DormantNodeManager and
TimeSourceObjectManager.

I also pulled PortPool into its own file and header.

Fixes #15135.

Change-Id: Ie64753e1876d58b52f7cb95536c6be3df2e6d40c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1721
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-16 23:55:07 +00:00
Adrien Destugues
b5be469eee app_server: some missing std::nothrow and error checks.
I had app_server crash on me because of an uncaught allocation
exception. I don't know if this will fix it but it's better to try to
survive even if it may result in some UI glitches.

Change-Id: I09dd2a7e6ff63d52f51389d7418d1a1d1810af00
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1720
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-16 04:25:44 +00:00
Ryan Leavengood
fe08f0b3d0 Media Kit: Clear the BufferCache of buffers for disconnected clients
Without this, the BufferCache keeps a reference to these buffers inside the
media_addon_server until the media_addon_server quits, which is pretty much
never.

Should fix #4954 and #14755, and possibly #13614 and #14047, though I think
they may be something else.

Switched from std::map to our HashMap to get something which works in gcc2 and
gcc8.

Change-Id: I26463899724b9d1520d97fec785e435f536eaf3d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1717
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-16 03:56:27 +00:00
Augustin Cavalier
72b37d9ffc kernel: Turn the clone-area-attempt panic into a dprintf. 2019-08-14 20:13:36 -04:00
Augustin Cavalier
2c4232b853 BMediaRoster: Mark publishing areas as cloneable. 2019-08-14 20:06:30 -04:00
Augustin Cavalier
8e84b39646 kernel: Reinstate the USER_ADDRESS check in ioctl (sort of).
Thinking over this carefully, I realized that adding checks to
every ioctl implementation in every driver would be very prohibitive,
because there, one has to check is_called_via_syscall() in addition
to IS_USER_ADDRESS(), and this would have to be done in every case.
So that would take a massive amount of work, and it would be
very easy to miss a case.

Instead, we can take advantage of the fact that all we really care
about is the buffer not existing within the kernel address space.
This should allow using constants in the umappable range between
0x0 and the beginning of the user address space, too.

Change-Id: I2eeb46e806a5aac32e152c72076a042aa847be0d
2019-08-14 19:06:43 -04:00
Augustin Cavalier
925cb64e3c AboutSystem: Move leavengood from past to current maintainers.
Once again, welcome back :)
2019-08-14 18:04:56 -04:00
Augustin Cavalier
84f6e2d39f kernel/x86_64: Always lfence after swapgs.
This works around "yet another" Intel CPU bug. AMD is unaffected.
Linux chose to use an altcodepatch for Intel only; FreeBSD did
a bunch of benchmarks and determined the effect this had (if any)
was so far out in the decimal places that just adding it unconditionally
was the easier and simplest solution.

(FreeBSD commit: https://github.com/freebsd/freebsd/commit/f4038696064b86260)

Fixes #15236.
2019-08-14 17:54:40 -04:00
Augustin Cavalier
8c6b1519a2 kernel/daemon: Sleep as long as possible between runs.
Avoids waking up every 100ms to do nothing.

Change-Id: I48c7be41f6102a76b7e770ea45c665ab991c79f0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1700
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-14 21:28:20 +00:00
Alexander G. M. Smith
31d70c106b package kit: Skip over future package attributes.
Ignore unknown fields (also called attributes) which are from a package
file with a different minor version number.  Previously it would halt
with an error when encountering such a field, even though it can safely
be skipped over (if it was unsafe, we would have incremented the major
version number).

The use case is a future package attribute for pre-uninstall scripts.
If they're not run, that just leaves some debris after uninstalling
(like symbolic link desktop icons).

* Use the B_NOT_SUPPORTED error code when reading unknown package
  attributes.  Don't treat it as an error if the package is a
  different minor version, just skip it.
* Print unknown package attribute index numbers rather than stopping,
  since they may be from future package file formats and can be safely
  skipped otherwise.  Mention the relevant enum so you can find it in
  the source code.  It's a pity that the previous abstraction layer
  isn't present, since it tells us what data type the attribute is
  (string, number, etc), so we could have printed its value too.

First step of two for enhancement #13427

See https://review.haiku-os.org/c/haiku/+/1504 to generate packages
with a different minor version number (second step of the enhancement).

Change-Id: I6db1897824a1713b3d5fab6fdfb990ee5923cd52
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1714
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-14 02:08:35 +00:00
Ryan Leavengood
7893e1249e boot_loader: Init state to NULL before iterating
Should fix a gcc2 build error, plus is more correct.

It is a crime that C and C++ do not initialize things. Go and Rust fixed that.
2019-08-13 17:22:21 -04:00
Simon South
5f255c64dc DefaultBuildProfiles: Add OpenSSL to minimum profile
This makes pkgman functional in minimum-profile images.

Change-Id: I3578886743fecbf76779ac1b4b76762d8ce1be3d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1715
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-13 19:38:23 +00:00
Ryan Leavengood
c1c99c5c00 boot_loader: Only load old package states in the boot menu
Normal boots should not be slowed down by old package states.

Should fix #12498.

Later I will fix the package kit to merge old states so they don't build up
indefinitely.

Change-Id: I6830dd4ed65a3a659c0a68590238be0dcefff451
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1703
Reviewed-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
2019-08-13 13:43:57 +00:00
Simon South
6e5ca42d21 build: Make Debugger usable in minimum profiles
Add a missing dependency (libedit) that prevented Debugger from
starting, and include Debugger in the Applications menu in the Taskbar.

Change-Id: I43c69fe969e51a3a59d1f2d9aa65c00b20848b87
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1713
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-13 03:28:11 +00:00
Augustin Cavalier
91af5aa6b6 media_server: Fix fetching the team_id from the SOME_APP_QUIT message.
Now the buffers of crashed teams will actually be removed from the
media_server. (Was this code just never tested?!)
2019-08-12 20:26:42 -04:00
Augustin Cavalier
ec2d11c47c rpmalloc: Update to 1.4.0.
This synchronizes us to upstream commit 4da8b88f53b545e0695e5a90ee.

This version is a pretty significant refactor with some important
performance optimizations to cross-thread deallocations, so it
probably will have a noticeable performance gain on Haiku.

On most applications, there appears to be either no change or a
slight (1-3MB) increase in the amount of used memory, likely because
of the changes to the default "map more memory" flag. We can revert
this if it proves to be a problem, but I don't think it will be.
2019-08-12 19:07:42 -04:00
Axel Dörfler
20a31c45b9 netstat: Added family, protocol, and state filter options
* Uses the same option names as net-tools's netstat.

Change-Id: I3363a091dfa1bcf09065f77d3fdc9c9bf27cbcaf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1701
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-08-12 22:09:34 +00:00