Commit Graph

49940 Commits

Author SHA1 Message Date
Alexander von Gluck IV
645e6f89ce u-boot: Drop openfirmware in u-boot platform hack
* If we need this, we can do builds with openfirmware
  platform on u-boot loader now.

Change-Id: I67b5bda165a78b772e246c008c5018b2d6f459e9
2018-10-30 18:06:26 -05:00
Alexander G. M. Smith
78b0cfc712 Remove debug printf from BListView.
Change-Id: Ic3f3359305e066c27bfb071cc18a455d6f1c179f
Reviewed-on: https://review.haiku-os.org/648
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-10-30 22:46:08 +00:00
Alexander von Gluck IV
c340bfce91 u-boot: Fix boot arch + platform on arm
Change-Id: I6ecdb9e1b1039ac769b015fb96a3531715b44542
2018-10-30 14:51:15 -05:00
Augustin Cavalier
d1f8f8301c kernel: Tolerate "count" argument to memcpy being 0.
It seems GCC2 occasionally will inline a call to memcpy with
a count of 0, which this function did not previously expect
and would result in a "Divide Error Exception."

Hopefully fixes #14613.
2018-10-29 22:44:01 -04:00
Barrett17
7257735529 codec_kit: Some more style and cosmetic fixes 2018-10-29 10:15:26 +01:00
Augustin Cavalier
498bd544a4 freebsd11_network: Fix race condition leading to lock of deleted mutex.
* Initialize "status" to B_NO_INIT, which will skip the main 'if'
   the first go-around and go straight to the acquire_sem_etc(),
   as we will have be invoked from the callout initializer, and so
   there will of course be no callouts.
 * Actually check the return code of mutex_lock, and do another loop
   iteration (which skips this main 'if' as status will not be one
   of those things.)
 * Correct failure deinitialization order in init_callout().
 * Destroy the mutex after the worker thread exits (this is the real fix.)

Fixes #14660, and other "hang on cursor" / "hang on black screen" /
or possibly even a "hang on rocket" introduced in yesterday's builds.
2018-10-29 00:53:42 -04:00
Augustin Cavalier
f1f04fa6d4 network/stack: Correct deinitialization order.
DeleteChains() needs the chain locks and domains, so those need to
be uninitialized after them. This now matches the constructor's
deinitialization order.

Fixes a panic exposed by the previous commit.
2018-10-29 00:53:42 -04:00
Augustin Cavalier
adb4e6e8c5 kernel: Reset lock holder and count on mutex_destroy().
Previously, there were a number of circumstances where these were
not getting reset properly, leading to some destroyed mutexes having
holders of the last thread which locked them, and some with "-1",
which meant that the next call to "mutex_lock" just behaved as if
the lock was still valid (!), and so the unlucky caller would deadlock
forever.

Now we properly reset these fields, which means from now on attempts to
lock or unlock destroyed mutexes will lead to "PANIC: uninitialized mutex"
on KDEBUG kernels, and (as before) an infinite deadlock on non-KDEBUG
kernels (perhaps we should store the thread_id of the locker on non-KDEBUG
kernels also?).

As the next commits will show, this already uncovered a number of bugs,
and there are of course potentially more strange deadlocks caused by this.
2018-10-29 00:53:41 -04:00
Tim De Jong
2501f22b9d hda: Fixed headphone output on iMac 24 inch (early 2008).
Added subsystem_vendor_id and subsystem_id for iMac 24 inch early 2008 (iMac 8,1) and Macbook Pro 3,1 with specific quirks for those systems. This enables sound via head phone out at a decent level and quality. Previously, sound with the Haiku HDA driver was distorted and very low

Change-Id: I8e3dc3dbf5324bafff2b35ae64b43a0088272c8d
Reviewed-on: https://review.haiku-os.org/647
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2018-10-28 22:10:57 +00:00
Alexander von Gluck IV
8ee963f940 efi: Begin sorting x86_64 to arch subfolder
Change-Id: I0b724c05d527332fb6a5f4909b44d578ae1c6d0e
2018-10-28 16:43:50 -05:00
Murai Takashi
8ff74b67d4 screen_savers/message: Use delete[] instead of delete
Use delete[] instead of delete, since memory is allocated by new[]
at line 139.

Pointed out by clang.

Change-Id: I70396283b8d2c01d52886f7543804998d891ea44
Reviewed-on: https://review.haiku-os.org/646
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-10-28 21:22:18 +00:00
Augustin Cavalier
aed889ae61 HaikuDepot: Truncate copyright label to 45 characters at most.
Some packages have excessively long copyright labels that were forcing
the HaikuDepot window to become too wide. So in this case, put the full
copyright string in the tooltip, and only the first 45 characters in
the label.
2018-10-28 14:43:22 -04:00
Augustin Cavalier
e00a489b80 HaikuDepot: Replace the "featured packages" checkbox with tabs.
As discussed in #14598, there are now two tabs instead of the
checkbox: "Featured packages" and "All packages". It otherwise
behaves as before.

Also fixes #12428.
2018-10-28 14:43:22 -04:00
Augustin Cavalier
1562519066 freebsd11_network: Declare led_ functions as static.
And also fix coding style.
2018-10-28 14:43:22 -04:00
Alexander von Gluck IV
5025c781eb ltrace: Add x86_64 stub Jamfile. Tired of that jam warning.
Change-Id: Idbd7ddae5773f85a1c46aa72e1dac0c28f9320c1
2018-10-28 10:54:08 -05:00
Barrett17
5e4fd31ed7 codec_kit: Style fixes
* Remove superfluous newlines at EOF.
* Add newlines in file's head.
2018-10-28 16:26:27 +01:00
Barrett17
8ccd9c0741 codec_kit: Add some padding 2018-10-28 16:14:25 +01:00
Barrett17
59125d3ced MediaWriter: Private stuff should stay private 2018-10-28 15:31:11 +01:00
Augustin Cavalier
b2429272f7 ipro1000: Enable "igb" (Intel Gigabit Ethernet.)
Currently using the LEGACY_TX path as the newer one requires mtx_trylock()
and "curcpu", which I haven't implemented yet.

Completely untested as I don't have this hardware.
2018-10-27 16:36:46 -04:00
Augustin Cavalier
bafb37eceb freebsd11_network: Additions and modifications for igb. 2018-10-27 16:36:14 -04:00
Augustin Cavalier
fd11017163 ipro1000: Restructure glue and Jamfiles to match other drivers. 2018-10-27 15:31:14 -04:00
Augustin Cavalier
05cf5e3d73 freebsd11_network: Move callout struct definition to _callout.h.
This is how FreeBSD does it.
2018-10-27 15:12:29 -04:00
Augustin Cavalier
c1e79d9431 freebsd11_network: Call probe() before attach().
See inline comment.

Fixes #14611.
2018-10-27 14:28:20 -04:00
Augustin Cavalier
daeb37ee4f freebsd11_network: Cleanup haiku-module.h.
* init_hardware is unnecessary and mostly a duplicate of init_driver;
   so just remove it in favor of that.
 * Deduplify some of the _DRIVER macros as possible
 * Don't include net_stack.h, we don't need it here; and fix
   callout.h following that.
2018-10-27 14:16:23 -04:00
Murai Takashi
93930f335d Replace B_MAX_CPU_COUNT with SMP_MAX_CPUS
Change-Id: I55c53ab35e9645e20466b09407a251571c589958
Reviewed-on: https://review.haiku-os.org/447
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-10-27 17:50:11 +00:00
François Revol
5d558f271c BFS: Use separate name & pretty name for big-endian
Change-Id: I7e3a99e3cff35ae5f8cd84fa7243579bf93de904
Reviewed-on: https://review.haiku-os.org/644
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-10-27 17:48:25 +00:00
François Revol
2522f69ee9 BFS: make sure we #error if asked to build both big & little endian
Change-Id: Ia7dd0046a2a527d9acbeb31b665d98f099642102
Reviewed-on: https://review.haiku-os.org/643
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-10-27 17:48:25 +00:00
Chaiwat Suttipongsakul
1c8e2d42ad Add standard TIS-820.2538 keymap for Thai keyboard.
Change-Id: I87196163a40d7e0bd67159d4dc3d7e4298f8acfd
Reviewed-on: https://review.haiku-os.org/641
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2018-10-27 17:43:21 +00:00
Murai Takashi
de084e566e Haikudepot: Fix build.
Change-Id: Ia84a968af0ef68cda929086b70853b2801cfeb9d
Reviewed-on: https://review.haiku-os.org/642
Reviewed-by: Rene Gollent <rene@gollent.com>
2018-10-26 12:00:03 +00:00
jjpx
a1c2394a81 Printers preflet: changed localizations
* Fixed colour localization on test page
* Changed JobListView to use plural placeholders
* Changed PrintersWindow to use placeholders

Change-Id: I39477351364a0182cf629476de767af18f9c0d61
Reviewed-on: https://review.haiku-os.org/524
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2018-10-25 15:38:48 +00:00
Humdinger
a98e02fcda HaikuDepot: add WorkStatusView.cpp to DoCatalogs 2018-10-25 09:25:21 +02:00
Barrett17
de42fb602e Welcome Codec Kit!
* Fix MediaDebug header.
* Add codec lib name mapping.
2018-10-24 16:12:10 +02:00
Barrett17
8f99629d87 http_streamer: Use MediaDebug.h 2018-10-24 16:12:05 +02:00
Barrett17
7a28e2cbb5 ape_reader: Link to the codec_kit 2018-10-24 16:12:05 +02:00
Barrett17
f9fc949439 MediaTest: Use MediaDebug.h 2018-10-24 16:12:05 +02:00
Barrett17
4419ea5bc6 echo: Use private audio headers 2018-10-24 16:12:04 +02:00
Barrett17
ac52fcf75e ffmpeg: Use the codec_kit 2018-10-24 16:12:04 +02:00
Barrett17
50cb5283a0 media/codec: Share media_format defs until libmedia2.so 2018-10-24 16:12:04 +02:00
Barrett17
df2639bf60 Move adapter_kit API to libcodec.so 2018-10-24 16:12:04 +02:00
Barrett17
1275248a77 codec_kit: First half
* Move all codec stuff into libcodec.so
2018-10-24 16:12:03 +02:00
Peter Kosyh
8922fc0a9e iprowifi2100: cherrypick from upstream to fix broken tx.
8050a0601b
Change-Id: Id467f270092819df04547a9fced87a884a9c178d
Reviewed-on: https://review.haiku-os.org/639
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2018-10-24 13:26:31 +00:00
Humdinger
bc622f6b59 Fix missing localization
This addresses some of what's reported in ticket #14637.

* Keymap preferences: Localize key labels. Translators have
  to be careful not too use too long words here...

* Media preferences: Fix typo "SoundFonts" -> "SoundFont"
  The two popup menus, Video input/output, both use "<none>",
  which when the catkeys are collected is reduced to one item.
  Apparently, Italian likes to have different tranlsations for
  them. I hope to fix that by using B_TRANSLATE_COMMENT with
  differing comments. Not sure if that'll work...

* Network preferences: Localize "on/off" and "Enable/Disable"
  in the Services.

* Repositories preferences:
  Add RepoRow.cpp to DoCatalogs.

