Commit Graph

58412 Commits

Author SHA1 Message Date
Jérôme Duval
4f5ed463b5 kernel: vfs: common_fcntl() now uses memcpy() for kernel calls.
instead of user_memcpy().

* fix #14204: the NTFS filesystem kernel addon uses the fcntl system call to
lock the underlying device. The user_memcpy replacement in the x86 compat
branch adds range checks for the user pointer, which exposes such problems.
2018-06-30 15:46:52 +02:00
Augustin Cavalier
65df4b51f5 freebsd11_network: Discard __FBSDID() macros instead of declaring them.
Nothing uses them, and they just generate a ton of "unused global" warnings.
2018-06-29 23:15:51 -04:00
Augustin Cavalier
595605d86f freebsd11_network: Properly handle M_NOWAIT in _kernel_malloc.
I'm not sure what the comment was about; HEAP_DONT_WAIT_FOR_MALLOC
predates the FreeBSD compatibility layer.

Potentially fixes some timing issues.
2018-06-29 23:11:14 -04:00
Augustin Cavalier
da166fc646 iprowifi4965: Add the missing IWN_SDID_6035_5 subdevice.
This goes with the "IWN_DID_6035_2" (0x088F) device ID. We had added the device
ID in the FreeBSD 9 version of the driver, which didn't properly handle the
device but somehow still managed to use it.

Thanks to miqlas for reporting and then confirming this fix.
2018-06-29 22:09:06 -04:00
Jérôme Duval
c48bd46fd8 remove unused firmware. 2018-06-29 16:36:32 +02:00
waddlesplash
6baca0c4f4 iprowifi3945: Fix GCC4+ build. 2018-06-28 18:42:58 -04:00
Augustin Cavalier
3cc8e19a4e freebsd11_network: Fix the build at KDEBUG_LEVEL < 1.
Thanks to Humdinger for reporting!
2018-06-28 17:32:54 -04:00
Augustin Cavalier
83a6125d7e iprowifi4965: Fix for the Intel Centrino 6235.
The first change (universally disable ICT mode on Haiku) was my fault for
not properly carrying forward from the FreeBSD 9 driver, but the second change
(remove flag from _base_params) is indeed a bug in FreeBSD 11.

This device ID was not present in the FreeBSD 9 driver; we added it ourselves,
and somehow it "just worked." FreeBSD 11 tries to properly configure this device,
which nearly works, but somehow they also wound up with this flag in the base
parameters, which even the comment suspected was wrong.

Thanks to Humdinger for diligently trying all the strange code changes
I suggested to him over IRC. :)
2018-06-28 17:32:53 -04:00
Augustin Cavalier
9552ec8248 iprowifi3945: Sync with FreeBSD 11.1.
Tested and verified as working by cocobean. (The previous driver KDLed
on their hardware.)
2018-06-28 17:32:53 -04:00
Augustin Cavalier
dcf58b2783 freebsd11_network: Add mtx_sleep.
It is identical to msleep(), which is now "deprecated" in favor of it,
according to the FreeBSD manpages.
2018-06-28 17:32:53 -04:00
Jérôme Duval
d20630d0bc hda: remove a few ids from the quirks snoop list for intel.
should fix #14231. misread from the alsa quirk list.
2018-06-28 16:49:29 +02:00
waddlesplash
b93a8f398b Backgrounds: Fix GCC 4+ build. 2018-06-28 09:28:24 -04:00
Augustin Cavalier
97f9cb046c freebsd11 / iprowifi4965: GCC2 fixes. 2018-06-27 20:26:53 -04:00
Augustin Cavalier
8b4aff3eac freebsd11_network: Enable INVARIANTS at KDEBUG_LEVEL_2.
They were already enabled for the net80211 code (and thus all the Wi-Fi drivers)
unconditionally; now we enable them conditionally based on KDEBUG_LEVEL_2
for the freebsd11_network core code also.

Includes fixes to the build, since there were some issues with INVARIANTS otherwise.
2018-06-27 20:14:36 -04:00
Augustin Cavalier
a549026d25 freebsd11_network: Actually set numBytes instead of silently truncating it.
If numBytes was greater than MCLBYTES (presently 1 << 11 = 2048), then the data beyond
MCLBYTES would be silently discarded instead of being written. Now, we store the
result of the min_c in numBytes, so the caller knows how much was written.

