Commit Graph

58656 Commits

Author SHA1 Message Date
Alexander von Gluck IV
a6cb002e99 boot/mmu: Consolidate some fdt mapping functions
* Realized we already had a function which iterates over
  an fdt node and maps it's memory regs. Make it work for
  physical mappings or identity mappings.

Change-Id: I0e3e323798bc2dfcead1accc1d403b30a8ab188f
2018-08-14 16:16:01 -05:00
Augustin Cavalier
ab39ceb10c system/glue: Add a crtbegin and crtend implementation.
GCC provides these but Clang does not; these come from the ones Clang
was going to provide, but decided against it in favor of letting libc vendors
distribute them instead, hence the license headers.

For now, they are only enabled when building with Clang, as we still use GCC's
versions otherwise. But I've tested them with apps built with GCC 7 (as Clang
builds are still too broken at present) and they seem to work just fine. (They
will not build with GCC 2 of course, due to how they use __attribute__.)
2018-08-14 16:07:03 -04:00
Humdinger
deeaee6fc9 Boot options: add help text to state selection
To indicate this is a menu you can enter to select a previous
state to boot. Also rename "Latest version" to "Latest state" as
that is more correct.
Thanks waddlesplash for pointers.

Fixes #14362
2018-08-14 21:11:16 +02:00
Augustin Cavalier
1742c769aa translation: Disable localization for command-line tools. 2018-08-14 14:29:23 -04:00
Augustin Cavalier
06b10d86af Appearance: Reinstate changes to allow full-and-half-fixed fonts as fixed.
This reverts commit 033f3450e3.

The discussion on the mailing list has tended towards changing the BFont API
so that these kind of fonts return true for IsFixed() as well as IsFullAndHalfFixed
if only to avoid the API ugliness of be_fixed_font->IsFixed() returning
false.

But since that change should not really affect applications, as BeOS ones will
probably not support CJK characters at all and Haiku ones should work properly,
and the present state of affairs has been pretty annoying to CJK users, we can
at least allow users to select full-and-half-fixed fonts as their default
fixed font, and begin dealing with whatever bugs that may cause now.
2018-08-14 13:54:37 -04:00
Augustin Cavalier
fd25b902be BControlLook: Add FBC padding.
Fixes #14295.
2018-08-14 13:54:37 -04:00
Augustin Cavalier
0e44a703e5 BTabView: Don't assume BControlLook is in BPrivate.
Eventually it won't be, and we have a "using" directive so it is
accessible from the global namespace, so we can make this change
already.
2018-08-14 13:54:36 -04:00
Augustin Cavalier
937314e526 ArchitectureRules: Enable --no-undefined on GCC2.
Seems to work just fine.
2018-08-14 13:54:36 -04:00
Adrien Destugues
b24d095e90 usb: support for retrieving full configuration descriptors
In USB, the interface and endpoint descriptors, and possibly other
vendor-specific descriptors, are nested inside the configuration
descriptors. This makes it possible to retrieve the complete information
about a configuration in one single call.

Our drivers do this, and so does libusb (the Device Kit doesn't, it only
cares about individual descriptors and does not provide access to the
vendor-specific ones).

The driver did not expose the full descriptor, only the part that
belongs strictly to the configuration. libusb worked around this by
getting the descriptor from the device directly, using a control
transfer. This should be ok, but apparently some devices get confused
when you do this too often or at unexpected times.

These changes introduce a variation of the GET_CONFIGURATION_DESCRIPTOR
ioctl that allows the caller to specify a size. This way, one can get
the complete descriptor (after getting the configuration-only part to
figure out the size needed, most likely). The data is copied from
structures stored by the driver, so no further communication with the
device is necessary, making this safe to the problems mentioned above,
and faster.

