Commit Graph

60698 Commits

Author SHA1 Message Date
Jaroslaw Pelczar
458e37756b 3dfx: Fix invalid type cast on 64bit
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: Iba685cca20c31c91c8931d25e0f86ac9c9bef6bb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1779
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 14:15:09 +00:00
Jaroslaw Pelczar
5d1791071e PPPoEDevice.cpp: Add missing header for htons
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: Icbb7d71a155da2ecbeaba578bdf022dac7b4d04f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1778
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 14:15:09 +00:00
Jaroslaw Pelczar
cca5be407e rule_based_prefetcher.cpp: Fix function prototype
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: Ic0d961266a6aebf31c711c466fb3ff5a5b1b50ff
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1777
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 14:15:09 +00:00
Jaroslaw Pelczar
7d6cb3e3c5 acpi_ac.cpp: Fix invalid preprocessor macro
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: I7984ffed7e634a37dabb10e2fa96330a97a0d98f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1776
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 14:15:09 +00:00
Jaroslaw Pelczar
a7288ebd8f firewire: Fix invalid type cast
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: I09213ff1264d2662f3e360c0bf871c25e3849fb7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1775
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 14:15:09 +00:00
Jaroslaw Pelczar
3f388e607f s3: Fix invalid type casts
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: If742f17efb02ef78ce7ca2475f126735f802e8aa
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1773
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 14:10:18 +00:00
Jaroslaw Pelczar
ca759905f8 ati: Fix invalid type casts
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: Ifc968ae6f8c485c1ea050430814ae6cfeecdbd44
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1772
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 14:10:18 +00:00
Jaroslaw Pelczar
6a9b2bf7f4 3dfx: fix invalid type casts
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: I3afb2ff4441524be62287c460ef82e82cedfcc2a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1771
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 14:10:18 +00:00
Jaroslaw Pelczar
c6e4214796 SerialMouse.h: Fix broken code
error: 'typedef' was ignored in this declaration

Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: Iad5b398d750ed76f352510b625867fab05e1411d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1770
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 14:10:18 +00:00
Jaroslaw Pelczar
f31e9e37d9 clipboard.cpp test: Fix invalid type
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: Ie1d098d23915d7585f7e8023adcea4ed0abca55f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1767
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 14:05:41 +00:00
Jaroslaw Pelczar
1abefaffb7 string_utf8_tests.cpp: Add missing include for exit() definition
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: I555d9479307747c13b104bc6a99af672641ae2c7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1766
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 14:05:41 +00:00
Jaroslaw Pelczar
79ec5aac1f RosterShell.cpp: Fix for error: cast from 'void*' to 'team_id' loses precision
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: Icc4fb1347b2473f52e4b25855356c0708651edf4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1765
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 14:05:41 +00:00
Jaroslaw Pelczar
ecba909c8c playwav.cpp: Fix function conflict
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: I196e05fb351308851c6568a38cadeae2e20697ee
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1763
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 14:02:35 +00:00
Jaroslaw Pelczar
4f77a907ba debuganalyzer: Fix catch of polymorphic object by value
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: I1290a313905d3d940532c7c1626a631bf70afb29
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1762
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 14:02:35 +00:00
Jaroslaw Pelczar
8965d4ab78 DebugAnalyzer.cpp: Fix catch of polymorphic exception by value
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: I580dafec7fa0ab038b394f50a5a5131b86711cde
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1761
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 14:02:35 +00:00
Jaroslaw Pelczar
7e66a28740 libkernelppp: Use arpa/inet.h for htons macros
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: I6a9c8ef664d266b4d720fcf85525e73d82e6bd43
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1760
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 14:02:35 +00:00
Jaroslaw Pelczar
47d568796d KPPPInterface.cpp: Fix GCC error
src/add-ons/kernel/network/ppp/shared/libkernelppp/KPPPInterface.cpp: In
member function 'void KPPPInterface::CalculateBaudRate()':
src/add-ons/kernel/network/ppp/shared/libkernelppp/KPPPInterface.cpp:2018:4:
error: this 'if' clause does not guard...
[-Werror=misleading-indentation]
    if (ChildAt(index)->Ifnet())
    ^~
src/add-ons/kernel/network/ppp/shared/libkernelppp/KPPPInterface.cpp:2020:5:
note: ...this statement, but the latter is misleadingly indented as if
it were guarded by the 'if'
     return;

Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: I8790a8ea3a961d73073b295ac438f3c60c16fcba
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1759
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 14:02:35 +00:00
Jaroslaw Pelczar
e7742a11bd neomagic: Use uintptr_t instead of uint32_t for type casts
This fixes 64-bit build with modern GCC

Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: Ifaa719d8ec45f021cf01320df9639d4f8a03c957
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1758
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 14:02:35 +00:00
Jaroslaw Pelczar
af47fc80f9 KPPPInterface.cpp: Fix missing autolocker variable name
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: I2eb8211477568e3b34e4b9eff5efa5c84c540ccd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1757
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 14:02:35 +00:00
Mikael Konradsson
178d693469 DiskUsage: Fixed scanning status label text color for dark mode.
Change-Id: Iac5f1649c0bd6873448f66a544647e37a542d9b2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1756
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-08-29 15:23:30 +00:00
Augustin Cavalier
06f4ddb09c nvme_disk: Add missing cast to off_t.
Should fix the 64-bit build.
2019-08-28 23:36:52 -04:00
Augustin Cavalier
cca88a8133 tools/exec: Implement basic environment overrides.
VAL=xxx... and VAL=$VAL:xxx... are supported; all other syntaxes
will fail with an error message.