* Shortcuts preferences: Localize "Left/Right/Both/Either/None"

* Bluetooth replicant: Localize menu items and alerts.

* DeskCalc: Localize button names.

* HaikuDepot:
  - Use BStringFormat and variables to replace for the WorkStatusView.
  - Put package name in single quotes; nicer if you have package names
    with spaces.
  - Avoid leading and trailing spaces in translatable strings. Those
    can be overlooked b the translator.
  - Use B_UTF8_ELLIPSIS instead of "...".

Change-Id: Ia32908f9faad5188aa87c918c31229277decbda9
Reviewed-on: https://review.haiku-os.org/631
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2018-10-24 09:01:06 +00:00
Murai Takashi
85477b7896 Terminal: Fix -Wtautological-constant-out-of-range-compare
Since index's type is uint8 (range 0-255) and kTermColorCount set to 256
(declared in terminal/Colors.h at line 31), 'index < kTermColorCount' is
always true.
Pointed out by clang.

Change-Id: I49e45cbd8a55223177fd2d6a64a0e37cf6341fc7
Reviewed-on: https://review.haiku-os.org/637
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2018-10-24 09:00:02 +00:00
Barrett17
81508f30d0 hmulti_audio.media_addon: Use private audio headers 2018-10-24 10:44:20 +02:00
Barrett17
8f3a684551 media_server: Fix debug header 2018-10-23 17:00:13 +02:00
Barrett17
62081a2cca audio: Move hmulti_audio driver API to private audio headers
* Fix all drivers to don't access private media headers.
2018-10-23 16:33:19 +02:00
Barrett17
c13b6a683d audio: Move private opensound API to audio private headers 2018-10-23 16:27:29 +02:00
Barrett17
488f2717d9 Remove module_audio_driver from buildsystem 2018-10-23 16:25:10 +02:00
Barrett17
c6be458e6d media: Remove audio_module_driver
* I have not idea what this is for. Seems stuff from a long time ago
when for some reason someone wanted an audio driver implemented in
a kernel module. It is not used anywhere. If someone feels this should
be reverted please let me know and add an explanation.
2018-10-23 16:13:51 +02:00
Barrett17
66741d3615 media: Remove BeOSR3MediaDefs.h
* Fix for cmedia driver included.
2018-10-23 16:08:06 +02:00
Barrett17
804f91e634 media: Remove legacy multi_audio.h 2018-10-23 15:50:27 +02:00
Barrett17
b84955d416 media: Remove debug.h, finalize MediaDebug.h
* Funny rust from 0 AD.
2018-10-23 15:19:14 +02:00
Barrett17
b359301f32 media_add-ons: Remove legacy media_add-on
* This media_add-on was provided to support the old
BeOS audio API (R3?), it is not working and will probably
not work on anything enough modern to run Haiku.
2018-10-23 13:57:52 +02:00
Murai Takashi
f203f99dd5 xhci: Fix -Wtautological-pointer-compare
Modify if condition, since:
 1) Comparison of array 'current->buffer_log' equal to a null pointer
    is always false. Pointed out by clang.
 2) XHCI::CreateDescriptor() sets buffer_log[0] to NULL,
    when bufferSize <= 0.

Change-Id: I9a632dcf9c41435653b0556ed981d78bab846038
Reviewed-on: https://review.haiku-os.org/638
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-10-22 15:25:35 +00:00
Murai Takashi
aeeec99e35 cortex: Fix -Wconstant-logical-operand
Pointed out by clang.

Change-Id: I61eedc96bf9a1c55ebc92eeb49ec866071bd1caf
Reviewed-on: https://review.haiku-os.org/636
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-10-22 15:24:36 +00:00
Peter Kosyh
5483aeeb57 freebsd11_network: Fix deinitialization following a failure to attach.
This fixes the KDL while loading iprowifi2100 w/o firmware installed.

Full explanation:
1) device_attach calls start_wlan
2) start_wlan fails, because lack of firmware
3) ... -> device_detach called (from device_delete_child)
4) it calls stop_wlan that faults with BAD_VALUE
5) we leave device attached... then uninit_mbufs called -> KDL

Change-Id: I18d06ea7be48e569838f17e3779d054000898043
Reviewed-on: https://review.haiku-os.org/635
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-10-21 16:21:20 +00:00
Janus
4fd69b6cc2 WebPositive: improves the layout of Proxy server tab
* Fixes #14647

Change-Id: I6501e44ab836f6ed4c0a3b67a47b4ed9c9177064
Reviewed-on: https://review.haiku-os.org/634
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-10-20 19:52:26 +00:00
Alexander von Gluck IV
ee2c12f4c8 boot/openfirmware: Add missing KERNEL_PLATFORM headers
Change-Id: I408a0b6d94cf7ac7d968e6d7e5dccd4e8920ab12
2018-10-19 15:35:48 -05:00
Alexander von Gluck IV
8522edfe36 jam: Ensure common boot LDFLAGS and ASFLAGS get distributed 2018-10-19 08:55:41 -05:00
Alexander von Gluck IV
81b33e381f compat/freebsd11_network: Add arm/mips ALIGNED_POINTER
Change-Id: I39fc6a13bafcb329663e49bf2b0d86edcb795cfa
2018-10-18 12:42:08 -05:00
Alexander von Gluck IV
49223f54a7 system/boot: Tab cleanup, sorry for spam
Change-Id: If486b772f5d0d1f22ba7cf08363e9a16434b3912
2018-10-18 10:53:55 -05:00
Alexander von Gluck IV
dd45d433ed u-boot: Fix after multi-loader changes
* Move MMU image to a real image define vs being crammed into
  the u-boot bootloader Jamfile
* ARM not working yet, but better!
* x86 still builds

Change-Id: I3fb873dbac06fe2db893915b667bf3ce1df44686
2018-10-18 10:49:59 -05:00
Alexander von Gluck IV
2ff03651b7 efi: Fix missing gnuefi dependency
Change-Id: Iff3b64e781ebee192b769193808f3ec12af1d1fa
2018-10-17 21:21:13 -05:00
Augustin Cavalier
33c475ecba NTFS: We have atoul. 2018-10-17 18:36:41 -04:00
Augustin Cavalier
7deac31935 interface: Fix -Wuninitialized in RegionSupport.
Also trim trailing spaces...
2018-10-17 18:05:06 -04:00
Augustin Cavalier
e39df8a97c bios_ia32: Remove some extra debug info. 2018-10-17 17:54:57 -04:00
Augustin Cavalier
0490778ed1 NTFS: Update libntfs from 2014.2.15 to 2017.3.23.
I rewrote the "config.h" at the same time, which enables usage of gettimeofday
and some other API functions we didn't have whenever this port was first done,
enabling more accurate timestamp handling, among other things.
2018-10-17 17:49:59 -04:00
Augustin Cavalier
c053e48f87 freebsd11_network: intr_wrapper method does return handled information.
Probably this was a copy/paste error from the "FAST_INTR" method
which did not return handled information (and was removed in FreeBSD ~8.)
Note that this is a *major* change, as our interrupt scheduling system
puts "no handling information" interrupts last, and so it's possible
this unbreaks some of the more esoteric chipsets.

But it's also possible that our interrupts glue code for some of the
drivers is incorrect, and so this will break other devices on the same
interrupt line. Please test carefully.
2018-10-17 17:49:59 -04:00
Alexander von Gluck IV
4124da508a bios_ia32: Fix hdd stage1 boot
* haiku_loader is the hpkg name in system/packages and not the
  loader name.
* bios_ia32 stage1 assumes the bios_ia32 loader is the first
  file in haiku_loader.hpkg. This isn't ideal.. but space in
  stage1 is *limited*
2018-10-17 14:47:54 -05:00
Jessica Hamilton
1f96a3cbde system/boot: Add support for multiple bootloaders 2018-10-17 14:47:46 -05:00
Janus
f15270537a WebPositive: fixes the layout of fonts tab
* Fixes #13165

Change-Id: Id056495e09dea751b172391a5abfdd77857df9cb
Reviewed-on: https://review.haiku-os.org/619
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2018-10-17 19:27:40 +00:00
Kuroneko
f0d35c6dbf add-ons/mail-daemon: IMAP: fix folder not selected bug on fetch req
As the IMAP connection handler disconnects when idle, it loses the
folder state at that time - however, it wasn't resetting it's internal
folder selected flag.  This is now fixed.

Change-Id: Ib56f55664ab5d7383a13705a8f4a8585b29f2c92
Reviewed-on: https://review.haiku-os.org/627
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2018-10-17 19:25:00 +00:00
Murai Takashi
5723e0b250 RegionSupport: Fix memory leak
In XXorRegion(), memory allocated in if statement might be leaked.
Pointed by Clang Static Analyzer.

Change-Id: I6b8b68bc5fea7b7c1fd354f05f03d3ebb0b11b62
Reviewed-on: https://review.haiku-os.org/633
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2018-10-17 11:42:58 +00:00
Augustin Cavalier
66c7a2ac9c KPath: Add to kernelland_emu.
This replaces the one in the "playground." It's identical to the current
kernel implementation, except with the few VFS functions replaced with
Storage Kit calls.

Userland packagefs will need this.
2018-10-16 18:50:00 -04:00
Augustin Cavalier
85cbf99307 kernelland_emu: Add some stub team functions.
KPath was going to need these before I tweaked the emu version to
not need them...
2018-10-16 18:32:02 -04:00
Augustin Cavalier
7f46de0a58 fs_shell: Integrate btrfs_shell's command_cat into fs_shell itself. 2018-10-16 16:13:55 -04:00
Murai Takashi
f7989c0226 Correct comment
Change-Id: I529322e5862bc731ce1775a046ec21106e14c352
Reviewed-on: https://review.haiku-os.org/629
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-10-15 14:22:58 +00:00
Murai Takashi
5475c081e2 AddResource(): use index instead of count
In AddResource(), parameter 'index' is not used.
It seems AddItem() use index instead of count.

Change-Id: I997ac96b7d32c5705606cdbf23c7fd71550c9aa6
Reviewed-on: https://review.haiku-os.org/630
Reviewed-by: Rene Gollent <rene@gollent.com>
2018-10-15 12:33:24 +00:00
Murai Takashi
af567e32be storage_support.cpp: add NULL check
check_path_name() had NULL check of path, but its result was not used.
So, add if statement to return B_BAD_VALUE when path is NULL.

Change-Id: I8ceec5d592267bf0f00f606eba44c0ecaef5a209
Reviewed-on: https://review.haiku-os.org/628
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-10-14 17:34:05 +00:00
Murai Takashi
bd4813fcc3 Media server: Suppress -Werror=class-memaccess
Suppress -Werror=class-memaccess pointed out by gcc8.
* Remove unneed memset(), since media_format is cleared by constructor.
* Use media_format::Clear() instead of memset()

Change-Id: If905db6c0b7d759e72cfa649951be5109f952f54
Reviewed-on: https://review.haiku-os.org/485
Reviewed-by: Barrett17 <b.vitruvio@gmail.com>
2018-10-14 10:33:05 +00:00
Kuroneko
7f8a5c09b8 add-ons/mail_daemon: remove spurious/unused vector in imap worker
Change-Id: Id78ff3ab751fa535362833f30cf62a70f5177975
Reviewed-on: https://review.haiku-os.org/625
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-10-12 00:06:54 +00:00
Peter Kosyh
642ac9c9ea xhci: GetPortStatus, ClearPortFeature (PS_PLC, PS_WRC) fix
Fixes #13768.

