58778 Commits

Author SHA1 Message Date
Augustin Cavalier
3d0db15a6f repository_infos: Switch HaikuPorts to r1beta1.
It's just a direct mirror of master for the time being, but might not
be later.
2018-09-25 23:38:14 -04:00
Augustin Cavalier
5eb46b1219 kernel: Do not panic about full/partial slabs. 2018-09-25 23:36:44 -04:00
François Revol
4efc7b4068 radeon: make the framebuffer user-cloneable
This avoids an annoying panic...
2018-09-25 23:30:16 -04:00
Augustin Cavalier
e244c368a9 MediaPlayer: Quit the VideoProducer when we reach the last buffer.
Fixes #13622.

The "media_node_framework" is such a huge mess. We really should sit down
and design a MediaKit2 someday that doesn't require ~15,000 lines of media
node support code just to have a "fully functioning media player."
2018-09-25 23:30:06 -04:00
Augustin Cavalier
ea2ee3386b add-ons/media/ffmpeg: Use SWS for color-space conversion universally.
It seems to be as if not faster than the built-in method now as far
as I can tell, and this means one less arch-specific difference.
I haven't ripped all of it out yet, though.
2018-09-25 23:30:02 -04:00
Augustin Cavalier
53ef6a0ff5 add-ons/media/ffmpeg: Rework usage of AVPicture in AVCodecDecoder.
It has been deprecated since FFmpeg ~3.0, and is internally implemented
using these functions now, so this should largely be a no-op change.