When combined with a build/jam patch that will come in a later
commit, this makes it possible to build a large number of targets
using exec as JAMSHELL; including all of libroot. The performance
difference is extremely obvious:

jam -j2 libroot, JAMSHELL=/bin/sh (32-bit Haiku)
real 1m43.571s
user 1m10.961s
sys  1m7.965s

jam -j2 libroot, JAMSHELL=exec
real 1m28.364s
user 0m58.190s
sys  0m57.563s

So that is a savings of 15.21 seconds, or 15% of the build time.
Something that is less I/O bound and more fork-bound (e.g.
linking application catalogs) will almost certainly see
an even bigger performance difference.

Changes to add the necessary JAMSHELL overrides for those
targets which need it, in order to make it possible to
enable usage of "exec" by default, will be coming
over the next few days/weeks...
2019-08-28 22:56:43 -04:00
Augustin Cavalier
3cfe881d88 OverriddenJamRules: Remove an unneeded and erroneous ";" 2019-08-28 22:52:22 -04:00
Augustin Cavalier
b9b6a688e3 tools/exec: Exit with an error upon attempting to run multiple commands.
This way, things that need a real shell will be more clear.
2019-08-28 21:17:20 -04:00
Augustin Cavalier
a5f58aba57 tools: Add an "exec" tool.
This utility takes command-strings, e.g. "gcc -c file.c -D...",
parses them into an argv, and then execvp()s that. The use-case
is Jam, which cannot do this itself, but instead simply calls
JAMSHELL (usually just "/bin/sh -c") to do that for it.

Shells in general have a large amount of overhead (and bash in
particular is especially bad here), so using a utility like this
as JAMSHELL in most cases can be a significant speed-up.

For example, on Haiku (32-bit):

$ time sh -c 'for i in {1..100}; do sh -c "./exec test"; done'
real    0m3.335s
user    0m1.603s
sys     0m1.612s

$ time sh -c 'for i in {1..100}; do ./exec test; done'
real    0m1.547s
user    0m0.597s
sys     0m0.867s

So this means for every 100 executions, using bash has about 3.3s of
overhead, and this tool cuts out over half of that. Probably for
longer command strings, the overhead is significantly greater.
But that should be clear soon enough...
2019-08-28 20:18:59 -04:00
Augustin Cavalier
43895d3147 nvme_disk: Better protection against underflows.
This was using unsigned integer math and then trying to clamp to 0.
That won't work. Use off_t instead, which is an int64 and thus signed.
May fix behavior in some stranger error conditions.

While I'm at it, avoid reading in the beginning partial block
if we don't need to.
2019-08-27 23:44:35 -04:00
Adrien Destugues
03d334bbdf build fixes.
sys/types.h cannot incliude endian.h because that creates circular
include dependencies.

Add proper multiarch grist to libcolumnlistview.
2019-08-27 20:51:51 +02:00
Adrien Destugues
261430c5ae Clarify endianness defines. 2019-08-27 17:44:57 +02:00
Augustin Cavalier
26e0b0c8d6 kernel/x86_64: Add errata patching.
The patched errata are only the AMD ones FreeBSD patches
(it seems there are no Intel errata that can be patched
this way, they are all in microcode updates ... or can't
be patched in the CPU at all.)

This also seems to be roughly the point in the boot that
FreeBSD patches these, too, despite how "critical" some
of them seem.

Change-Id: I9065f8d025332418a21c2cdf39afd7d29405edcc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1740
Reviewed-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
2019-08-27 10:03:39 +00:00
Jessica Hamilton
d7818b5aae sys/types: include endian.h, and fix endian definitions.
* Defining LITTLE/BIG_ENDIAN as 0 breaks some feature test macros,
  particularly in autoconf. Checking with FreeBSD, their macros
  define a non-zero value as well.

References:
- https://github.com/freebsd/freebsd/blob/master/sys/x86/include/endian.h
- http://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/c.m4#n1584
Change-Id: I61b0bbad74e2bf5248464a5c15e504b9f45bea7f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1526
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-08-27 10:02:45 +00:00
Adrien Destugues
ab56137e24 IconCache: remove incorrect ASSERT()
The code does just fine both if entry is NULL and if it doesn't have an
icon. However, if entry is NULL, this assert calls a method on it, which
is a bad idea.

Change-Id: I80b314db373970d99eb008aeaec6254d14c39ca7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1749
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-08-27 06:55:47 +00:00
Simon South
b9d9c282fd input_server: Notify apps of new key map
Define a new message, B_KEY_MAP_LOADED, that is broadcast to applications by
the Input Server each time a key map is loaded. This allows apps that cache
key-map data to know when their copy has become stale.

Change InputServer::HandleGetSetKeyMap() so it returns an error in the event
loading even the system (fallback) key map fails.

Change-Id: Icc6c884f695ca59c687d83c680bb2fb467dd90cc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1741
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-27 06:49:37 +00:00
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