Change-Id: Id97e40ea0d45b8c051ae8548486c4751fc6aad2a
Reviewed-on: https://review.haiku-os.org/453
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2018-08-14 15:22:56 +00:00
JackBurton79
1d404e45f1 ffmpeg plugin: use avformat/codec_free_context() where applicable 2018-08-14 14:43:30 +02:00
JackBurton79
a4e89ff894 AVFormatWriter: free the context with the correct function 2018-08-14 13:49:48 +02:00
JackBurton79
ee3e1cbe0b Use the constant instead of the numeric value 2018-08-14 13:49:48 +02:00
Augustin Cavalier
7457ccb4b2 BMessageFormat: Rename to BStringFormat.
The ICU class is named MessageFormat, but on Haiku, it sounds too much
like something related to BMessage (which it isn't in the slightest)
and not part of the Locale system. It works almost entirely with BStrings,
so naming it BStringFormat makes much more sense.

OK'ed by PulkoMandy and Humdinger.
2018-08-13 20:49:00 -04:00
Augustin Cavalier
8906767241 tools/translation: B_TRANSLATE_CONTEXT -> B_TRANSLATION_CONTEXT. 2018-08-13 17:09:06 -04:00
Augustin Cavalier
4c13d20c24 LocaleRules: Pass the files to the preprocessor instead of piping it in.
This rule process the entire target's source files at once, and so
whoever wrote this rule in the first place (PulkoMandy?) probably
assumed without even testing that "cc -E" would create multiple
outputs for multiple inputs.

It doesn't, though: it just outputs them in sequence on the command line
the same way it does when the files are piped in through "cat". This
also has other advantages (e.g. preprocess errors caused by the compiler
assuming it was C not C++ code and so not defining __cplusplus, local
includes are now resolved properly, etc.)

Doing it this way does exposes other problems like the one fixed in the
previous commit (headers with no context defined, which worked previously
only because they used the context of the preceding `cat`'ed file.)

We now also remove the .pre file after collecting the catkeys.
2018-08-13 17:00:16 -04:00
Augustin Cavalier
d284f7cc43 keyboard_layouts & keymaps: Define translation contexts properly. 2018-08-13 16:44:22 -04:00
Augustin Cavalier
20c61bb7a4 Revert unrelated changes from previous commit.
I should have read the update script more closely as to
how it added changes for committing...
2018-08-13 15:58:01 -04:00
Augustin Cavalier
5924b6e410 configure: Guard against using Clang < 7 for builds.
Only Clang 7+ has -fno-delete-null-pointer-checks.
2018-08-13 15:54:53 -04:00
Autocomitter
ef9994ee77 Update translations from Pootle 2018-08-13 19:45:39 +00:00
Murai Takashi
30ee7c9dba Pulse: Fix -Wformat-overflow
Gcc8 x86_64 warns sprintf() output between 2 and 9 bytes
into a destination of size 4. But, sprintf output can be
within 4 bytes since SMP_MAX_CPUS is 64 max.
So replace sprintf() with snprintf() and modify
format string to fix Wformat-overflow.

Change-Id: I7a23e6d98a5dd02a32a5aae573947a5650c82f7f
Reviewed-on: https://review.haiku-os.org/446
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2018-08-13 15:16:48 +00:00
JackBurton79
7c423844de Spacing style 2018-08-13 10:03:45 +02:00
Augustin Cavalier
0f36120d8d "R5" fs_shell: Remove (mostly.)
Two files remain: "argv.c" and "argv.h", as these are still used by some
other, non-FS-related tests.

This was one of the last significant chunks of "no commercial use" code
in the tree, as it originally came from the "Filesystem Construction Kit,"
the sample code distributed with "Practical Filesystem Design with the Be FS",
and contained a sigifincant amount of BeOS kernel filesystem code in it
(the original README, not preserved here, noted that "the cache code is
the real Release 4 BeOS disk cache code".)

It has long been replaced by Ingo's from-scratch, MIT-licensed fs_shell
that lives in src/tools/fs_shell. Perhaps a note should be made somewhere
of this code's prior existence, but I don't think we will have much use for
it again, so confined to the dustbin of Git history it shall be.
2018-08-12 23:38:10 -04:00
Augustin Cavalier
38c59f2971 tests/device_manager: Remove dependence on fs_shell.
Doesn't build currently due to KPath API changes, but this seems unneeded
at least.
2018-08-12 23:37:18 -04:00
Augustin Cavalier
e3db3bf84e btrfs_shell: Move from src/tools to src/tests/...
src/tools is for tools used in the build or other miscellaneous utilites
that go along with Haiku itself. btrfs is, at least for now, just another
filesystem addon, so its shell should live here with all the others.
No functional change intended.
2018-08-12 23:21:14 -04:00
Augustin Cavalier
52de96da04 udf_shell: Rework to use the fs_shell in tools/.
The build appears to have been broken for quite a long time, but this
gets it slightly closer at least.
2018-08-12 23:16:04 -04:00
Augustin Cavalier
38fa917c59 iso9660_shell: Use the fs_shell from src/tools; fix the build. 2018-08-12 23:05:11 -04:00
Augustin Cavalier
87b501a119 tests/udf: Remove the "R5" version.
Largely untouched since 2006.
2018-08-12 22:47:27 -04:00
Augustin Cavalier
e24a254f55 tests/dosfs: Remove the "R5" version.
Untouched since 2006.
2018-08-12 22:46:28 -04:00
Adrien Destugues
af8f2a39a0 ffmpeg: do not compute duration for "mutable size" streams.
Fixes #14326 without breaking other things.
2018-08-12 09:49:36 +02:00
Augustin Cavalier
f2015c2f81 boot/platform/cfe: Remove, unused.
All platforms it was theoretically useful for also have U-Boot.
OK'd by mmu_man.
2018-08-11 20:21:12 -04:00
Adrien Destugues
58a62dd65f Add unit test for BOutlineListView.
Change-Id: Icad7e7c659141fae1bb6e52571f001c9f561a446
Reviewed-on: https://review.haiku-os.org/451
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2018-08-11 23:15:10 +00:00
Sean Healy
2f3e1117f9 BOutlineListView::EachItemUnder gets too many items
EachItemUnder selects items that are not in fact under the superitem
passed to the method.

ticket: #13730
Change-Id: I12a2e29204e1b9bbecd5704e60a02e3613a7f4fd
Reviewed-on: https://review.haiku-os.org/52
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-08-11 23:15:10 +00:00
Jérôme Duval
81375d4fbb Package Kit: add Zstd compression.
Change-Id: Idbdb7cf1bde659046a88ea69a76e3b5fc4cd7013
Reviewed-on: https://review.haiku-os.org/323
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2018-08-11 23:10:00 +00:00
Augustin Cavalier
b8a38e2bc1 ArchitectureRules: Move Clang warning flags to appropriate location.
Also tweak the no-delete-null-pointer-checks comment so it's slightly
less offending of the 80-chars rule.
2018-08-11 15:36:04 -04:00
Augustin Cavalier
e823d3f06f BeOSRules: Pass CCFLAGS through to the compiler during ResComp.
Otherwise, Clang warns that we haven't set an architecture on ARM,
which is set in CCFLAGS. Since these might also contain other flags
that affect the preprocessor, there isn't any good reason to not
pass it through, so do that.
2018-08-11 15:33:08 -04:00
Augustin Cavalier
d0bfb2c044 ArchitectureRules: Append Clang flags before potential early-exit.
Gets the Clang-ARM build a bit further into libroot.
2018-08-11 15:26:54 -04:00
Augustin Cavalier
376472a816 libroot: Some fixes for Clang ARM builds. 2018-08-11 15:26:08 -04:00
Augustin Cavalier
47a96c099e MainBuildRules: Fix CreateAsmStructOffsetsHeader on recent Clang.
It seems that at on some platforms at least, Clang uses @define instead
of #define, but with functionally identical syntax, so use sed to
process it as such.
2018-08-11 15:20:30 -04:00
Augustin Cavalier
cf10fee2c1 ArchitectureRules: Pass -march / -mcpu flags to the assembler also.
Fixes #14317.
2018-08-11 15:18:36 -04:00
Augustin Cavalier
eef7e3f1f8 freebsd11_wlan: Turn debugging level down a bit.
Should fix the first part of #1431.
2018-08-11 12:27:53 -04:00
Adrien Destugues
3bd0b6ec81 ffmpeg: do not compute a duration for streaming streams.
Streaming means the stream is endless, so don't compute a duration.

ffmpeg computes an estimation using what it thinks is the file size, but
is instead some internal buffer size from BAdapterIO.

Fixes second part of #14326.
2018-08-11 11:59:09 +02:00
krish_iyer
0ea0138965 SDHCI MMC Driver Documentation
Change-Id: I4bbe302fabd21133a9c03b9e48a407db8afbc70e
Reviewed-on: https://review.haiku-os.org/452
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2018-08-10 12:08:35 +00:00
François Revol
c476e73be7 freebsd11_network: allocate a new root device for each attach
else the pci_info struct is reused and overwritten.

This made the broadcom43xx driver write to the PCI config regs of other
devices...
2018-08-10 07:21:30 +02:00
François Revol
4cd13e2a54 freebsd11_network: calculate the size of memory resources from the BAR
128kB ought to be enough for everyone, but that's not a reason.
2018-08-10 07:18:49 +02:00
François Revol
ba88131cfd broadcom43xx: fix dereferencing uninitialized pointer in bwi_getradiocaps
bwi_attach wasn't setting ic->ic_softc early enough.
2018-08-10 07:16:32 +02:00
Murai Takashi
00cbe4ccca Replace strncpy with strlcpy
Since destination size equals number of characters to copy.
Pointed out by gcc8. [-Werror=stringop-truncation]

Change-Id: I8f2118129ec2324bb1f93857f5abfdf121c864f0
Reviewed-on: https://review.haiku-os.org/450
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Skipp_OSX <jscipione@gmail.com>
2018-08-10 00:17:07 +00:00
Augustin Cavalier
b8761dc31c radeon_hd: Re-enable HD2400.
Vidrep says this works on most configurations, except for full HD
through the first port.
2018-08-09 20:07:32 -04:00
JackBurton79
373832ae60 Commented calling _EncodeVideoFrame() with NULL.
As Adrian suggested, it's not only inefficient to do that there, but also wrong.
Modified the TODO comment
Added a new TODO comment
2018-08-09 10:44:22 +02:00
JackBurton79
f049e59f50 Try to use the ffmpeg api more correctly:
call avcodec_receive_packet() in a loop, drain and flush the internal buffers.
Introduced private method to improve code readability (hopefully).
2018-08-09 09:12:19 +02:00
Augustin Cavalier
53a5dca9d7 packagefs: Fixup previous commit. 2018-08-08 23:57:11 -04:00