I turn on the printf that's commented out here and found that in practice this
seems to never happen (it's larger than the ethernet limit), so it seems unlikely
to fix any "transmission mysteriously failed" bugs.

Also backported this to the FreeBSD 9 layer.
2018-06-27 20:14:36 -04:00
Augustin Cavalier
688153aaec iprowifi4965: Sync with FreeBSD 11.1.
Tested and verified as working on my Lenovo ThinkPad T61.
2018-06-27 20:14:36 -04:00
Augustin Cavalier
af8988cdb6 freebsd11_wlan: Adapt net80211 code for Haiku's usage.
Changes mostly ported from the FreeBSD 9 code, but some of it is new.
Hopefully in the future, this diff can be reused almost wholesale,
instead of having to re-create it as was done in past upgrades.
2018-06-27 20:14:36 -04:00
Augustin Cavalier
ace07f7051 freebsd11_wlan: Adapt _haiku module for FreeBSD 11.
Mostly just additions of new primitives and hook functions that are
relatively straightforward and mostly copied from FreeBSD. The one
notable set of changes is the ones relating to gDevices, as the hacks
we used previously to hide the base device are now no longer needed
(as the previous commit noted.)
2018-06-27 20:14:35 -04:00
Augustin Cavalier
2ed3d6d1b5 freebsd11_network: Remove IFT_IEEE80211 logic.
Previous versions of FreeBSD created a base ifp of type IFT_IEEE80211
in addition to the ifp created for each VAP. We ignored these, so that
the devices we displayed (/dev/.../0, etc.) were numbered properly.

FreeBSD 11 no longer does this and instead uses an ieee80211com as its base
type, so this logic is not needed.
2018-06-27 20:14:35 -04:00
Augustin Cavalier
83fee6c8b6 freebsd11_network: Even more changes for freebsd11_wlan.
The net80211 code now fully compiles with -Werror=implicit-function-declaration,
however, it is not yet fully patched for Haiku usage.
2018-06-27 20:14:35 -04:00
Humdinger
cbadcae1d0 Small string changes in HaikuDepot GUI
* Don't translate internally used names in BMenuBars.
* Use presentable strings for the title of BAlerts.
* Make the wording a bit less technical.
  Should the HaikuServer URL be part of the update/remove rating alert?

Change-Id: I0a984082eadbc5834ac6b8b2b1955e66098d1c8a
2018-06-27 22:54:40 +00:00
John Scipione
e79c33c93f BResources SetToImage docs: update variable name in retval (tiny) 2018-06-27 10:05:52 -07:00
Augustin Cavalier
69d3ef8233 AboutSystem: kPublicDomain is not presently used, #if 0 it out.
Fixes the build (sure, GCC, a static unused global constant is worth
throwing a warning over.)
2018-06-26 18:34:39 -04:00
Augustin Cavalier
5807f2981b AboutSystem: Copyright cleanups.
* netcat is now provided via a package and is not required by the
   'haiku' package
 * Display the full name of ACPICA and update copyright year
 * Update copyrights for libpng.
2018-06-26 18:20:14 -04:00
Augustin Cavalier
5ec8aa426a AboutSystem: Combine Intel Wi-Fi firmware credits.
The first two have the same license and are also now covered by
intellinuxwireless.org. The second two also share a license among
themselves, and also with following (not-yet-imported) firmware,
e.g. from idualwifi3160.
2018-06-26 17:50:56 -04:00
Augustin Cavalier
a7999984fc Remove last references to tcpdump.
It hasn't been in the Haiku repository or provided by the Haiku package
for over a year.
2018-06-26 17:39:06 -04:00
Augustin Cavalier
f81f6999ee Remove private vmware driver headers.
Not used since the VMware drivers were migrated out of the tree
a few years ago.
2018-06-26 17:23:23 -04:00
Niels Sascha Reedijk
f98e331cf5 Small spelling fixes. Reported by mazbrili through Pootle. Thanks! 2018-06-26 21:26:45 +02:00
David Murphy
3d86db178e Backgrounds preflet limited to 10 recent folders
Added recent folder limit as class member but
defaulted the value to 10.
Stopped using index to keep track of selected
path and folder menu item. Instead use BMessage to send
clicked folder path to the folder bg image loader.

Change-Id: I6b1809ff782db839ef43eb7169a7f6e77fb4ec70
Fixes #5026
2018-06-26 00:56:51 +00:00
Augustin Cavalier
abb59d7351 intel_extreme: Fix instances of user memory creation and access.
You still cannot boot to desktop under SMAP on intel_extreme, however,
as the agp_gart bus has not been patched properly. Doing so breaks the
intel_extreme accelerant, so more investigation is needed.
2018-06-24 23:52:09 -04:00
Augustin Cavalier
14ec6c8b23 intel_extreme: Remove some non-Haiku cases from device_ioctl. 2018-06-24 23:52:09 -04:00
Augustin Cavalier
b31cb92f29 3rdparty/qtcreator: Support for multiple directories in one project. 2018-06-24 23:52:09 -04:00
Augustin Cavalier
32b50a8831 configure: Add missing word-boundary marker to test invocation.
Fixes specifying a secondary cross-arch that is a substring of the first
(e.g. "x86_gcc2"+"x86".) Thanks to nielx for noticing!
2018-06-23 17:13:24 -04:00
Autocomitter
c2b58737a1 Update translations from Pootle 2018-06-23 19:16:38 +00:00
Augustin Cavalier
79dba05004 HaikuDepot: Fix a -Wuninitialized in server client code.
If result is not a success, then we use hasData without initializing it.
2018-06-21 22:06:27 -04:00
Augustin Cavalier
4215eb6003 Debugger: Fix some broken comparisons.
* Missing parentheses in integer comparison inversion
 * !=, not ! at the beginning of expression

Spotted by Clang.
2018-06-21 22:05:27 -04:00
Augustin Cavalier
582afd9a7f interface & app_server: Fix missing parentheses near ternary operators.
+ has greater operator precendence than ?, so we need parentheses when
using both in expressions. Both of these look like actual bugs.

Spotted by Clang.
2018-06-21 22:04:31 -04:00
Augustin Cavalier
b9491db99c ACPI: Remove useless if-test. 2018-06-21 22:02:46 -04:00
Augustin Cavalier
f4b42b518a drivers: Deduplify joystick_driver.h.
Now there is only the one copy in headers/private/device.
2018-06-21 18:46:30 -04:00
Augustin Cavalier
9b83a2a043 BJoystick: Fix fJoystickInfo initialization.
joystick_info contains BLists which initialize themselves upon new(),
and Clang warned (correctly) that using memset() overwites that, as well as
RTTI and other data that they contain. So instead, only memset the first
part of the struct, and then manually initialize the other members.

Fixes #14217.
2018-06-21 17:52:39 -04:00
Augustin Cavalier
09c7b1526f freebsd11_network: Fix MLEN/MHLEN macros after mbufq changes.
In 02cb8503d2, I added the m_next and
m_nextpkt structures to mbuf, as per FreeBSD's mbufq system that
FreeBSD 11.1's net80211 code uses. What I didn't realize (and
korli and PulkoMandy who reviewed my code didn't notice either)
is that the data fields in mbuf are sometimes dealt with through
these LEN macros, which were now incorrect after such changes.

This caused an out-of-bounds memory write for data above a certain
size that was attempting to be written into an mbuf that under the
old sizing would have been fine, but under this new sizing was invalid,
and this manifested itself as a KDL under the guarded_heap (#14207).
It possibly also manifested itself as a stack-smash with the new net80211
code (uncommitted on a local machine, and the reason I tried using
the guarded heap in the first place.)

Now we use FreeBSD 11's macros, which use offsetof instead of raw
integer math. This means that we can't specify the struct size in mbuf
as these structs are computed from mbuf's definition, and thus have
to rely on the allocator giving mbuf the correct size (as FreeBSD
does also.)
2018-06-20 21:26:21 -04:00
Augustin Cavalier
e4104854c3 if_dl: Increase size of sdl_data from 20 to 46 bytes.
FreeBSD's is presently 46 bytes. CID 1422869 warns that it can get overrun
in if_attach() in copying if_xname which is IF_NAMESIZE bytes (32).

This breaks ABI, but BeOS did not have sockaddr_dl, it is only a modern-GCC
ABI break. Since most applications assume that sockaddr_dl is variable-length
and is null-terminated, as well as not used very often, hopefully this will
require relatively few rebuilds.
2018-06-20 21:26:21 -04:00
Augustin Cavalier
2a3a847f82 HPGSTranslator: Remove from the tree.
Not included in the build and not referenced anywhere else. Now lives at
HaikuArchives.
2018-06-19 23:43:53 -04:00
Augustin Cavalier
0a23d1fb23 jam: Remove InstallOptionalHaikuImagePackage; unused following previous commit. 2018-06-19 23:15:34 -04:00
Augustin Cavalier
571def7114 WebPositive: Store default bookmarks in git instead of downloading them.
No functional change. Ideally we would create these via ResAttr like we do
the mail-providers, but these have attributes on their directories and not
just the files, so that will be slightly trickier, so for now just keep them
in their zip format.
2018-06-19 23:11:58 -04:00
Augustin Cavalier
9b326aa287 mail: Store mode flags by-value, not by-reference.
They are passed into the constructor by-value, and Clang warns that
we are taking the reference of a temporary.
2018-06-18 23:20:18 -04:00
Augustin Cavalier
a309b7c3a1 bin: Clang warning fixes.
* Functions that call exit() should return void
 * char* -> const char*
 * main returns int, not bool.
2018-06-18 23:18:34 -04:00
Augustin Cavalier
9b29611fb8 ACPI: Set handle to NULL.
There is a (probably non-viable) case where it might not get initialized
by the function and then potentially used, so set it to NULL to silence
Clang.
2018-06-18 23:17:38 -04:00
Augustin Cavalier
9216fc0178 More class/struct mixup fixes.
Spotted by Clang.
2018-06-18 23:16:50 -04:00
Augustin Cavalier
fe17f0df1f scsi: Use _res and not res in MK_ERROR.
Some users of MK_ERROR pass in parameters from a variable called "res",
which is obviously not what they want to do, as that will use this "res"
and not theirs.

Spotted by Clang.
2018-06-18 22:05:45 -04:00