Change-Id: Ia783e62a15917a2c8f7b3169ee5204a8d8d6f5ef
Reviewed-on: https://review.haiku-os.org/622
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: Alexander von Gluck IV <kallisti5@unixzen.com>
2018-10-10 14:14:24 +00:00
Alexander von Gluck IV
20e420cdbe kits/shared/JsonTextWriter: Correct misaligned while compare 2018-10-08 15:23:10 -05:00
François Revol
4a3dae2bac package kit: add a NULL check on requests
This avoid crashing on malformed repository URL (like missing http://).
2018-10-08 00:56:11 +02:00
Andrew Lindesay
15fed7905d Json : Fix String Writer
Tidy-up and correct logic around writing JSON
encoded strings.

related #13832

Change-Id: I1eca33e11dff4457f85a896c02331c1cd9ae1110
Reviewed-on: https://review.haiku-os.org/617
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-10-06 19:58:35 +00:00
Andrew Lindesay
f1962303a3 HaikuDepot : Add Italian To Languages
Unfortunately reference data is not downloaded
from HDS to HD (it is being worked on) and in
the meantime somebody wants to work with Italian
translations so this will add Italian into the
list of hard-coded supported languages.

Change-Id: Ie0b923ce60acd473cbbea5bbac2254402d7a8fdd
Reviewed-on: https://review.haiku-os.org/618
Reviewed-by: Humdinger <humdingerb@gmail.com>
2018-10-06 19:58:11 +00:00
Augustin Cavalier
489f56e58b fat: If the filesystem extends past the end of the partition, mount read-only.
instead of failing to mount at all. This matches behavior of Linux and
the BSDs.

Fixes #14539.
2018-10-06 14:48:00 -04:00
Augustin Cavalier
906af5f58c storage: When fs_mount_volume returns < 0, it's a status_t.
The "mount" command which calls fs_mount_volume direclty handled this
properly, but this class did not; which meant that user-visible error
messages about partitions failing to mount just said "general system error"
instead of the real one.

Fixes #14540.
2018-10-06 14:23:16 -04:00
Augustin Cavalier
ece593e6cd freebsd11_wlan: Remove the BOSII_* ioctls.
They are not used anywhere (the rest of the stack uses the FreeBSD
ioctls instead), and there has been a TODO to remove them for
quite some time.
2018-10-04 20:07:11 -04:00
Augustin Cavalier
8dea3e53a9 freebsd11_network: Fixup last commit for C++ compatibility. 2018-10-04 20:06:15 -04:00
Augustin Cavalier
bb40dfec8f emulex_oce: Import from FreeBSD 11.2.
This is Haiku's first 10Gb ethernet driver, ported upon request
by kallisti5. It's completely untested (I don't have this hardware),
so for now it's not been added to the image.
2018-10-04 19:36:32 -04:00
Augustin Cavalier
d20b9323d8 freebsd11_network: Additions and modifications for emulex_oce.
This change turned out to be bigger than expected...
2018-10-04 19:34:50 -04:00
Andrew Lindesay
6ab878c0e5 HaikuDepot : Fix Rating of Installed Pkg
This commit resolves a problem where a user would be
unable to rate an installed packge.

fixes #14554

Change-Id: I3141eaebbdf531f17eb05302a536c6e0d722a164
Reviewed-on: https://review.haiku-os.org/611
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-10-04 19:47:19 +00:00
Janus
49a3ee2a3b WebPositive: uses system colors for url text
* Fixes #14518

Change-Id: I76f33694d318e93c096ecab24a9b0316eacda68e
Reviewed-on: https://review.haiku-os.org/613
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: Skipp_OSX <jscipione@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-10-04 19:46:50 +00:00
Andrew Lindesay
6d18e980e1 HaikuDepot : Performance for Package List Updates
Performance improvements for the application updating
lists of packages when the user is operating with the
locale set to Russian.

fixes #14513

Change-Id: I1e2514a2afbd43503ac0edfe280a856411738026
Reviewed-on: https://review.haiku-os.org/612
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-10-04 19:45:52 +00:00
Alexander von Gluck IV
3a44db1167 intel_extreme: Add missing IvyBridge chipset 2018-10-03 01:30:26 +00:00
Andrew Lindesay
018d5927d5 HaikuDepot : User-Rating / Star Selection Fix
This commit resolves a problem where the user-rating
is able to specify a rating (how many stars) or not.
The behaviour was not properly honouring the checkbox
to specify if the rating was to be used or not.

Change-Id: I01067bf899e1d5beab1474a197c5698166b9f582
Reviewed-on: https://review.haiku-os.org/600
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-10-02 19:24:40 +00:00
Kacper Kasper
ebb4be2aef Make spinner buttons look consistent with other controls
Change-Id: Icb29772c91687f4c7e4795a726636cf588b83f16
Reviewed-on: https://review.haiku-os.org/610
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-10-02 19:24:23 +00:00
Kacper Kasper
a8c0b1c873 FontDemo: fix font style submenu placement
Change-Id: I1182fb466e5007b728410872991eea7fd6018fdf
Reviewed-on: https://review.haiku-os.org/609
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-10-02 19:24:04 +00:00
Janus
1b437a3d76 BeDecorator: Avoid to draw an invalid zoom button
* Fixes #13119

Change-Id: Ia75f06c61476324951d44cfe2a1b281bf014b5f4
Reviewed-on: https://review.haiku-os.org/607
Reviewed-by: Alexander von Gluck IV <kallisti5@unixzen.com>
2018-10-01 19:53:23 +00:00
Fredrik Holmqvist
aacc409159 intel_extreme: use int cast to please the grumpy oldtimer gcc2 2018-09-30 21:38:06 +02:00
Fredrik Holmqvist
39a3fe56de intel_extreme: check that vbt_header is in area 2018-09-30 12:18:00 +02:00
Fredrik Holmqvist
597837c788 Remove unused variable in intel_extreme 2018-09-30 12:17:39 +02:00
Jérôme Duval
e4ae6cb42f Media: add offset to inactive sound card.
fixes #14522.

Change-Id: Ib1c43b63cc43d0b66e5415fbbc42cbc821a25087
Reviewed-on: https://review.haiku-os.org/593
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-09-29 17:25:34 +00:00
Kacper Kasper
42b6e5279f Revert "HaikuDepot: don't scale bitmaps"
This reverts commit 2ba2d60351.

...and properly fix the scaling issue.

Change-Id: I2c7ef833c1ff592dd95ea7d83d3f7beced42f209
Reviewed-on: https://review.haiku-os.org/589
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-09-29 17:24:49 +00:00
CodeforEvolution
106ae4ec35 Remove Curl, Switch to NetApi in Package Kit
Change-Id: I92213ab60dc987175c323d1d9ed11ac8b3517f2f
Reviewed-on: https://review.haiku-os.org/475
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-09-29 17:23:52 +00:00
Andrew Lindesay
66f8dcb1f1 HaikuDepot : Improvement for Buffer Management
Changes the logic flow around reverting the position of
the request / response buffers when the buffer is logged
during trace logging.

Change-Id: I025ca9988b32447e225e3ad1b1d4da1174d2d122
Reviewed-on: https://review.haiku-os.org/599
Reviewed-by: Rene Gollent <rene@gollent.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2018-09-28 19:18:40 +00:00
Andrew Lindesay
88575af1d2 HaikuDepot : Fixes for User-Ratings Related API Calls
Corrections to some areas where the 'position' of a
data stream was not being set correctly before reading.

Change-Id: I0030a113008028d5480dc36d034cf06915d928de
Reviewed-on: https://review.haiku-os.org/588
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2018-09-27 18:08:21 +00:00
Leorize
c29a7780db net_socket: getsockname() now works with unnamed sockets
getsockname() now set the socket family and zero all other fields
of sockaddr if an unnamed socket is passed as an argument. This allows
retrieving the socket family from an unnamed socket.

This change is compatible with POSIX and appears to aligns with
Linux, FreeBSD, DragonflyBSD and OpenBSD behaviors.

Fixes #14312

Change-Id: I55dbf4d6738399941bef71e6b3d7201cf78876df
Reviewed-on: https://review.haiku-os.org/594
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2018-09-26 19:05:56 +00:00
Augustin Cavalier
fdb2588484 userlandfs: Make the "request data" area user-cloneable.
Fixes #14497. Thanks to leorize for helping debug!
2018-09-26 00:03:48 -04:00
Augustin Cavalier
7027cb8494 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:04:25 -04:00
François Revol
cbd7818322 radeon: make the framebuffer user-cloneable
This avoids an annoying panic...
2018-09-24 03:07:56 +02:00
Augustin Cavalier
6c73846a03 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-23 17:03:02 -04:00
Augustin Cavalier
1fb7ddbb1e 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-23 16:05:45 -04:00
Augustin Cavalier
e5bb653b78 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-23 16:00:31 -04:00
Augustin Cavalier
17c276df21 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-23 15:58:28 -04:00
Augustin Cavalier
19ec897266 add-ons/media/ffmpeg: Enable deprecation warnings.
There sure are a lot of them...
2018-09-23 15:57:40 -04:00
Augustin Cavalier
3e4c34234e demangle/gcc2: Skip count > length should skip to the end.
This is the behavior the code expects.
2018-09-23 14:47:26 -04:00
Augustin Cavalier
80be7d09c5 kernel: Handle the user buffers properly in _user_xsi_semctl.
Should fix #14512.
2018-09-23 14:45:01 -04:00
Augustin Cavalier
c609f04f86 kernel: Print interrupt line when assuming no interrupt use on PCI device. 2018-09-23 14:19:25 -04:00
Augustin Cavalier
7d8b7501ba 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>
2018-09-22 20:50:34 +00:00
Kacper Kasper
2ba2d60351 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>
2018-09-18 20:29:40 +00:00
Augustin Cavalier
753e006611 kernel: Include the area name and ID in the "attempting to clone" panic message.
Change-Id: Iecc842047929531f8feb7304fbcd1a8f2b28ab2f
Reviewed-on: https://review.haiku-os.org/584
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-09-18 20:03:00 +00:00
Augustin Cavalier
055a35e632 tests: Add some more things to DemangleTest.
Change-Id: I6999aad2cc64650bddb7ba575536efc8878abcf2
Reviewed-on: https://review.haiku-os.org/583
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-09-18 20:02:55 +00:00
Augustin Cavalier
de777b79eb 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>
2018-09-18 02:19:18 +00:00
Augustin Cavalier
adad95fa46 tests: Add a simple version of "c++filt" that uses the homegrown demanglers.
Built as "haikuc++filt" so you can keep it in PATH without replacing GCC's.

The implementation is a very close copy of "demumble", which is
under the Apache 2 license, so this is also. Most of the modifications
to "demumble" were to strip out Windows symbol support, and then
add GCC2 symbol support (this required reworking of the main loop,
as we detect GCC2 symbols in a different way than Itanium symbols.)

I've also added a command-line flag to ignore GCC2 symbols when stream-
processing, which is sometimes useful when demangling GCC3+ symbols.

