Commit Graph

60667 Commits

Author SHA1 Message Date
Adrien Destugues
df6cc9b5c9 BRoster: dereference symlinks when building RosterAppInfo
Should fix #15313

Change-Id: Ibd1d4f4195d794841ecddf3534177982cf894bcb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1803
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 19:20:06 +00:00
Adrien Destugues
e8f5d1ca66 bfs: erase ext2 superblock when initializing
Having valid superblocks from multiple filesystems on the same disk is
confusing, let's try to avoid that.

Change-Id: I1a58843d45ea52193a77faaf8dcc3ca6a049406e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1802
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 19:18:20 +00:00
Adrien Destugues
354311b57b filesystems: bump priority of BFS over others
If multipole filesystems think they can handle a volume, it makes sense
to assume the native one is to be used.

Makes my partitions with a BFS superblock and a leftover ext2 superblock
on them mountable again without manually specifying the filesystem type.

Fixes #15045.

Change-Id: Icb694472aa3de0a79e5f7d3c54976038e1e2590a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1801
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 19:18:20 +00:00
Adrien Destugues
b684f01835 ext2: fix panic mounting ext2-overwritten-with-BFS volumes
I have two partitions which used to be ext2, but have long since been
reinitialized as BFS. However, the ext2 superblock is still here, and
the ext2 filesystem will detect it. It crashes later on trying to access
an Inode at block -1, so just add a check for that to avoid the crash.

Change-Id: Ie2ed6a969ea3ffd343dedfe45a15dfc37af05804
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1800
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 19:18:20 +00:00
Jaroslaw Pelczar
1f52c921e2 ARM64: Initial changes so we can compile GCC toolchain
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: I0859d0619d601efd003472e2846d2f980ee2e457
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1799
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 19:05:16 +00:00
Humdinger
abdd9ab439 DriveSetup: Tweak mount mode icons and colors
* Use 2D icons for mount modes: encrypted, file, readonly, shared
  ('boot' already uses he 2D Overlay_leaf)
* Use more vibrant colors for used space indicators.
  (red = readonly, green = BFS, blue = non-BFS, grey/orange = encrypted)
* Don't have boot/bfs partitions override readonly status (red) with
  green. Keep it simple: if anything mounts read-only, show in red.

Change-Id: I4a7c53e1c1d3c6f4be35cbd680b2a7b5e1f9bea3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1755
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 14:29:38 +00:00
Mikael Konradsson
aabebc302e Interface Kit: Fix some hard-coded colors.
* Fix hardcoded black color in SeparatorView that caused invisible or
   hard to read labels if you had a dark panel color. E.g MediaPrefs
 * DrawBorder in HaikuControl didn't care about dark mode. Added check
   for light/dark and changed the Tinting accordingly. We should probably
   do the same for FancyBorder style as well.

Change-Id: I065211e56b0db5acd05ea287d6cacf75786f306f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1751
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 14:28:32 +00:00
Jaroslaw Pelczar
979676fb4e wcs_test.cpp: Fix invalid unicode strings
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: Ic09c229a1ee857e466ededbaa05fdd948c009fcd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1795
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 14:25:20 +00:00
Jaroslaw Pelczar
2995019e04 PartitioningSystemsTest.cpp: Add missing include
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: Ib249f360c6fdcd4d55b0835821c3f98b99a8dbfb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1793
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 14:24:49 +00:00
Jaroslaw Pelczar
2cf1b6d6aa specific_video_driver.cpp: Add missing include
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: I155e1a89561b43c3a83675c9a61c5e35496e217e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1792
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 14:24:49 +00:00
Jaroslaw Pelczar
46843fbb00 acpi_lid.cpp: Fix invalid preprocessor directive
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: I5358be797f0d2fa9b3b9437d5822db03e3c1b70d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1790
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 14:22:28 +00:00
Jaroslaw Pelczar
3a0988b833 s3:More fixes for invalid type casts
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: Id4170d950f9f79fc5edd808f49d58da974cb32b7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1788
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 14:20:22 +00:00
Jaroslaw Pelczar
132242e027 yuv_converter.h: Fix integer truncation
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: I445d3d2c4d80b65747257c0e4fc444427599c451
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1787
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 14:20:22 +00:00
Jaroslaw Pelczar
13b4d9799b VideoDecoder.cpp: Fix invalid C++ extra qualification
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: Ide54bce3a762826c33dafa87a1d7fdceac275619
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1786
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 14:20:22 +00:00
Jaroslaw Pelczar
297af3088c mp3_decoder_test: Fix invalid taking address of temporary
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: I2e41a048784a666de8937e224ee0cd8d17ba24ab
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1785
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 14:20:22 +00:00
Jaroslaw Pelczar
42630943fd transform_procs.c: Add missing include file for prototype
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: I916842c5cb415759ebca8ae36e6dac3006daad0b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1783
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 14:15:09 +00:00
Jaroslaw Pelczar
0cc862ea3b firewire: Fix invalid cast
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: I47faf4d2a54602e3c842c52507ecf7cba5c66cf5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1782
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 14:15:09 +00:00
Jaroslaw Pelczar
3ac18ca766 s3: Fix 64bit portability cast
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: I14486e5f1cc73c856f9db7373a398a567df0607c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1781
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 14:15:09 +00:00
Jaroslaw Pelczar
ea9bcf517a neomagic: Fix invalid print format
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: I1ab9ab87328a6e39c73c5e96095c1cfb424e4bc2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1780
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 14:15:09 +00:00
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