AVCodecEncoder still uses it.
2018-09-25 23:29:58 -04:00
Augustin Cavalier
54cb67a43f add-ons/media/ffmpeg: Remove global initializer system.
All of the functions it calls are deprecated and no longer needed,
as FFmpeg loads all codecs automatically now, and uses pthreads internally
for locking as needed.
2018-09-25 23:29:55 -04:00
Augustin Cavalier
a52a856f6c add-ons/media/ffmpeg: Enable deprecation warnings.
There sure are a lot of them...
2018-09-25 23:29:51 -04:00
Augustin Cavalier
aef2ee83ba kernel: Handle the user buffers properly in _user_xsi_semctl.
Should fix #14512.
2018-09-25 23:29:18 -04:00
Augustin Cavalier
807ad0cf46 DefaultBuildProfiles: Without sources, release images fit in 700MB.
We don't want to ship these images as the ones for main distribution,
but at least we can make them available as downloads for those who do want
to use CDs.
2018-09-25 23:29:18 -04:00
Augustin Cavalier
3926374604 package_infos: x86_gcc2/* depend on FFmpeg.
Previously, secondary arch FFmpeg was not installed at all. This commit
fixes that.

Also pare down the dependencies a little to what we actually use.
2018-09-25 23:29:13 -04:00
Augustin Cavalier
ef5705f0aa netfs_mount: chmod +x. 2018-09-25 23:29:13 -04:00
Augustin Cavalier
1e7c2b627e kernel: Print interrupt line when assuming no interrupt use on PCI device. 2018-09-25 23:29:12 -04:00
Alexander von Gluck IV
cf3f615a25 profiles: Bump release to 1100/1300 MiB
* This gives us plenty of space for source packages.
* A Mini-DVD is 1.4 GiB, and USB sticks of 2 GiB are at
  the sweet spot of low-price vs size.
* Unused space will be compressed in release zip.
* We blew by 700 MiB long ago. Sorry CD-R folks.

Change-Id: I3bbe4508777027f6fe7c0ee2992637541feeb88f
Reviewed-on: https://review.haiku-os.org/592
Reviewed-by: Alexander von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-09-25 23:04:13 +00:00
Augustin Cavalier
1eff2f5001 kernel: Treat 255 as an invalid interrupt line on x86.
From mmlr's analysis in #13370 comment:22: "We actually do ignore a missing
routing in case the interrupt line is 0. In this case it isn't 0 but 0xff,
which is invalid and generally treated the same as 0 in the rest of the code.
Ignoring the missing routing on 0xff seems like the way to go here."

Indeed, I managed to locate a footnote in the PCI 3.0 specification which
confirms that this is the case on x86, and a commit in the Linux kernel
which essentially does the same thing this change does:
https://github.com/torvalds/linux/commit/e237a5518425155faa508a087f2826
Interestingly, that commit is only from 2016, while PCI 3.0 is from 2004.

This probably fixes #13370 ("Haiku doesn't MBR boot on Ryzen"), and potentially
other interrupt-routing-related boot failures.

Change-Id: I88129f6507c62d24cb50cf5c78597ca7bd7872d7
Reviewed-on: https://review.haiku-os.org/590
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit 821599e8e889a48ffa50ccbed489e30bdba64f1a)
Reviewed-on: https://review.haiku-os.org/591
2018-09-22 20:50:52 +00:00
Kacper Kasper
ab7138c7f3 HaikuDepot: don't scale bitmaps
* There was an off-by-one error in initialization code;
  BRect(0, 0, 15, 15) does not create 16x16 bitmap - it is 15x15.
  As a result vector icons were rendered at 15x15 and then scaled to
  16x16.

Change-Id: If1b57148e5a887a4bf71e01606d3d0d6fd0ed149
Reviewed-on: https://review.haiku-os.org/585
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit 789ad279538192be95ca2ab392333c8c42171ec6)
Reviewed-on: https://review.haiku-os.org/586
2018-09-18 20:29:53 +00:00
Augustin Cavalier
afca0e5eee Tracker: Clean up AddPoses threads properly.
They may still be running at the point we detach from the window, and
as we stop watching everything else at that point (and the threads
themselves depend on the window looper as the global "lock"), we
need to tear them down then.

We especially cannot do this in the destructor, as there are some
virtual methods that the threads need during their teardown which
obviously will not work in ~BPoseView.

Fixes #13371, and potentially other Tracker crashes that occured
as a result of closing the window while the add-poses tasks were
still operational.

Change-Id: I48ff7ddc4443180a59f9b50dd4b123885ef13bb2
Reviewed-on: https://review.haiku-os.org/576
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-09-18 19:51:17 +00:00
waddlesplash
2b1ae982fc determine_haiku_revision: Properly get rid of the commit hash.
Change-Id: I3f57b1cd4d819e7f531001d747bf7b103954a918
Reviewed-on: https://review.haiku-os.org/581
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit 670ed496951132f6a2e3c9e92f859062531c2f90)
Reviewed-on: https://review.haiku-os.org/582
2018-09-18 19:51:06 +00:00
Augustin Cavalier
be117bfaa0 demangle/gcc2: Do not trust inputs.
We do not know anything about the symbols we are being asked to demangle;
it is entirely possible they are malformed, or that we parse them incorrectly,
which previously led to buffer overflows. E.g. the "2","8" in "SetTo__Q28_GLOBAL_"
is presently incorrectly parsed as a length, leading to an access 21 bytes past
the end of the string.

This caused a page fault under the guarded heap, a fact I had the misfortune
to discover when trying to attach Debugger to a guarded-heap'd application
which somehow ran the demangler under the guarded heap also, and that symbol
above was in runtime_loader, so it crashed while loading its symbols.

So now we do what the GCC3+ demangler does here, and keep track of the input
buffer through the use of a state class, which will prevent us from incrementing
past the buffer's end.

I've tested this patch using the new haikuc++filt utility against libtracker
(indeed, it took multiple rounds of testing to get the diff to be 0 bytes)
and it seems to work exactly as before, though now without out-of-bounds
accesses.

As this demangler is also used in the kernel, it's possible that some
triple-faults on x86_gcc2[h] are caused by this bug (although that would
be rare; one of the incorrectly-parsed symbols would have to be in the
stack trace, and then it would have to read past the end of the buffer
containing the symbol.)

Change-Id: I343991cebd7d2887812c8c6b3dc2e0df2fcd79fa
Reviewed-on: https://review.haiku-os.org/579
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit 6668f401f8bf3eb077737e4c939699c5166cff2b)
Reviewed-on: https://review.haiku-os.org/580
2018-09-18 02:19:33 +00:00
Alexander von Gluck IV
3066e6bb4e UEFI: Greasy edition
* This is a last minute hack to get UEFI into R1 Beta 1
* This is extremely greasy and not that great

Change-Id: I3519dba7c97e3e01fe1d7f23d7b06f61f2ffedb7
Reviewed-on: https://review.haiku-os.org/578
Reviewed-by: Alexander von Gluck IV <kallisti5@unixzen.com>
2018-09-17 18:19:34 +00:00
Augustin Cavalier
9396f1649f Tracker: Eliminate the double border in the OpenWithWindow.
Change-Id: I903c50d95a8f33798985c2a3f4f3c0acd32f3de3
Reviewed-on: https://review.haiku-os.org/577
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-09-16 23:21:28 +00:00
Augustin Cavalier
d60cdf9452 BString: Treat NULL passed as replaceWith as an empty string.
Fixes the tests added in the previous commit, and also #8552.

Change-Id: Idf9459474bc66054f94cf66065ed6fcf9c60cece
Reviewed-on: https://review.haiku-os.org/572
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit e5b17738bcd57325aa16a53c8f129d5bd7f053f8)
Reviewed-on: https://review.haiku-os.org/573
2018-09-16 17:57:16 +00:00
Augustin Cavalier
ed2098b992 iprowifi4965: Add -100 firmware.
Should fix #14492.

Change-Id: If755bc1dc37f84da85cb0377a5e3105b89729735
Reviewed-on: https://review.haiku-os.org/570
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-09-16 00:09:10 +00:00
Augustin Cavalier
b94118ef25 determine_haiku_revision: Rework "no tag on HEAD" output.
When HEAD is tagged, the output will be identical to what it was
before (the latest hrev tag and nothing else.) When HEAD is not tagged,
and the most recent tag is further back, we now use a format like this:

hrevXXXXX+N(+dirty)

... where N is the number of commits since hrevXXXXX, and +dirty is added
if the working tree is dirty. This is significantly shorter than the
previous model (as it does not have the Git revision.)

Fixes #14445.

Change-Id: I66d4c7c57538a88a5fa13cfceebb65835ca53c7c
Reviewed-on: https://review.haiku-os.org/569
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-09-16 00:08:57 +00:00
Augustin Cavalier
812f406645 src/tests: Fix some incorrect filemodes.
Change-Id: Id8628116ddd58bf6286512f3532abc193dcfb6e7
Reviewed-on: https://review.haiku-os.org/568
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-09-16 00:08:41 +00:00
Michael Lotz
03411d58bf kernel: Apply user iframe determination logic to SMAP/SMEP.
Change-Id: I394492a289f01303ac28e6d6670fbfdb326fa4db
Reviewed-on: https://review.haiku-os.org/561
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
(cherry picked from commit 99888f6b696f3bf5e10adc3822e146ffe7098bf0)
Reviewed-on: https://review.haiku-os.org/564
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-09-15 00:08:57 +00:00
Michael Lotz
35b6396bc3 kernel: Determine kernel vs. user page fault depending on iframe.
The action vm_page_fault takes should depend on whether the iframe to be
handled is a user iframe or not. The check for the user flag in the
error code does however only check if the fault happend in user or
kernel space. Use IFRAME_IS_USER() instead which checks the privilege
level of the iframe. Under 32 bit x86 this also handles vm86
compatibility mode properly.

This is the same logic as used on FreeBSD (TRAPF_USERMODE).

Fixes #13930.

Change-Id: I9c348b6ab4c60daaaaa2c0fe33bcc3336aa29f7b
Reviewed-on: https://review.haiku-os.org/560
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
(cherry picked from commit 8c005190c455f3722c64a6ffc7dece9020da7258)
Reviewed-on: https://review.haiku-os.org/563
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-09-15 00:08:33 +00:00
Michael Lotz
46f5676786 Cleanup: Use symbolic names, compare != 0 and whitespace.
Change-Id: I34c60b3ab8387fe57dbcd91f9b5d278468455cf6
Reviewed-on: https://review.haiku-os.org/559
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit 0de5a83940e56b9f9b910e8550d0f64c45362cff)
Reviewed-on: https://review.haiku-os.org/562
2018-09-15 00:08:23 +00:00
Augustin Cavalier
16f483e022 BNetworkDevice: Fix memory leaks and address comments.
Thanks Axel and Jerome for the reviews!

Change-Id: I4f116c540cf59ba74b79d9d2f95ed40edc9c4174
Reviewed-on: https://review.haiku-os.org/557
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit 67f692f306f383db512ac0b077fffcc9798499d9)
Reviewed-on: https://review.haiku-os.org/558
2018-09-13 19:53:49 +00:00
Augustin Cavalier
7ff0296cbc libroot: Use RETURN_AND_SET_ERRNO from the utils header in ioctl.
No functional change intended.

Change-Id: I5e6a060fe8e036bc4d4b8b8cc95a4e8d0ea00f81
Reviewed-on: https://review.haiku-os.org/549
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit 38a9853e5092fcb982b9456b870fbbf3ab4d1782)
Reviewed-on: https://review.haiku-os.org/553
2018-09-13 04:14:21 +00:00
Augustin Cavalier
a0cb3e066a network/ethernet: ioctl returns -1 and stores the error in errno.
Previously, if a device driver returned an error of any kind, -1 was
propagated the rest of the way up through the stack instead of the
actual error code.

Change-Id: I6839763c6b2eb86d6112d3732e6cb80d022f1fe8
Reviewed-on: https://review.haiku-os.org/550
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit e9073260a7054be876ec67bfefbfdaba05ea3142)
Reviewed-on: https://review.haiku-os.org/554
2018-09-13 04:14:13 +00:00
Augustin Cavalier
549b4453f0 BNetworkDevice: Implement Scan().
This depends on the previous commit to return the correct error code
from ioctl().

If there are no VAPs running (which is the case after a forced disconnect
from an access point), scans will fail. In that case, we call
IEEE80211_IOC_HAIKU_COMPAT_WLAN_UP, which will restart a VAP, and then
initiate the scan.

Change-Id: I732aefe67e386dbb0ed3d232ed9deda678132601
Reviewed-on: https://review.haiku-os.org/551
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit 4e5aaaa700f4f6911514e7f469ba14201a66581c)
Reviewed-on: https://review.haiku-os.org/555
2018-09-13 04:14:07 +00:00
Augustin Cavalier
8e0d3fe3ea ifconfig & Network preferences: Actually trigger scans using BNetworkDevice.
Fixes #12034, and a variety of other strange "no wireless networks
appear" bugs that have plagued Haiku for years.

Change-Id: I734cb8084e8a626b8e03511519609bf80c1559eb
Reviewed-on: https://review.haiku-os.org/552
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit 45bc01d2f71686b254d97ce04701c413d31cc76b)
Reviewed-on: https://review.haiku-os.org/556
2018-09-13 04:14:00 +00:00
JackBurton79
719ccf77e9 FlattenPictureTest: Fix DrawStringsWithOffset test
fixes #14481

Change-Id: I7aee0f9e1ed088d2b5253f22a55228b0fc8f16ec
Reviewed-on: https://review.haiku-os.org/546
Reviewed-by: Stefano Ceccherini <stefano.ceccherini@gmail.com>
(cherry picked from commit b070314f50636b69267f3e4c7a0a1b6d2d4fbfbf)
Reviewed-on: https://review.haiku-os.org/547
2018-09-12 16:02:02 +00:00
Janus
b367ca28fc BColumnListView: hscrollbar matches visible columns
* _VirtualWidth() ignores invisible columns
   This makes the horizontal scrollbar match the width of the visible columns.
   Also trigger an initial update of the scrollbars.
* Fixes #14480

Change-Id: I7d4b27a8fdca58c150ac47f9b948b127fb275fdf
Reviewed-on: https://review.haiku-os.org/543
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
(cherry picked from commit aa39f874dcadea54c634aa226f7ce7b817812ecd)
Reviewed-on: https://review.haiku-os.org/548
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-09-12 15:34:38 +00:00
Augustin Cavalier
e46d17d066 BMenuItem: Remove ourselves from the super menu on destruct.
This fixes the (intermittently) crashing test added in the previous commit,
and should also fix #12024 and #14348.

Note that this is a slight behavioral departure from BeOS, though since
BeOS crashed when this was done previously, it shouldn't cause any
other problems.

Change-Id: I7ac271258afaf1bcf649e0e44ab31184b6dc92f1
Reviewed-on: https://review.haiku-os.org/542
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-09-12 01:15:39 +00:00
David Murphy
0f3c9d48cc BColumnListView: Always update the reference rect in ::FindVisibleRect...
...if the row is present in the list, but continue to return false if the
row is not currently visible on the screen.

Part of #11675. Cherry-picked from https://review.haiku-os.org/442.
2018-09-11 16:51:27 -04:00
Augustin Cavalier
bd52d1ed4f pkgman: Suppress the erroneous "aborted: No Error" messages on no internet.
Here's what happens:
 * BPackageManager created a BRefreshRepositoryRequest with a BContext
   of an empty DecisionProvider and itself.
 * Since there is no internet access, the FetchFileJobs that the refresh
   class queued fail. Specifically, the first one does, but then as the
   subsequent ones depend on it, they are all aborted.
 * As some jobs were aborted, the StateListener is notified.
 * The state listener of course has the BPackageManager class as one of
   the listeners, and so calls it, because even though the handler methods
   of BRefreshRepositoryRequest, they are powerless to stop event propagation.
 * The BPackageManager's highest subclass' implementation gets called, which is
   of course pkgman's.
 * pkgman decides to DIE() upon receiving word that a job was aborted.

There are thus four potential solutions to this issue:
 * Rewrite the package kit's event & job handling systems to not be so
   screwed up in terms of propagation. Seriously, there is way too much
   stuff that we send to the "user" in here, and as you can see, it can
   get *extremely* convoluted even for supposedly "simple" tasks. This
   is probably the best "long-term" solution; but obviously is far too
   involved for the present.
 * Only partially rework event handling; specifically in the SupportKit to
   allow JobStateListeners to stop further propagation. This is probably
   the best "medium-term" solution.
 * Do not pass the package manager as the JobStateListener to the
   RefreshRepositoryRequest. This would have the downside that the
   regular notifications about download state, etc. would not be returned
   at all, which we don't want. We could make a shim ... but that would be
   a lot of code for little benefit. The prior solution makes more sense.
 * Completely ignore "JobAborted" notices in pkgman. In fact, this is the
   solution that virtually all other consumers of this API take (although
   some of them seem to have TODOs about it), including package_daemon,
   HaikuDepot, etc., and so it's the one I've taken here. If a "job aborted"
   error is actually fatal, then it's the Package Kit's problem.

Fixes #13075.
2018-09-11 16:34:25 -04:00
Augustin Cavalier
b174c5f846 mime_db: Add entries with sniff rules for DjVu and XPS.
These formats are supported by DocumentViewer.
2018-09-11 16:34:06 -04:00
Augustin Cavalier
d9bbf389ad Remove the "Haiku" screensaver from the tree.
As discussed in #14447.
2018-09-11 16:33:37 -04:00
Augustin Cavalier
55abd72ac4 AboutSystem Credits: Some updates.
* Move nielx back into Contributors
 * Move hamishm into Past Contributors
 * Add some new translation contributors
2018-09-11 16:33:15 -04:00
Augustin Cavalier
bd949e1c02 Installer: Rework status message view sizing logic.
* Make the status message view have a minimum height of the logo
   view's height.
 * Properly add the views to the BGroupView layout.
 * Instead of trying to set the explicit minimum size from the status
   view information, just invalidate the GroupLayout. This seems to fix
   a number of bugs relating to text overflowing the view, while it doesn't
   fix others (e.g. orphan words on their own lines are still not drawn
   in some cases, which appears to be a BTextView bug.)
 * Use BString::SetToFormat instead of snprintf in some places.

As far as I can make out, fixes #13608.
2018-09-11 16:32:57 -04:00
Augustin Cavalier
4a8634227e BUrl: Remove HAIKU_TARGET_PLATFORM_HAIKU from main header.
These are really only defined during the build of Haiku itself,
so we don't want them in a system header. Since none of these
functions are virtual, leaving them as declared but not defined
should be fine.
2018-09-11 16:32:44 -04:00
Augustin Cavalier
c392fee262 Deskbar: Add missing NULL check in SwitchWindow().
All other functions in this file that locate the TTeamGroup via FindTeam()
do a NULL check afterwards, so the fact that this one did not just looks
like an oversight.

Fixes #14457.
2018-09-11 16:32:34 -04:00
Jérôme Duval
dcb5519e5d radeon: fix copy/paste typo.
Change-Id: I669c73a990b0fff84cf5d37b5a4cc57ad97905ff
Reviewed-on: https://review.haiku-os.org/514
Reviewed-by: Alexander von Gluck IV <kallisti5@unixzen.com>
2018-09-11 16:31:20 -04:00
Jérôme Duval
2af8a66fc5 Make areas cloned by accelerants effectively cloneable.
Change-Id: I78046af6548e36571813ce516491c7fb64581967
Reviewed-on: https://review.haiku-os.org/513
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-09-11 16:31:08 -04:00
Andrew Lindesay
e20ca69585 Support : Fixes for Verbatim Regeneration of URL String Form
A URL in string form should be able to be parsed and then verbatim
regenerated according to 'UrlTest'.  This change fixes this ability
for the case where there is a '?' initiating a query or a '//'
initiating a host/authority section.

Partly Fixes #14377

Change-Id: I6547253c3cdc22d79514edf75284e9725d1a2d17
Reviewed-on: https://review.haiku-os.org/512
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2018-09-11 16:30:42 -04:00
Jérôme Duval
691ef6069c ZstdCompressionAlgorithm: handle ZSTD_error_dstSize_tooSmall.
Change-Id: Ib6dca7ac8457afae845fad24514945b4ecd521cc
Reviewed-on: https://review.haiku-os.org/509
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2018-09-11 16:30:15 -04:00
Augustin Cavalier
64e47d613c libroot: Fix handling of debugger() call in abort().
The kernel's handling of SIGABRT is just to terminate the application
immediately without doing anything else (it only notifies the debugger if
there's one installed for this application already.) More serious faults
(e.g. SIGSEGV) originate in the kernel and handle this logic before they
even invoke the signal handler.

So the correct solution is to do the same here in libroot. This incurs
a very, very slight performance penalty of the syscall time for sigaction(),
though I expect whatever applications are causing SIGABRT to be invoked more
than once a second will call raise() directly instead of abort()...
2018-09-11 16:29:56 -04:00
Augustin Cavalier
ca88166f3b drivers/poke: Fix for GCC7 & C++11. 2018-09-11 16:29:43 -04:00