Commit Graph

50792 Commits

Author SHA1 Message Date
Ingo Weinhold
05b565f4f2 Add private BDataPositionIOWrapper
Implements the BPositionIO interface on top of a BDataIO, requiring the
{Read,Write}At() accesses to be sequential.
2014-07-13 17:57:56 +02:00
Ingo Weinhold
44c4771163 BPackageWriter: Add BPositionIO support 2014-07-13 17:57:55 +02:00
Julian Harnath
b916156a83 Move libroot synchronization functions to private namespace
* Prefix lock functions with __ to mark them as private. Add
  forwarding macros to keep existing code working.

* Avoids symbol name clashes with kernel lock APIs, occuring when
  using kernellandemu-lib in userlandfs. Thanks to Ingo for the
  suggestion.
2014-07-13 16:19:08 +02:00
Julian Harnath
2e75b75292 Fix building Haiku from Haiku
* Always include cdefs.h to have __[BEGIN|END]_DECLS defined.
  Somehow, this didn't affect cross-build, but it made building
  from Haiku fail.
2014-07-13 15:35:31 +02:00
Ingo Weinhold
f9ecc54e69 package: Explicitly use B_HPKG_COMPRESSION_NONE 2014-07-12 23:13:11 +02:00
Ingo Weinhold
8f5130edfa package kit: Actually add support for B_HPKG_COMPRESSION_NONE
Until now we always declared in the HPKG header that the package file is
zlib compressed. For uncompressed files we would just store all
individual chunks uncompressed. Now we handle completely uncompressed
files slightly differently: We don't write the redundant chunk size
table anymore. The size savings are minor, but it makes the uncompressed
format read-streamable which may be handy.
2014-07-12 23:12:21 +02:00
Ingo Weinhold
e8681d9409 Increase boot loader size for x86* boot floppy a bit 2014-07-12 18:41:09 +02:00
Ingo Weinhold
e527b79631 Switch package file accessor classes to use BPositionIO
* PackageFileHeap{Reader,Writer} as well as Package{Reader,Writer} and
  their implementation and super classes do now internally use a
  BPositionIO instead of a FD to access the package file. This provides
  more flexibility needed for features to come.
* BPackageReader has already grown a new Init() version with a
  BPositionIO* parameter.
2014-07-12 15:40:22 +02:00
Ingo Weinhold
01e6d687c0 boot loader: Add pwrite(), lseek(), ftruncate()
ftruncate() is just a stub (needed for BFdIO).
2014-07-12 15:40:22 +02:00
Ingo Weinhold
c55a06055f Add private class BFdIO
Simple BPositionIO implementation using the POSIX API on a FD. In effect
similar to BFile, but more easily ported to kernel and boot loader (and
the FD is reusable).
2014-07-12 15:40:21 +02:00
Ingo Weinhold
8546c4160e BPositionIO: Add {Read,Write}AtExactly()
Analoguous to {Read,Write}Exactly(), just for the *At() versions.
2014-07-12 15:40:21 +02:00
Ingo Weinhold
1b50eb7d91 Remove unnecessary zlib build feature dependency 2014-07-12 15:40:21 +02:00
Jérôme Duval
57f444065f Update FreeBSD network drivers with the 9.3 release 2014-07-12 14:32:52 +02:00
Rene Gollent
712e51d79a Build fix. 2014-07-11 20:16:01 -04:00
Rene Gollent
e4adab2698 Debugger: Fix minor issue noted in #11003.
- Reset tooltip when it's no longer needed (i.e. if the file path changes).
  Otherwise, we'd erroneously show the old tooltip if the new path was short
  enough to no longer be truncated, as would often happen after locating a
  missing source file.
2014-07-11 20:07:25 -04:00
Julian Harnath
2f1684345e Use BPathFinder to find userlandfs add-ons
* ...to make it work with packaged and non-packaged.
2014-07-12 02:00:10 +02:00
Julian Harnath
604770b313 Adapt kernelland_emu to kernel API changes
* Adapt to changes in kernel synchronization APIs.