Running this under guarded heap with some random SOs shows that there are
some symbols which apparently cause memory corruption in the GCC2 demangler.
I haven't yet looked into that, though.
2018-09-16 23:13:04 -04:00
Augustin Cavalier
8339f2eb89 tests: Add test boilerplate for our homegrown demanglers.
There's only one test each, for now, but adding tests is now of course
a one-line addition per test.
2018-09-16 23:06:32 -04:00
Augustin Cavalier
48a6df083d Tracker: Eliminate the double border in the OpenWithWindow.
Change-Id: I43e9b15c4cd7f4986fa7c1231cc8ca89676866bf
Reviewed-on: https://review.haiku-os.org/575
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-09-16 23:21:36 +00:00
Augustin Cavalier
497f099f5a 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: Ib7ec0d1d413096be899a05887399f5b087eb8f99
Reviewed-on: https://review.haiku-os.org/574
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-09-16 23:21:36 +00:00
Augustin Cavalier
f436972c14 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>
2018-09-16 17:57:02 +00:00
Augustin Cavalier
38a133eb8a StringReplaceTest: Add (failing) invocations of Replace*() with NULL "to".
BeOS R5 treats NULL passed as the "replace with" argument as if it were
an empty string. Our BString currently does nothing.

Change-Id: I54b661e4ea8335ce531e6b6e3de2095a41112cd7
Reviewed-on: https://review.haiku-os.org/571
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-09-16 17:57:02 +00:00
Augustin Cavalier
79187c3c42 iprowifi4965: Add -100 firmware.
Should fix #14492.

Change-Id: I887995d45d2e357f0181f54396bc3c19a2158e26
Reviewed-on: https://review.haiku-os.org/567
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-09-16 00:09:14 +00:00
Augustin Cavalier
6d7838a16b src/tests: Fix some incorrect filemodes.
Change-Id: I779cec1905c52eae6955bae979e32ba587e23560
Reviewed-on: https://review.haiku-os.org/565
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-09-16 00:09:14 +00:00
Michael Lotz
99888f6b69 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>
2018-09-14 10:09:10 +00:00
Michael Lotz
8c005190c4 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>
2018-09-14 10:08:03 +00:00
Michael Lotz
0de5a83940 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>
2018-09-14 10:04:54 +00:00
Humdinger
8aea77d00f HDA driver: use optional settings file
Patch by Pete Goodeve, ticket #9134.
(Removed play_sample_rate and record_sample_rate as suggested in
patch review, adjusted hda.settings accordingly.)

Tune buffer size and buffer count with an optional settings file
/boot/home/config/settings/kernel/drivers/hda.settings. Same as
it's done for the auich driver.

Pete:
> I [...] request 4 buffers of 1024 frames, I get a nice 13-14ms latency.

Change-Id: I3c1c64375d22b525afb970d5e8379b22b8514438
Reviewed-on: https://review.haiku-os.org/521
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2018-09-14 06:23:48 +00:00
Augustin Cavalier
62a788f323 ethernet: Fix some more incorrect return value handlings of ioctl(). 2018-09-13 16:14:36 -04:00
Augustin Cavalier
4d5c5a7e66 libroot: More RETURN_AND_SET_ERRNO cleanup.
No functional change intended.
2018-09-13 16:05:22 -04:00
Augustin Cavalier
110ba6da3a tests: Remove the "R5" userlandfs.
Essentially untouched since 2009, and not referenced at all from the
"Haiku" userlandfs.
2018-09-13 15:56:52 -04:00
Augustin Cavalier
043b00fb2c 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>
2018-09-13 19:53:33 +00:00
Augustin Cavalier
45bc01d2f7 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>
2018-09-13 04:13:19 +00:00
Augustin Cavalier
4e5aaaa700 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>
2018-09-13 04:13:19 +00:00
Augustin Cavalier
e9073260a7 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>
2018-09-13 04:13:19 +00:00
Augustin Cavalier
77d2c1df0e 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>
2018-09-13 04:13:19 +00:00
Janus
aa39f874dc 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>
2018-09-12 11:53:09 +00:00
JackBurton79
b070314f50 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>
2018-09-12 10:44:55 +00:00
Augustin Cavalier
c3ac0a72a6 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: I90b6132ff7741b8d6cb601375a9b11fc3ffacb40
Reviewed-on: https://review.haiku-os.org/541
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-09-12 01:15:48 +00:00
Augustin Cavalier
4628b6de8e tests/interface: Add a (currently crashing) BMenu "concurrency" test.
Adds/removes items as rapidly as possible from the menu from the
main thread while the menu is open. That part works. Then it deletes
all of the BMenuItems and then closes the menu, which crashes,
as the BMenuItems do not notify the BMenu they are being deleted.

I tested this on BeOS and it seems that this model crashes there also
(looking through the code comments, it seems there are a number of
testcases found throughout the years like this.) Removing the items
before deleting them indeed fixes the crashes on both BeOS
and Haiku.