* Makes userlandfs work again.
2014-07-12 02:00:08 +02:00
Julian Harnath
a0d87686f4 Adapt userlandfs kernel-addon to atomic_* API changes.
* Remove volatile qualifiers, use atomic_get() for safe access

* Fixes build of userlandfs
2014-07-12 02:00:05 +02:00
Akshay Jaggi
192f01c669 XHCI USB: Some more fixes.
* Fix device speed identification.
* Fix Max Packet Size for Full-Speed devices.
* Fix IRQ rate.
* Update slot context for LS/FS devices connected to non-root HS hub.
* Fix typo.

Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2014-07-12 00:11:39 +02:00
Jérôme Duval
74e1a530f8 Revert unrelated part of 17aa359b5d. 2014-07-11 22:23:21 +02:00
Akshay Jaggi
17aa359b5d XHCI USB: Fixes.
* Add support for hubs in AllocateDevice().
* Prevent page fault in FinishTransfers().
* Set fCapabilityLength
* Correct in BIOS ownership code
* Fix context errors in _InsertEndpointForPipe().
* Update constants according to latest Specification (v1.1)
* Fix SMI code (reference
http://lkml.iu.edu/hypermail/linux/kernel/1204.2/02460.html).
* Fix Memory/Device-Slot leaks.
* Fix area allocation for TRBs.
* Fix for Intel Lynx Point and Panther Point chipsets. Also move init
of xhci before ehci, to switch USB 2.0 ports before the ehci module
discovers them.

Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2014-07-11 22:14:05 +02:00
John Scipione
8674959175 Input Server: Fix double free.
CID610594
2014-07-11 13:04:26 -04:00
John Scipione
b128ce7eff Input Server: style fix, compare with 0 explicitly 2014-07-11 13:02:51 -04:00
Augustin Cavalier
7481292e36 CDPlayer: remove from image & delete
* Does not work on recent hardware
  * It now lives at: https://github.com/HaikuArchives/CDPlayer

Signed-off-by: Axel Dörfler <axeld@pinc-software.de>
2014-07-09 22:54:51 +02:00
Axel Dörfler
de9c061339 bfs: Use the QueryParserUtils instead of its own copy.
* Ingo copied the methods into a shared location, and then obviously
  "forgot" to let BFS use them. As a side note for Ingo: the complete
  error GCC reported was "std::fssh_size_t" not defined with the macro
  wrapper as code location. The actual problem was a "using std::size_t"
  in some C++ header that accidentally got included after the wrapper.
* The shared Query code is not yet used. That'll be done another time.
* Renamed BFS_SHELL define to FS_SHELL, such that QueryParserUtils can be
  used in any file system shell, not just the bfs_shell.
2014-07-09 22:54:39 +02:00
Axel Dörfler
ba32021824 bfs: fixed wrong key comparison in validator.
* bplustree_header::DataType() is not compatible with the type constants
  compareKeys() expects. Use _CompareKeys() instead.
2014-07-09 22:54:39 +02:00
Augustin Cavalier
e35fa24e16 Update BePDF package and its dependencies.
Signed-off-by: Oliver Tappe <zooey@hirschkaefer.de>
2014-07-09 22:18:03 +02:00
Augustin Cavalier
8566c721c7 file_systems/cdda: Various fixes.
* When restoring shared attributes, don't affect CDDB:lookup status
 * Volume renames should not affect CDDB:lookup status, only file renames should

This fixes some of the "cddb_daemon not updating CD info" problems.

Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2014-07-09 20:54:38 +02:00
Jérôme Duval
e8f82cdb6e file_systems/cdda: avoid leaking the attributes fd.
* see bug #9528.
2014-07-09 20:54:11 +02:00
Augustin Cavalier
0b38b0a136 cddb_daemon: Various fixes.
* Add ".wav" to the ends of filenames
 * Add a track number at the beginning of the filename, e.g. "01"
 * Don't hard-fail if the FreeDB response contains an invalid year

Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2014-07-09 20:10:16 +02:00
Colin Günther
d65388e7fa Media Kit: Add workaround for #11018 to MP3 audio stream decoder test.
The workaround triggers the loading of all media plugins prior to using
methods of class BMediaFormats. Using the function get_next_encoder()
is used because of two facts

1. It is publicly available and thus can be used by 3rd party apps,
   too.
2. It is already available by including BMediaFormats.h, so there is
   no need to include another header for this workaround.

Signed-off-by: Colin Günther <coling@gmx.de>
(cherry picked from commit a89b0a4e69f18b2b3b2c2f5615450a5ddac838af)
2014-07-09 19:06:27 +02:00
Colin Günther
50b586b9de Media Kit: Add workaround for #11018 to MPEG2 video stream decoder test.
The workaround triggers the loading of all media plugins prior to using
methods of class BMediaFormats. Using the function get_next_encoder()
is used because of two facts

1. It is publicly available and thus can be used by 3rd party apps,
   too.
2. It is already available by including BMediaFormats.h, so there is
   no need to include another header for this workaround.

Signed-off-by: Colin Günther <coling@gmx.de>
(cherry picked from commit 80354716fe8b25c81ec45bd96ae36e171228b8a0)
2014-07-09 19:06:12 +02:00
Colin Günther
366ee54830 DVB media addon: Fix debug build.
- Compiling dvb.media_addon with DEBUG on fails with error message:
    generated/objects/haiku/x86/debug_1/add-ons/media/media-add-ons/dvb/
    MediaFormat.o: In function `av_log2_c': /boot/home/Development/haiku-a4/
    generated/build_packages/ffmpeg-0.10.2-r1a4-x86-gcc2-2012-08-30/common/
    include/libavutil/common.h:80: undefined reference to `ff_log2_tab'
    collect2: ld returned 1 exit status"

- Research done to narrow down the solution space:
    - ff_log2_tab is a array that is nowhere needed in the dvb.media_addon
    - ff_log2_tab is defined as an extern array in the ffmpeg header file
      libavutil/common.h
    - ff_log2_tab is used in the inline function av_log2_c (libavutil/common.h)
      which doesn't get optimized away when compiling with debug information
    - MediaFormat.cpp needs only some Codec-IDs from the ffmpeg header file
      avcodec.h

- The following fixes were tried:
    - Trying to eliminate unused debug symbols with compilation
      flag -feliminate-unused-debug-types (see gcc documentation
      http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Debugging-Options.html#Debugging-Options)
      by adding the following lines to UserBuildConfig
          AppendToConfigVar C++FLAGS : HAIKU_TOP src : -feliminate-unused-debug-types : global ;
          AppendToConfigVar CCFLAGS : HAIKU_TOP src : -feliminate-unused-debug-types : global ;
      -> Failed, because flag -feliminate-unused-debug-types is not supported by GCC 2.95.3

    - Trying to eliminate unused debug symbols in the linker stage
      -> This worked, by removing the LINKFLAG "-Xlinker --no-undefined" when
         linking all objects into the dvb.media_addon we are getting our addon
         with debug symbols.

- Final solution:
    - Instead of adding/removing flags, we just add the missing implementation
      for the ff_log2_tab array in MediaFormat.cpp. This -feels- the seems to
      be the cleanest solution as it is more obvious what's goin' on compared
      to hiding the solution in the Jamfile.

Signed-off-by: Colin Günther <coling@gmx.de>
2014-07-09 19:05:00 +02:00
Gerasim Troeglazov
cb5ed9c755 MimeType: fix SetFileExtensions 2014-07-09 13:23:01 +00:00
Ingo Weinhold
a629567a90 package: Add command recompress
The streaming feature for -0 is missing yet.
2014-07-08 22:00:36 +02:00
Ingo Weinhold
cdfeba5a1e BPackageWriter: Add Recompress()
Allows rewriting an existing package file with a different compression.
2014-07-08 22:00:35 +02:00
Ingo Weinhold
2fc2aebcba PackageWriterImpl: Move _Finish() impl to match order in header 2014-07-08 22:00:35 +02:00
Ingo Weinhold
f5a20d5ff1 package kit: PackageFileHeapReader::Init(): Sanity checks
Make sure the compressed/uncompressed heap size and the chunk size
table look plausible, so we can rely on the values later. Fixes
potential crashes for corrupt packages.
2014-07-08 22:00:35 +02:00
Augustin Cavalier
d229332a33 CIDs 1162783 & 1162784: out-of-bounds access & write in MSI.
* The number of IO vectors is not 256 on x86, but rather 224 as set by
  NUM_IO_VECTORS in "arch_int.h".
* Jessicah mentioned hearing about MSI crashes before, but that was a
  few weeks ago.
* These were the only CIDs in the MSI code.

Signed-off-by: Michael Lotz <mmlr@mlotz.ch>
2014-07-08 20:39:37 +02:00
John Scipione
819b454750 PS/2 bus manager: style fixes only 2014-07-07 17:38:55 -04:00
Colin Günther
7a28891db4 Media Kit: Add MP3 audio stream decoder test.
- This test currently fails and thus showing that there is something wrong in
  the Media Kit.
- This test was first developed and tested on Haiku R1 Alpha 4.1 where
  every thing was hacked together to make this test succeed, thus showing that
  the current Media Kit state of affair has some issues and not this test :)
- The test comes with documentation (@see mp3_decoder_test.cpp).

Signed-off-by: Colin Günther <coling@gmx.de>
2014-07-06 13:51:35 +00:00
Colin Günther
c5954368ed Media Kit: Add MPEG2 video stream decoder test.
- This test currently fails and thus showing that there is something wrong in
  the Media Kit.
- This test was first developed and tested on Haiku R1 Alpha 4.1 where
  every thing was hacked together to make this test succeed, thus showing that
  the current Media Kit state of affair has some issues and not this test :)
- The test comes with documentation (@see mpeg2_decoder.test.cpp).

Signed-off-by: Colin Günther <coling@gmx.de>
2014-07-06 13:51:31 +00:00
Augustin Cavalier
d71c5a1ebf #10717: Addressing issues brought up by Axel and Gerasim
Signed-off-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
2014-07-06 14:02:12 +12:00
Augustin Cavalier
ba38276d19 Ensure partition block size is not 0.
* I tried having this test in KDiskDeviceManager.cpp, but it
   failed booting in one case and did not solve the problem in another.
   I think this is because there is an Open() call here, and that rereads
   the blocksize.
 * Tested and it solved the problem for me.
 * Should fix #10717 and #9489 at least.

Signed-off-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
2014-07-06 10:24:14 +12:00
François Revol
6c2a6f092c clipboard: Hopefully fix 64bit build
Untested
2014-07-04 14:39:03 +02:00
François Revol
9220bcf1f6 Add /bin/clipboard to the regular images
Seemed to have gone missing in action somehow.
2014-07-04 13:58:58 +02:00
Jérôme Duval
756ed316a7 gcc_bootstrap: bump revision. 2014-07-04 00:08:07 +02:00
Arvind S Raj
c2da73b90e Corrected version of gcc_bootstrap to match the version in HaikuPorts recipe.
* There was a version mismatch between HaikuPorts gcc_bootstrap recipe
  and build/jam/repositories/HaikuPortsCross/arm which prevented
  building @bootstrap-raw for ARM. Thanks Ingo for helping out!
* Ditto for ppc, x86, x86_64.

Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2014-07-03 22:26:02 +02:00
Oliver Tappe
c90d405154 Disable TLS support on x86_64 explicitly.
* Building gcc-4.8.3 on x86_64 with TLS support fails with an internal
  compiler error. Until that problem is fixed, don't use TLS on x86_64,
  which (due to libstdc++ compatibility) requires the same for the
  host cross compiler.
2014-07-03 19:43:24 +02:00
Oliver Tappe
6f32bafa70 Use a specific packager for continuous integration builds. 2014-07-03 18:12:07 +02:00