Change-Id: I8624f966bdc17030ddca05b97aa57b518ab420c5
Reviewed-on: https://review.haiku-os.org/540
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-09-12 01:15:48 +00:00
David Murphy
81d0a0e0a7 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 18:59:32 -04:00
Augustin Cavalier
74e882b39b kernel/fs: Flush the underlying device's write cache as part of sync().
BFS does this as part of journal management, but not as part of block
cache synchronization (which makes sense, as flushing it then would
defeat the purpose of the drive's write cache.) No other file system
seems to touch it at all, so we should do it as part of an explicit sync.

This may help with some of the filesystem corruption issues, as it seems
that on slow disks, the drive might not have enough time to flush the cache
before it is powered off (or on some SATA/AHCI based disks, it is not flushed
before close at all), so triggering it here and, as the ioctl is supposed to be
synchronous, waiting for it also, seems to make sense.

Change-Id: I7d9992c21ca4b59c839711dcc96c973b4b8df052
Reviewed-on: https://review.haiku-os.org/530
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-09-11 20:06:58 +00:00
Kacper Kasper
709c79a3f7 MediaPlayer: don't fill background for mute button
* The difference is visible when control background doesn't match
  panel background.

Change-Id: Ie3a034acaa52929becd6601520e0e05f32ecc8d8
Reviewed-on: https://review.haiku-os.org/537
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-09-11 20:03:13 +00:00
Andrew Lindesay
a609673ce8 Support : Fixes for Relative URL Handling
When URLs combine a base URL with a relative part, the relative part's
path component was being pre-processed.  This removed any ".." from the
path and in some cases in the unit test cases, the ".." should have been
retained and then only later applied to the base URL.  This changes
fixes this so that the relative part is not pre-processed and is applied
with it's path in a raw state.

Completes Fixes for #14377
Change-Id: I9cebb8599889494e11f40a3b54c87ebca3ed1a21
Reviewed-on: https://review.haiku-os.org/529
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2018-09-11 18:39:53 +00:00
JackBurton79
66f19f7201 Fix ClipToPicture() inside a BPicture
Mimic what is't done in clip_to_shape: call SetCanvasGeometry() and ResyncDrawState().

Change-Id: Ibbd77ec8cf90952d94ee35871736e145102a763e
2018-09-11 14:30:59 +02:00
Augustin Cavalier
21e99b4766 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 01:32:59 -04:00
Augustin Cavalier
4c7002a3d1 mime_db: Add type for HEVC elementary streams.
"Elementary streams" were introduced with MPEG-2, but did not find much use
outside of internal data interchange until now, which finds some HEVC
files being actually distributed in this format.

The first four bytes (00 00 00 01) are common to all (packetized?) elementary
streams, while the three following (40 01 0c) identify a HEVC stream. Actually
I could not find good data on these; all the HEVC files I saw (and some hex-
dumps on online mailing lists of more) contain these three bytes in common
while following ones appear to be the internal header. (I didn't dig deeply
enough into FFmpeg's source code to find out the "real deal.")

Fixes #12565.
2018-09-10 22:26:32 -04:00
Augustin Cavalier
14162168f5 mime_db: Add entries with sniff rules for DjVu and XPS.
These formats are supported by DocumentViewer.
2018-09-10 21:56:34 -04:00
Augustin Cavalier
503d889314 Remove the "Haiku" screensaver from the tree.
As discussed in #14447.
2018-09-10 19:51:02 -04:00
JackBurton79
5706737797 PictureDataWriter: Fix invert rect.
Resetting the drawing mode to B_OP_COPY was not right, since the previous mode could be anything.
Use WritePush/PopState() instead.

Change-Id: If9cba2c46bf372fd0164d951fcc49696cf72d576
2018-09-10 16:14:49 +02:00
JackBurton79
da51ebe0e5 BPicture: uncomment (and fix build) of the clip_to_picture method.
Does not seem to work, though.

Change-Id: I309d8de79a71ab8e08f4ac2f2566080b67b84800
2018-09-10 14:19:10 +02:00
JackBurton79
cb0d7a1ecd app_server: make a copy of the passed BPicture
Like the AS_DRAW_PICTURE case, make a copy of the passed BPicture also for AS_CLIP_TO_PICTURE

Change-Id: Id9a0adc48d73e5ec9c0d37e2ed85e30aa48369ab
2018-09-10 12:48:30 +02:00
JackBurton79
d1311300dc app_server: local variable was shadowing the outer variable
In the AS_CLIP_TO_PICTURE case, the "picture" variable was shadowing the outer "picture" variable.

Change-Id: I3b9de2432f93a683aaccdb899051a14ebf9b7e6e
2018-09-10 12:45:21 +02:00
Alexander von Gluck IV
7f644d106d xhci: gcc2 buildfix from hrev52319
Change-Id: I5d82059bd002c26ba372d55f5a5538ce7d19ffb2
2018-09-09 13:50:55 -05:00
Jérôme Duval
21c87a5d83 drivers: remove some non-haiku support code.
Change-Id: Ic55bb4832adabeb807f763c87ad938e74fb3a97d
Reviewed-on: https://review.haiku-os.org/520
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-09-09 17:32:01 +00:00
Augustin Cavalier
24ed1a79a3 AboutSystem Credits: Some updates.
* Move nielx back into Contributors
 * Move hamishm into Past Contributors
 * Add some new translation contributors
2018-09-08 20:14:26 -04:00
Augustin Cavalier
a3e22cdaa7 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-08 19:49:03 -04:00
Augustin Cavalier
47ba82bf03 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-08 19:03:06 -04:00
Augustin Cavalier
f960901a70 EFI: Use proper mnemnoic for retf (lret) to appease Clang. 2018-09-08 18:56:33 -04:00
Alexander von Gluck IV
bd234de11c xhci: Turn OpsReg waits into common function
Change-Id: I52ada3447b638db07622fa51746e75ce6cce7a46
Reviewed-on: https://review.haiku-os.org/518
Reviewed-by: Alexander von Gluck IV <kallisti5@unixzen.com>
2018-09-08 14:38:16 +00:00
Alexander von Gluck IV
4fead684b8 repo: Adjust repos to be more sane [master]
* Set url (identifier) as generic hpkg.haiku-os.org url
  * Set base-url (actual repo location) as eu.hpkg.haiku-os.org (our eu mirror)
  * Drop old "repository" url mess

I had a realization that haikudepot operates off of the base-url, if
we continue using old url's after r1beta1, we're going to be stuck
with all the symlinks and redirects for a looooong time.

This also opens the chance for us to go off of the generic "url"
for haikudepot identification, which will let it work when users
leverage mirrors.

Change-Id: Ic8fa954190cc26602911e133dd3c25ce2a96ce9d
2018-09-07 20:08:20 -05:00
Jérôme Duval
9928fbf629 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-06 13:26:58 +00:00
Jérôme Duval
a3a41a5b14 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-06 13:23:55 +00:00
Nikolas Zimmermann
0e9dc76e5f Fix build with DEBUG_PAGE_QUEUE enabled
Change-Id: Id9ffcd50835a0ba9e4276a3bb5939cc1d4afa128
Reviewed-on: https://review.haiku-os.org/516
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2018-09-06 07:46:25 +00:00
Murai Takashi
09095817eb Mediaplayer: Suppress -Werror=class-memaccess
Suppress -Werror=class-memaccess pointed out by gcc8.
 * Remove unneed memset(), since media_format is cleared by constructor.
 * Use media_format::Clear() instead of memset()

Change-Id: I02e19c1fab1f1b3f6c348e1d3ac63536d5c829b2
Reviewed-on: https://review.haiku-os.org/484
Reviewed-by: Barrett17 <b.vitruvio@gmail.com>
2018-09-05 09:29:01 +00:00
Andrew Lindesay
3cc5e76f2d 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-05 09:05:10 +00:00
Jérôme Duval
0ff73852d1 s3: fixes for SMAP.
untested.

Change-Id: Icbb3ddf8c0f840fae0e2107ca211728036ba8aa7
Reviewed-on: https://review.haiku-os.org/510
Reviewed-by: Alexander von Gluck IV <kallisti5@unixzen.com>
2018-09-04 14:02:18 +00:00
Jérôme Duval
89780a095e 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-04 12:33:14 +00:00
Humdinger
dc1991b5d5 Installer: update 'EULA' window
* De-escalate the severety of data loss from "high risk" to "risk".

* Remove the advice to not create partitions with DriveSetup. It's been tested
  and been working well since the last alpha. Do recommend making backups of
  all partitions.

* Remove description how to add Haiku to Grub. It's too much detail and the
  user would have to memorize the info. Add a link to our Booting guide
  instead.

* Mention BootManager as an alternative to boot Haiku, refering to the
  Userguide for more info.

* Alpha -> Beta

* Only give normal thanks instead of "a lot" and don't beg to like us.
  Sounded a bit desperate...

Change-Id: I212513fde01287f5d1c9c5c9891827aaf0b7e1ea
Reviewed-on: https://review.haiku-os.org/502
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit 1edc131debcf8ea1c9cd9eafd41c356f0432d9a5)
Reviewed-on: https://review.haiku-os.org/508
2018-09-03 01:39:45 +00:00
Augustin Cavalier
0df493a13a 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-02 00:13:40 -04:00
Augustin Cavalier
e54f86aa6a libshared: Change string_for_rate to use KiB/s instead of Kbps.
string_for_size uses KiB, etc., and so when the two are combined (e.g.
pkgman's progress display), it looked especially strange to have two
different units.
2018-09-02 00:10:30 -04:00
Augustin Cavalier
f45e4bd1b6 drivers/poke: Fix for GCC7 & C++11. 2018-09-01 16:15:01 -04:00
Augustin Cavalier
1e3f0626ab drivers/poke: Only allow root() to open.
This allows applications to theoretically open() the poke device but
then change their uid/euid to something more restrictive. The mem
device is not even this permissive; but I can think of some scenarios
in which this might be useful.
2018-09-01 15:43:57 -04:00
Augustin Cavalier
8d13e72523 drivers/poke: Access the user buffers correctly.
Untested (as it seems /bin/poke was never added?) but unless I messed
up some of the memcpy arguments, this should work.

Fixes #14429.
2018-09-01 15:40:50 -04:00
Augustin Cavalier
5ae6f34b81 drivers/poke: Compile as C++; some formatting cleanup. 2018-09-01 14:52:54 -04:00
Fredrik Holmqvist
6172ccc455 Embedded Controller, sync with FreeBSD
* Tries to handle all pending events at once
 * Wait is now polling every mS while waiting
2018-09-01 19:41:25 +02:00
JackBurton79
59a26ab62f FlattenPictureTest: add tests for ClipToRect,ClipToInverseRect,ClipToShape,ClipToInverseShape
Change-Id: Ia68b6989c2973f37f0772621190ab8f57fbeb381
2018-08-31 10:44:34 +02:00
JackBurton79
3211dccc22 FlattenPictureTest: add test for #6761
Change-Id: I848ccec2ea102dc4fc5c0e4f718053ecad196f8d
2018-08-30 11:25:55 +02:00
Augustin Cavalier
7985831a65 bin/multiuser: Do not exit with an error if stdin is not open.
As the comment says, there are a number of scenarios when this is
the case, e.g. non-interactive SSH sessions.

Change-Id: I3a10043820039f344b3f036f7861c81f6fb7ef05
Reviewed-on: https://review.haiku-os.org/499
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-08-28 23:34:27 +00:00
Augustin Cavalier
5e7b3530c8 freebsd11_network: Tolerate a NULL mutex being passed to msleep.
Our implementation of tsleep does this. It seems very few things
actually use that, though, so the issue referenced in the previous
commit may be one of the first things to use pause/tsleep.

Change-Id: Id2edb2268b3b078b9ded5d634cfa241599f882f1
Reviewed-on: https://review.haiku-os.org/490
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-08-28 19:50:19 +00:00
Augustin Cavalier
6aed80b4f7 freebsd11_network: Implement pause() using snooze() instead of cvars.
This is much simpler than the prior condvar-based method and should be
functionally equivalent. It seems tsleep() cause a NULL dereference,
though (which will be fixed in the next commit), so this probably
also fixes #14355.

Change-Id: I36968de38ceb0a1c0896cae8839821f5ca383504
Reviewed-on: https://review.haiku-os.org/489
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-08-28 19:50:19 +00:00
Augustin Cavalier
372195500d Versioning: Add BETA_1 and PRE_BETA_2 version constants.
* PRE_BETA_2 is now the default in master.
 * For libbe: R1/alpha4 used internal=8, but nobody bumped master
   at the same time, so now we are on internal=9.
2018-08-28 00:21:13 -04:00
Murai Takashi
e998f2e4ac Terminal: Fix -Werror=class-memaccess
Fix -Werror=class-memaccess pointed out by gcc8.
* Use TerminalLine::Clear() instead of memset()
* Use rgb_color::operator=() instead of memcpy()

Change-Id: I41360e245fd55c526d9c2802a2f247ba22583080
Reviewed-on: https://review.haiku-os.org/483
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2018-08-28 03:26:01 +00:00
JackBurton79
fee62e6a6e ffmpeg media decoder: revert latest changes to the AVCodecDecoder destructor.
Let's see if it fixes #14394.

Change-Id: Iba3a77197703b43f7c5e29292940b3a9018b4585
2018-08-27 10:08:31 +02:00
Augustin Cavalier
e55dd14050 freebsd11_network: Rework uninitialization order.
It is now in the exact reverse order of initialization. Untested,
but may help with some strange KDLs.
2018-08-26 14:15:09 -04:00
Augustin Cavalier
8636e31a55 BNotification: Fix copy-n-paste bug in OnClickRefAt.
Fixes #14405.
2018-08-26 13:48:51 -04:00
Augustin Cavalier
427edfcf0d Makefile Engine template: Whitespace cleanup and synchronization.
Also update comment as FULL is O3 not O2, fixing #14396.
2018-08-25 21:28:29 -04:00
Augustin Cavalier
7426861a93 radeon_hd: Add another working device ID.
Fixes #14379. Thanks cb88 for testing!
2018-08-25 21:08:35 -04:00
kerwizzy
1c2518b407 Mandelbrot: Implement incremental rendering and other improvements.
* Incremental rendering allows the user to see how the render is progressing.
 * Can move to a new location before the render finishes. Render will automatically restart at the new location.
 * Multi-threaded rendering now renders from a horizontal line in the center, giving a better experience.
 * Improved behavior for scrollwheel zooming. Now zooms with the mouse as the origin, as is the standard behavior in other applications such as map viewers.
 * Added lots of TRACE statements internally, which can be turned on in the code for debugging.

Change-Id: I1ad39a262ebe5c1b51d46b8cc09fb4de5113b9de
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2018-08-25 19:51:33 -04:00
Adrien Destugues
c2d37953f3 Rework PLL calculations for Iron Lake
The limits were wrong in several places. Checked the sandy bridge, ivy
brige and haswell docs, they all say mostly the same.

- The value of p2 is either 7, 14, 5 or 10 depending on 1 bit in the
  config register and on the display type. We can guess which values are
  right according to the global P limit (5-80 when using 5/10,
  28-something when using 14/7). The values are different because CRT
  need a precise, but rather low pixel clock, while modern display
  interface can accomodate being faster than required by a few MHz, but
  need a much higher speed (the bits are transferred serially, so they
  need to be at least 8 times faster than a DAC).

- The limits for N were obviously wrong, as the register is written with
  N-2, so values less than 2 make no sense. Use 3-8 as specified in the
  datasheet.

- The reference frequency (set by the driver) was wrong, too. It is
  120MHz, not 96. It is 100MHz in some cases (FDI, etc), we should see
  when this happens and switch to the right reference for PLL
  computations.

- There was an attempt to minimize the value of N (a powersaving effort,
  I guess?), but it would basically force the loop to stop at the first
  value of N tested, resulting in way off timings in some cases.

- To ease testing and stop sending patches and syslogs back and forth
  with vidrep, extract the "test mode" from pll.cpp into a proper test
  executable, making it a little easier to experiment with the code and
  fix the problems.

This should fix #13669 and possibly other cases of "out of range", black
screen, bad timings, etc.

Change-Id: Ic4c1c159701f352b7c1ef15a647f023c82ac26c
Reviewed-on: https://review.haiku-os.org/360
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-08-25 18:52:33 +00:00
Humdinger
c0bbce07c8 Terminal: Make blinking cursor settings live
Change-Id: I51b2f4753c4c331c075293a7d531b26a2fbdc457
Reviewed-on: https://review.haiku-os.org/479
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2018-08-25 18:51:29 +00:00
Andrew Lindesay
8f30879b98 Support : Validation for Host Portion of URL
Partly Fixes #14377

Change-Id: Ia611d3653d2c16c6dcdc48ce57bd61bb6e6db366
Reviewed-on: https://review.haiku-os.org/476
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2018-08-25 18:50:36 +00:00
Kacper Kasper
df8b692ac0 Revive unit tests
* Fix build on 64-bit.
* Test suite can now run from start to finish.
* Changes in OutlineListView test need an explanation:
  for some reason when BApplication is created on heap, be_app is not
  reset. This causes other tests to crash due to second BApplication
  object being created.

Change-Id: Ic7d55f4622192f83572bfd83fa37f1f5fd641e22
Reviewed-on: https://review.haiku-os.org/465
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-08-25 18:50:26 +00:00
Murai Takashi
6d99295f41 bus_managers/pci: Fix -Wmismatched-tags
Replace class with struct, since PCIDev is previously declared
as a struct in pci.h
Pointed by clang  [-Wmismatched-tags]

Change-Id: I6d85a8e4faa039c9905e4710715331e72beff413
Reviewed-on: https://review.haiku-os.org/481
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-08-25 18:50:12 +00:00
Fredrik Holmqvist
b2e0398cd4 ps2_dev encapsulate TRACING code
Avoid doing system_time() calls in a loop.
Is this even needed anymore?
2018-08-24 13:51:48 +02:00
JackBurton79
5aff790ae1 ffmpeg media reader: remove useless avformat_free_context():
avformat_close_input() already calls it.

Change-Id: I45433527459bda430b8f0d15850fdcc019042db3
2018-08-24 09:34:41 +02:00
JackBurton79
de9e43cd6a ffmpeg media decoder: Fix double free() (and possibly #14394.
Don't call avcodec_close() and then avcodec_free_context().
The latter replaces the former.

http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2ef6dab0a79a9852a92ed80b07f9e32a37530d9e

Change-Id: I346dc8da20a274bcfd901b4a67e612f0f38323b0
2018-08-24 09:34:01 +02:00
Adrien Destugues
d15e61541e I did not mean to commit this.
Sorry!
2018-08-23 20:21:55 +02:00
Adrien Destugues
9a152c9cb0 Change the prompt again.
As expected there was a lot of bikeshedding.

Just change the color of the path, green on success, red on failure.

Constraints taken into account:
- Keep the > for now
- Prompt should be as compact as possible for those of us using 80
  column terminals.
- Prompt should not change size between success and error cases

Not taken into account:
- The feature should be accessible to colorblind people (we could
  replace the > with another char but we couldn't find something that
  looks suitable)
2018-08-23 17:51:21 +02:00
JackBurton79
6ec69f4426 Small style fixes
Change-Id: I1db785122efe70e416b4073c06148c856c5a5e8d
2018-08-23 13:55:09 +02:00
JackBurton79
9923dd5ce5 network stack: move put_device_interface() at the end of the Interface destructor.
Fixes #10919.

Removing an interface triggers this sequence:

datalink_control() calls interface->ReleaseReference() which causes the
Interface destructor to be called. The Interface destructor calls
put_device_interface(fDeviceInterface) which destroys the
net_device_interface, then calls put_domain_datalink_protocols(this, datalink->domain)
in a loop. put_domain_datalink_protocols() tries to access the deleted
net_device_interface, hence the KDL.

Change-Id: I2326bcd6d1fd80a69e5fdfa6629563b38ecdbbac
Reviewed-on: https://review.haiku-os.org/469
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2018-08-23 06:36:11 +00:00
Adrien Destugues
1147b9a49d Haiku does provide strchrnul.
Fixes #14386.
2018-08-23 08:15:28 +02:00
Augustin Cavalier
a41d815c67 ramfs: Lots of fixes to the build.
* Store pointers in an addr_t instead of int32, for 64-bit's sake
 * Use DebugSupport.h instead of userlandfs Debug.h and remove extra parentheses
 * Create a header-only String class based on the userlandfs String and use it
 * RecursiveLock instead of Locker.
 * Jamfile cleanups and other misc. changes.

It isn't yet adapted to the new VFS API, so the build is still somewhat
broken.
2018-08-22 19:19:56 -04:00
Augustin Cavalier
c7919fc71a packagefs: Move DebugSupport up into the file_systems shared folder.
ramfs will find it useful also.
2018-08-22 19:19:56 -04:00
Augustin Cavalier
e0d28cdccf reiserfs: Fix the build and enable on x86_64. 2018-08-22 19:19:54 -04:00
Augustin Cavalier
0217e08a63 vfs: panic() if volume->ops is NULL but status == B_OK.
This panic, unlike the NULL dereference that would otherwise occur, is
at least continuable.
2018-08-21 21:22:52 -04:00
Augustin Cavalier
416efa19c6 freebsd11_network: Do not define ffs() for Clang.
cpufunc.h uses the __builtin version here.
2018-08-20 21:06:55 -04:00
Augustin Cavalier
4c00d515f1 freebsd11_network: Add NULL check to if_getdrvflags.
This is the proper fix for #14182, as discussed on the mailing list.
2018-08-20 21:06:24 -04:00
Augustin Cavalier
ac3431d6e1 Undo addition of NULL check to ipro1000.
This reverts commit 4e44b1a472.
2018-08-20 21:02:35 -04:00
Augustin Cavalier
c20e7a6862 build: Add a haiku_source package.
This contains the contents of Haiku's sources, which is necessary
to include in "with source" builds for proper (L)GPL compliance,
mostly because we have GPL code in the tree.
2018-08-20 21:00:25 -04:00
Rene Gollent
fc48ae3f80 Debugger: Fix #14375, #12343.
TeamDebugger:
- When a job is aborted, instead of calling into the user interface directly
  to reset the status message, post a message to do so. Also, only post the
  message if we aren't already in a terminating state. Otherwise, if jobs
  were still running while the team debugger is executing its destructor, it
  would attempt to make calls to the already destroyed user interface. This
  bug has likely been with us for quite some time, but was hidden by incorrect
  ref counting in the past (see #12343).
2018-08-20 16:44:20 -04:00
Rene Gollent
9ebb7ab422 Debugger: Fix #14374.
ExpressionPromptWindow:
- Post a quit requested rather than quitting directly. As a consequence of
  this oversight, the team window would never get the notification that the
  prompt had been closed, and would consequently not reset its internal state
  properly.
2018-08-20 16:41:58 -04:00
Augustin Cavalier
b2cb85f4d5 libroot: New memcpy for ARM.
It seems the old one was just broken (see mailing list discussion.)

This new one was built from the generic one, but it was done using
a trunk build of Clang 8 with tuned optimization flags, and is
smaller (101 instructions) than GCC 8's (134 instructions) and
the old hand-optimized one (~125 instructions?) as well as being
targeted for ARMv7 instead of ARMv6 like the old one was.

In the future, we may want to look at newlib's ARM memcpy, which
is probably much more hand-optmized than this one is, but this
is at least better than what we had before.
2018-08-20 11:53:47 -04:00
Augustin Cavalier
fbc02f9437 pacakge_infos: Update copyrights. 2018-08-20 11:32:57 -04:00
Humdinger
07a70c6feb Expander: remove hard newlines from alerts 2018-08-20 17:12:46 +02:00
Adrien Destugues
44cff45d3d HttpRequest: chunk length are in hex
Thanks to mmlr for spotting this. The wrong format specifier was used,
which would lead the server to get the wrong size and do strange things.

Chunked uploads should now work a lot better.

While I was at it, put the line termination in the printf to save a
write to the socket (these are unbuffered and each of them costs us a
syscall, and in some cases this has been found to confuse webservers as
we end up sending super small TCP packets).
2018-08-20 08:02:34 +02:00
Augustin Cavalier
4e44b1a472 ipro1000: Add missing NULL check.
Should fix #14182.
2018-08-20 00:42:52 -04:00
Augustin Cavalier
4356fc7636 radeon_hd: Disable another non-working chipset. 2018-08-20 00:42:04 -04:00
Murai Takashi
d9863ca8dc Replace strncpy with strlcpy
Replace strncpy with strlcpy, since destination size equals
maximum number of characters to copy.
Pointed by gcc8 [-Werror=stringop-truncation]

Change-Id: I528a35bd071b1d13f16dcec2e8c2007b5bb072b2
Reviewed-on: https://review.haiku-os.org/473
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-08-19 20:36:01 +00:00
Murai Takashi
3a50df1bd0 Network kit: Fix -Wformat-overflow
Increase array size, since gcc8 x86_64 warns 'sprintf' output
between 2 and 20 bytes into a destination of size 16
[-Werror=format-overflow=].

Change-Id: I641db97d963b64b0c3434cd498f29f4dcb61c373
Reviewed-on: https://review.haiku-os.org/472
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-08-19 20:35:53 +00:00
Augustin Cavalier
dd54d46895 realtekwifi: Move LOCK call out into the generic path.
Should fix a "mutex not locked" KDL reported by Begasus.
2018-08-17 12:12:36 -04:00
John Scipione
466b81b6c2 Window: Max-Zoom windows with Shift+Ctrl+Alt+Z
Since hrev52136 holding Shift while clicking the zoom button will
ignore the Deskbar and resize the window to take whole screen area
(the original behavior).
It'd be nice if the keyboard shortcut for zooming - Ctrl+Alt+Z
recognized an additionally held Shift in the same way.

Add shortcut to window.

Fixes #14365

Change-Id: I919ff2c3e8c41e022f8c675ea631daf18ff41eb3
Reviewed-on: https://review.haiku-os.org/470
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-08-16 20:30:48 +00:00
François Revol
4fced27d37 acpi: fix format warnings with DEBUG_OSHAIKU set 2018-08-16 18:29:19 +02:00
JackBurton79
8d721650ce Check for NULL before dereferencing fStream pointer.
Change-Id: Ic1c21b24a3a1c02b478d1e8b2e395cc8a4e7adab
2018-08-16 16:31:00 +02:00
JackBurton79
1da12a78de Reintroduced keeping the state of failed initialization.
As Stephan said, some apps ignore the return value of Encode(),
and since _OpenCodecIfNeeded() is called from there, this could
cause wasting of cpu cycles.

Change-Id: I80e1464d8532ebf80c514685ef3a25d98d8142fb
2018-08-16 10:09:22 +02:00
JackBurton79
53086e436e AVCodecEncoder: avcodec_close() is deprecated.
A codec context cannot be reopened, anymore.
Reorganize code accordingly.
Remove usage of the AVFormat context (which was not enabled, anyway) since it's no longer possible to do that.
Use av_frame_free() instead of av_free()
2018-08-16 08:07:21 +02:00
Augustin Cavalier
6bbfad51b7 keymaps: Add Russian/Yawert (Phonetic).
From roiredxsoto. Fixes #14343. Thanks!
2018-08-15 16:38:08 -04:00
Jérôme Duval
ee692b38b2 x86_64: R_X86_64_PC32 and R_X86_64_DTPOFF32 are 32-bit wide relocations.
Change-Id: I9c4e6c5ae77f4c17c2b6901f2b133db4b9dc48e3
Reviewed-on: https://review.haiku-os.org/445
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-08-15 16:16:20 +00:00
Kacper Kasper
fe8b46fb0d kernel: vm: add unit tests for get_mount_point
Change-Id: I1eb7540ffadb26acf05b695af2e7508c71ac7274
Reviewed-on: https://review.haiku-os.org/460
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-08-15 16:14:18 +00:00
Kacper Kasper
78058cf6d5 tests: Add support for 64-bit ELFs in SymbolPatcher
Change-Id: I1f323e0d6d5c47d7d0de980fc6cc7ccbe799ae0e
Reviewed-on: https://review.haiku-os.org/466
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-08-15 16:14:01 +00:00
Adrien Destugues
04ba34b0a8 usb_hid: blacklist Silicon Labs EC3.
Definitely not an HID device. Programming tools use libusb.
2018-08-15 10:00:40 +02:00
Augustin Cavalier
552fabf1ad libroot: Merge some changes to longlong.h for ARM from upstream.
Gets the ARM/Clang build all the way to the libroot linking stage.
2018-08-15 00:11:30 -04:00
Augustin Cavalier
581da829b5 libroot: ARM does not have regparm.
Also fix the test for USE_REGPARMS in the same file. Gets the Clang
build somewhat further.
2018-08-15 00:10:33 -04:00
Alexander von Gluck IV
9ae04563d6 framebuffer/bcm2835: Check for available mailbox
Change-Id: I6f158335c4bdda108c13c26f62bfd8d814ea1b3f
2018-08-14 16:58:17 -05:00
Alexander von Gluck IV
b795602253 boot/mmu: Fix hrev52228. No returns from mmu_identity_map.
* Pretty sure Jam didn't compile the changes to this file.

Change-Id: I9dccd24e523d5bd575565f1768314a9d8f2be1ab
2018-08-14 16:26:58 -05:00
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
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
d284f7cc43 keyboard_layouts & keymaps: Define translation contexts properly. 2018-08-13 16:44:22 -04: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
376472a816 libroot: Some fixes for Clang ARM builds. 2018-08-11 15:26:08 -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
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
Augustin Cavalier
779d9140a4 radeon_hd: The MMIO area should be user-cloneable. 2018-08-08 23:51:36 -04:00
Augustin Cavalier
d8ad2d6f33 packagefs: Rename operator< to HasPrecendenceOver().
As suggested by weinhold on the mailing list.
2018-08-08 23:48:37 -04:00
Augustin Cavalier
ce0ef8c870 USB: Remove BeOSCompatibility.h and associated cruft. 2018-08-08 23:48:37 -04:00
Adrien Destugues
1a3a613584 DiskProbe: allow full and half fixed fonts. 2018-08-08 20:01:21 +02:00
Adrien Destugues
ac2ed5cc13 Terminal: use BFont::IsFullAndHalfFixed. 2018-08-08 19:57:17 +02:00
Augustin Cavalier
cd7bd43778 Fix missing B_USER_CLONABLE_AREA in intel_extreme
Fixes #14333
2018-08-08 19:49:02 +02:00
Philippe Houdoin
739e2ceffc text_search: avoid flooding messages while searching.
* This was making unresponsive the target window, making impossible
  to cancel it at all. Now the current filename is reported at 20Hz,
  well enough for good visual search progress feedback. Fixed #14175.

Signed-off-by: Kacper Kasper <kacperkasper@gmail.com>

Style fixes:
* Commit message formatting.
* Removed commented code and unnecessary whitespace.
2018-08-08 19:42:37 +02:00
Alexander von Gluck IV
3718fb861d efi: Drop x86_64 assumptions.
Change-Id: I3d806f43ef951013369fd0bf906eca5977e8d34c
2018-08-08 10:18:06 -05:00
Alexander von Gluck IV
572030aca6 kernel/efi: Add efi platform
Change-Id: Ie3cc4b4652d56983147221db9fbee6b72f177b1b
2018-08-08 09:48:34 -05:00
stefano
740114b89c Allocate the packet via ffmpeg.
Seems we aren't allowed anymore to handle it ourselves.
2018-08-08 12:11:53 +02:00
Rene Gollent
57893202f1 Debugger: Fix #14321.
DIESubprogram:
- Adjust to inherit from DIENamespace, as gcc can and will use it as a
  container in some circumstances.

DIEClassBaseType:
- Add accessor for member functions.

DwarfImageDebugInfo:
- Adjust recursive walking for types to take into account any DIENamespace,
  not just DW_TAG_namespace specifically.
- Factor out adding function to list into a helper.
- When retrieving the list of functions, perform a similar recursive walk as is
  done when building the types table, as some subprograms are apparently not
  always added to the root compilation unit entry. Curiously, this behavior
  seems to be relatively specific to a struct/class type declared inside a
  function in GCC's case, but based on the DWARF spec, there does not appear to
  be any specific restriction as far as where these can be nested, so be a bit
  more paranoid to ensure we don't encounter similar cases in the future.
2018-08-07 22:28:04 -04:00
Adrien Destugues
8d1f13817f libsolv: #define _GNU_SOURCE from command line
On Haiku host, we need _GNU_SOURCE defined when stdio.h is included
to use fopencookie. We did that in libsolv sources, but we now include
stdio from BeOSBuildCompatibility.h which is included from the command
line. So set _GNU_SOURCE from command line as well.
2018-08-07 20:50:56 +02:00
Adrien Destugues
d9949ac911 Initial work on Apple Stylewriter printer driver. 2018-08-07 19:30:16 +02:00
JackBurton79
c85dd27c9e AVCodecEncoder: Use new API
Change-Id: I5b985cebf241e67f901e93a5a4bb61a67a659cdf
2018-08-07 18:40:15 +02:00
Augustin Cavalier
247f2fb691 packagefs: Rename isNewest to overridesHead.
As pointed out by Adrien. Thanks for the review!

Also fixed missing dereference operators.
2018-08-06 23:46:24 -04:00
Augustin Cavalier
023a547dc6 vm: Enable B_USER_CLONEABLE_AREA protection.
Spotted while reading through the VM code while thinking about how to
implement vfork().

When axeld disabled this in 2005 (!), Haiku's kernel was still young,
BeOS drivers were still "a thing," and there was no distinction in this
function from being called by the kernel / not by the kernel.

Now, it's 2018, we manage all drivers ourselves, have SMAP enabled by
default when available, and as axeld recently noted on the mailing lists,
"there's not much reason we still use GCC2 for the kernel anyway." So we
probably don't care about any BeOS drivers that may be broken by this
(are there any still around?)

Besides the usual fixes to get this 13-year-old chunk to work again, there
are two functional changes:
  1) Allow the kernel to clone whatever it likes into the user's address space.
     It seems that this is often done legitimately (e.g. team creation), and
     so attempting to distinguish those cases seems more work than it may be
     worth right now.

     The disadvantage is that drivers without proper checks may be "tricked"
     into cloning areas they shouldn't; but I'm guessing if that's the case,
     then something else is probably broken and the driver should be fixed.
     It seems the reverse case (cloning a userland area into the kernel)
     is much more common (in fact, it looks like all 4 of the 4 places
     where clone_area is used in kernel-space outside the kernel itself
     are doing this.)

 2) At KDEBUG_LEVEL 2 and higher, throw a panic when attempting to clone
    an area that does not have the protection flag set. This should make
    finding any bugs exposed by this change much easier than "hardware doesn't
    work" / "black screen on boot" / etc., as well as any potential future
    bugs introduced in the process of driver development.
2018-08-06 23:27:50 -04:00
Alexander von Gluck IV
91bc3a279a kernel/ppc: Fix PowerPC build after fdt changes
Change-Id: Ieccec192c9d257368f8a9b5c52d01ed3c1c66d23
2018-08-06 19:55:48 -05:00
David Murphy
bbf16bc67a HaikuDepot: Fix featured package icon drawing transparency
Change-Id: I4ed26754ef5c0bfb0638de1703ece7d84fadf12a
Reviewed-on: https://review.haiku-os.org/443
Reviewed-by: Andrew Lindesay <apl@lindesay.co.nz>
2018-08-06 23:41:06 +00:00
Kacper Kasper
f26398d462 kernel: vm: remove panic
* That's embarrassing.
2018-08-06 23:09:05 +02:00
Kacper Kasper
7cea6679a8 kernel: vm: fix off-by-one errors in get_mount_point
* Fix for 03df8bfcf2.
* Fix misleading indentation.
* Fixes #14225.
2018-08-06 23:07:27 +02:00
Adrien Destugues
3f45e1e6ef Do not play/pause files nedlessly.
The Controller would always pause and resume playing, even if it found
out there was no position or volume to restore. Since pausing on http
streams appears to be broken, this is not a good idea. Just check if we
have something to restore, and leave the function if not.

Fixes #14326
2018-08-06 20:15:23 +02:00
Jérôme Duval
c90a0ee947 posix_spawn(): dup2() again this time on file_action_dup2.
* fixes #14322.
2018-08-06 19:13:32 +02:00
Alexander von Gluck IV
5d0fd0e422 fdt: Major over-haul of fdt
* Consolidate all fdt code into fdt bus_manager
* Build boot and kernel static libraries

Change-Id: I2a69cd7e1f1276999a80734ff12918fd49b599e5
Reviewed-on: https://review.haiku-os.org/440
Reviewed-by: Alexander von Gluck IV <kallisti5@unixzen.com>
2018-08-06 15:46:49 +00:00
Alexander von Gluck IV
c3f9610748 arm/mmu: First iteration at mapping peripherals from FDT
* This fixes booting Haiku on Raspberry Pi and qemu (-M raspi2)
* Makes several assumptions which need corrected.
  /axi is broadcom only
  size is fixed
* The final solution will be "probing" each simple-bus device
  from the fdt. A lot of fdt support code needs written though
  for "finding" compatible devices and determining the full size
  of the devices in memory.

Change-Id: Ifd5fbab7490c8456247115f5aada618909f1bb9e
2018-08-06 08:57:15 -05:00
Augustin Cavalier
daad9a3c1c kernel: Revert MMC bus changes to device_manager.
This broke booting on most (all?) systems.
2018-08-05 21:56:54 -04:00
Murai Takashi
8d86b84d18 Accelerants: Fix -Wformat-overflow
* Use strlcpy() and strlcat() instead of sprintf()
  to suppress -Wformat-overflow pointed by gcc8.
* Add <string.h> to mga_std.h for strlcpy() and strlcat().

Change-Id: Ib038283fd213c9e0ac9f19482402b55d2e3f204a
Reviewed-on: https://review.haiku-os.org/429
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2018-08-06 00:13:12 +00:00
Augustin Cavalier
5301f108ef packagefs: Directories with more attributes take precedence over ones with less.
This still preserves the behavior that system packages take precedence over
non-system packages.

Fixes #10071 (at last.)
2018-08-05 18:26:42 -04:00
Augustin Cavalier
abf0c2878a packagefs: system_packages take precedence over non-system packages.
Affects *all* nodes, i.e., both directories and files. It is still possible
to override these, but it must be done in another system_package, not just by
mounting a package with newer datestamps on the conflicting files.

This is the pure version of axeld's proposal 2(d) from #10071. However,
as the haiku_secondary packages contain application mime_db entires and
are also 'system_package's, it does not fully solve that ticket.
2018-08-05 18:26:41 -04:00
Augustin Cavalier
0779294800 Package Kit: Fix logic reversal in PackageInfoStringBuilder.
This function is used when serializing a BPackageInfo object, which is not
done very often, and flags are used even less often. But both of these things
are done for the system packages, as they have the "system_package" flag
set, and are processed by "update_package_requires", and so this meant
that the "system_package" flag was turned into the "approve_license" flag.
2018-08-05 18:26:41 -04:00
Augustin Cavalier
5753ed5544 packagefs: Move PackageNode comparison into an operator<.
This commit does not amount to any functional change: we still compare
purely by modification date alone. But it does de-duplify the code somewhat,
and makes it possible to easily implement changes to the comparison.
2018-08-05 18:26:41 -04:00
krish_iyer
25b6a6f19b SDHCI MMC Driver
1. SDHCI PCI Bus: Discovering SDHC device from the PCI bus
	and registers a child node(MMC bus) to which slots
	are attached. SDHC registers are mapped by MMUIO,
	they are binded in a structure(struct* registers).
	A pin based interrupt handler is also installed,
	which triggers the handler function and interrupts
	are being taken care of. Added API's to set-up and
	the clock for SD/MMC card, change frequency and
	reset the registers.

2. Device Manager: Currently, busses subdir lists are har-
	dcoded and in order to load the driver. We hard
	coded the bus dir under PCI devices.

3. MMC Disk Driver: In order to register the slots under
	/dev/disk/mmc and hence data transfer and other
	operations can be done.

4. MMC Bus Manager: Setted up a bus manager to create an object
	to do a particular for eg certain data transfer and
	get freed until another operation is requested.

Change-Id: I369354da6b79adc6b6dfb08fe160334af1392a34
Reviewed-on: https://review.haiku-os.org/318
Reviewed-by: Alexander von Gluck IV <kallisti5@unixzen.com>
2018-08-05 20:56:54 +00:00
Barrett17
42cc463169 ffmpeg: Fix typo and copyright notice 2018-08-05 14:29:16 +02:00
Barrett17
201707aee8 AVCodecEncoder: Skip frames
* Fix garbage put into videos while encoding.
* Testing welcome.
* Various fixes are still waiting to be merged into Haiku.
* Fixes sponsored by the V\OS project.
2018-08-05 13:26:33 +02:00
Barrett17
5e2290b083 AVFormatWriter: Set packet stream index to current 2018-08-05 13:23:45 +02:00
Barrett17
bbe2746941 AVFormatWriter: Fix debug build 2018-08-05 11:53:43 +02:00
Barrett17
e93fce62f2 AVFormatWriter: Correctly set DTS
* Fixes timestamp warning from ffmpeg.
* Fixes #13407 AFAICT. But please test.
2018-08-05 11:50:03 +02:00
Barrett17
a72bbd5bd2 AVFormatWriter: Cleanup GET_CONTEXT_DEFAULTS macro
* av_get_context_default(1,2,3) are deprecated. The functions are supposed
to "reset" a codec context to a clean state so that it can be opened again.
It was used to allow using AVStream.codec as a decoding context
That behaviour is now deprecated, so that's why the function is too.
* hint: The code is probably still doing something bad in that regard.
* Unfortunately the macro removal did end up in the codecparam diff,
but was originally intended to be a commit alone I can't rewrite history
unfortunately, at least an explanation is given here. In any case the
code wasn't used so no functional change, this is mostly educated cleanup.
2018-08-05 11:31:40 +02:00
Barrett17
b5d0ce85f4 AVCodecEncoder/AVFormatReader: Remove kNoPTSValue hack 2018-08-05 11:04:59 +02:00
Barrett17
9467826d31 AVFormatWriter: Remove OPEN_CODEC_CONTEXT hack 2018-08-05 11:04:59 +02:00
Augustin Cavalier
fc35866e55 iprowifi4965: Rework interrupts glue code.
Untested, but this now better matches how the FreeBSD code does it.
Potentially fixes a bug where interrupts would be spuriously re-enabled
after the driver had disabled them, which may fix a KDL humdinger
reported to me via IRC.
2018-08-04 12:21:08 -04:00
Barrett17
03437cd7b8 AVCodecEncoder: Rename fContext to fCodecContext 2018-08-04 12:11:09 +02:00
Barrett17
e302fe32cf AVCodecDecoder: Rename fContext to fCodecContext 2018-08-04 12:11:09 +02:00
Barrett17
ee9d0e0238 AVFormatWriter: Rename fContext to fFormatContext
* Seriously, this naming is bad.
2018-08-04 12:11:09 +02:00
Barrett17
428d87c581 AVFormatWriter: Move codec to codecpar
* Little cleanup included.
2018-08-04 12:11:09 +02:00
Barrett17
6283eeb2ff AVFormatReader: Move codec to codecpar 2018-08-04 12:11:08 +02:00
Barrett17
334b8f3f9c ffmpeg: Remove obsolete code 2018-08-04 12:11:08 +02:00
Fredrik Holmqvist
1368eabbff Fix gcc2 comparison, and only align if not aligned (8 - 0) 2018-08-03 15:31:03 +02:00
Fredrik Holmqvist
04cbc2588e Use fast clearing of visible screen for splash
memset uses rep stosb on x86 during boot, with memory
not set to write-combining, which makes it slow.

Instead we do aligned writes of 2 x four bytes at once.
Only clear the minimum of size and width * height * 4
UEFI framebuffer size can be huge, upto 512MB here,
and rep stosb seems to be around 25-30MB/s

This is written as generic as possible to work on
old compilers and different platforms, without
expecting boot memset to be optimized.

This makes it almost unnoticable compared to not
clearing.
2018-08-03 13:40:04 +02:00
Jaroslaw Pelczar
5effe7f3ec bootloader: Align boot volume structure to 8 bytes instead of 4.
This alignment is preferred e.g. on ARM when using 64-bit values.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2018-08-02 19:51:53 -04:00
Augustin Cavalier
fb4cc98472 build: Add initial ARM64 target.
It will probably be just stubs for the significant future, but,
here it is anyway.

Regarding the naming: Yes, the official name is "aarch64." However,
Linux, FreeBSD, and Zircon all call it "arm64", and so we will do the same.

I've configured it initially to be a Clang-only port, making no
changes to GCC buildtools whatsoever here. We'll see if that sticks,
however.
2018-08-02 19:48:29 -04:00
Jérôme Duval
9a90ee3a38 Revert "Switch default fixed font from NotoMono to NotoSansMono"
This reverts commit b2acee1cb9.

Reason: NotoSansMono is not per se a fixed font.
2018-08-02 14:19:33 +02:00
Jérôme Duval
033f3450e3 Revert "Appearance: fix "Fixed font" menu after the change to "Noto Sans Mono"."
This reverts commit aa3c64e46d.

Reason: the previous change is to be reverted.
2018-08-02 14:17:46 +02:00
Jérôme Duval
aa3c64e46d Appearance: fix "Fixed font" menu after the change to "Noto Sans Mono". 2018-08-02 14:07:26 +02:00
Humdinger
b2acee1cb9 Switch default fixed font from NotoMono to NotoSansMono
Change-Id: Ib9eab5a2e266393b234cf7f4a6934fd58e31c943
Reviewed-on: https://review.haiku-os.org/48
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2018-08-02 10:43:57 +00:00
Stefano Ceccherini
d9eeaa720a Server side support for BFont::IsFullAndHalfFixed().
Check a range of characters to see if they have the same width.

Change-Id: I9cef12f78d1e1d01acc6284eae90dbfb86166fc6
Reviewed-on: https://review.haiku-os.org/47
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2018-08-02 10:43:57 +00:00
Jérôme Duval
20694a0458 posix_spawn(): dup2() returns a fd on success, -1 on error.
* duplicate the just opened file descriptor, instead of the target file descriptor.
* fixes #14308.
2018-08-02 11:21:04 +02:00
Augustin Cavalier
edb6d3b17b kernel_cpp: Move the C++14 operator delete out of the header.
It seems not all of the kernel includes this, but some use new/delete
anyway. Further, operator delete[] was not implemented at all.

Possibly fixes the ARM build.
2018-08-01 23:42:24 -04:00
Augustin Cavalier
cf36277e17 freebsd11_network: Add definition of ALIGNED_POINTER for PowerPC.
It seems this is needed anyway, as netresolv uses these headers.
2018-08-01 23:23:21 -04:00
Augustin Cavalier
a31d07a2a9 libnetapi: Fix style issues in previous commit. 2018-08-01 22:50:08 -04:00
Augustin Cavalier
0dc3ab4f37 libnetapi: Do not use the freebsd11_network headers globally.
Since they were being Use'd at global scope, the FreeBSD versions
of a number of POSIX headers were being used instead of the POSIX ones,
which breaks the build on non-x86 as these headers presently do not work
elsewhere.

Instead, just include the base directory, and then include the compat
headers manually in the one place that actually requires them.
Also fix all the other files that expected errno.h and others to
be included implicitly, which they now are not.

This should fix the PowerPC and (part of the) ARM builds.
2018-08-01 22:35:47 -04:00
Augustin Cavalier
ca57e33abb libroot/glibc: Use .double instead of .tfloat on Clang.
Clang's equivalent of .tfloat is .x86_fp80, but apparently that
is not enabled for Haiku. So for now, use .double instead.
This is the same thing MinGW does.
2018-08-01 19:04:25 -04:00
Augustin Cavalier
834100c94f libroot/glibc: Merge newer e_expl* files.
These versions (from ~2015 glibc) do not use some GCC-specific extensions
that Clang's integrated assembler does not like.
2018-08-01 19:02:04 -04:00
Augustin Cavalier
b3b69f8178 netresolv: Merge a patch to getaddrinfo from NetBSD.
This block was originally disabled in libbind, and we enabled it
independently; and so did NetBSD. But they also made one other
fix:

From: christos <christos@netbsd.org>
Date: Thu, 28 Dec 2017 15:12:15 +0000
Subject: [PATCH] PR/52837: Michael Kaufmann: getaddrinfo() resolves "127.0.0.1
 www.example.com" to 127.0.0.1. Apply the patch from FreeBSD and explain the
 rationale.
2018-08-01 18:23:15 -04:00
Augustin Cavalier
c9431a6752 netresolv: Mark code changes with __HAIKU__.
I attempted to merge NetBSD's new irs code, but their changes turned
out to be too invasive to do trivially, but in the process I had to
read our commit logs to find what we've changed, so at least I can
mark that.
2018-08-01 18:23:15 -04:00
Augustin Cavalier
4cc9ce9ddd netresolv: Merge patches from 2017 to current HEAD.
Commits merged from the semi-official Git mirror of NetBSD
trunk (https://github.com/IIJ-NetBSD/netbsd-src/).

Commit authors/messages in chronological order follow:
---------------------------------------
From: christos <christos@netbsd.org>
Date: Thu, 28 Sep 2017 23:32:01 +0000
Subject: [PATCH] PR/52578: Benjamin M. Schwartz Set the AD bit when DNSSEC is
 enabled (RFC 6840 Section 5.7).

From: lukem <lukem@netbsd.org>
Date: Fri, 2 Mar 2018 06:31:53 +0000
Subject: [PATCH] PR/48585: Set errno when returning NULL for AF_INET
In inet_ntop4(), errno wasn't set before returning NULL.
Seems like an oversight in the existing fix for PR/48585.
Noticed by code inspection.
2018-08-01 18:23:15 -04:00
Jérôme Duval
0771d6b296 runtime_loader: differentiate between secondary runtime loaders. 2018-08-01 21:18:01 +02:00
Fredrik Holmqvist
15db6949b6 Don't clear video mem on UEFI, efi video mode refactor
Writes to videomem is slow without memory remapping
Can't do the mapping without leaving UEFI, so skipping
the clear. Afaict it should always be cleared by UEFI

This saves ~10 seconds of booting on my machine
(1920*1080*4 bytes)

EFI video mode (should have been it's own commit)
 * Only do strcmp if there are enough params
 * break when found
2018-08-01 21:12:08 +02:00