Commit Graph

49387 Commits

Author SHA1 Message Date
Fredrik Holmqvist
9832d1f89a Use strict typing 2018-08-01 18:28:06 +02:00
Fredrik Holmqvist
004094b574 Bug found by unused-but-set-variable, entry should be updated
Verfied by DeadYak
2018-08-01 18:22:49 +02:00
Alexander von Gluck IV
605e7eaed3 arch: Cleanup a few typos. Sorry for spam.
Change-Id: Ic2fce841acdee8572005cf2a9710188d03d7cecd
2018-07-31 19:37:01 -05:00
Alexander von Gluck IV
9642f7705b arch: Cleanup of __ARM__ checks
* gcc 7.x defines __arm__ and __ARM__ (and others)
* clang defines __arm__ and __arm
* cleanup a few related ifdef vs if macros

Change-Id: I5da4bafac590f6fa3e10e543688001c2449f840d
2018-07-31 19:12:20 -05:00
Augustin Cavalier
26ae216d0e realtekwifi: Import from FreeBSD 11.1.
Untested, but requested by Anarchos.
2018-07-31 19:50:46 -04:00
Barrett17
2d93cf97c7 AdapterIO: Fix -Wtautological compare.
* B_MEDIA_SEEKABLE was once a flag with one bit set. Due
to the complexity of streaming mediums, I had to split
this flag into B_MEDIA_SEEK_BACKWARD and B_MEDIA_SEEK_FORWARD
and never noticed that this broke the flag check.

* Reported by Murai Takashi through gcc8.
2018-07-31 23:41:12 +02:00
Augustin Cavalier
5ad9670f39 intel_extreme, radeon_hd: Use bufferLength instead of B_FILE_NAME_LENGTH.
Thanks korli for the review!
2018-07-30 22:50:30 -04:00
JackBurton79
55557aa162 CURLOPT_XFERINFOFUNCTION is available since libcurl 7.32.0 only.
Since it's just cosmetic, allow compiling with older libcurl, too.
fixes build on RedHat/CentOS 7

Change-Id: I169ad84d15e61012d1d38a9b41af7eef81683bf7
2018-07-27 17:21:14 +00:00
Matej Horvat
08021a3beb fat: correctly read lowercase 8.3 filenames
Historically, FAT stored filenames as uppercase. Modern windows versions
will however be case-preserving. As a special case, all-uppercase files
from old FAT filesystems will be converted to all-lowercase. There are
two flags (one for filename and one for extension) indicating that this
should be done. We did not make the distinction between these two flags
when reading a filename.

We still don't set the flags properly when writing files, but we always
provide a long file name (even if the name would fit in the 8.3 pattern
for a short one, so when reading back our own entries, we should always
use the long filename and be safe.

Change-Id: I1618a5be22705de3a06534442b62074445069764
2018-07-26 16:28:31 +00:00
David Murphy
e5c4ce4f67 HaikuDepot: Fix package list icon size for regular and featured views
Fixes #13399
Change-Id: I9a372d467e2056c6985fdc43b4629aa8fecd7535
2018-07-26 16:28:13 +00:00
John Scipione
fb7812fab0 BWindow: default Zoom() maximizes window when shift held down
In hrev51623 the default BWindow::Zoom() method was changed to respect
Deskbar, that is to say that the Window will zoom to screen area minus
the area taken up by Deskbar.

Some have complained that they miss the old maximize to full screen
frame behavior. This commit updates the default BWindow::Zoom() method
so that pressing Shift+zoom will maximize the window ignoring Deskbar,
the window will resize itself to take up the entire screen frame.

Note that if you override Zoom() in your app window then shift+zoom
will no longer work, this trick only works for apps which use the
default BWindow::Zoom() method.

Change-Id: Ic9f8fcb54f58663663db737103f6a7b42171ef46
2018-07-25 02:33:30 +00:00
Augustin Cavalier
0fe68ab92c scsi_disk: Fix -Wdefined-but-not-used. 2018-07-23 21:46:20 -04:00
Augustin Cavalier
ca11520f4a radeon_hd: Fixes for SMAP.
Only partially "tested", but I've audited this code pretty thoroughly, and
it seems the accelerant uses clone_area instead of direct pointer accesses
in all the correct places, so this should work.
2018-07-23 21:00:16 -04:00
Augustin Cavalier
f2dac2f1f1 scsi_disk: Disable FSTRIM.
It is known to destroy data on such devices (see #10336). But it seems to
work on ramdisk devices, so only disable it here, not for everything.
2018-07-23 20:59:05 -04:00
Murai Takashi
9f9afda5ce Mediaconverter: Suppress warnings
Use media_format.Clear() to suppress -Werror=class-memaccess
pointed out by gcc8.

Change-Id: I810cfac2db78914059bdd4ddb29d2eb0bccd9650
2018-07-23 23:58:43 +00:00
Jérôme Duval
34a10069f4 freebsd11_wlan: fix ieee80211_realign signature and the debug build. 2018-07-23 22:23:58 +02:00
Jérôme Duval
a27099f559 x86_64/x86_gcc2: don't depend on libgcc_s, libstdc++, libsupc++. 2018-07-23 20:57:59 +02:00
Hrishi Hiraskar
46bf100be4 Tracker: Fixed wrong error message in ContainerWindow.cpp 2018-07-22 18:28:39 +00:00
waddlesplash
fe66a314c8 Revert "BScrollBar: Add lines and dots knob styles to scroll bar"
This reverts commit ec1b18c58a.

This was not well enough reviewed, and it seems that at least some
consumers of the old API (e.g. WebPositive) need more than the new one provides.

Change-Id: Ie7ad1fc70dab889922424298661504b00f66d31d
2018-07-22 18:26:06 +00:00
waddlesplash
49c29fa933 Revert "Appearance Prefs: Add scroll bar knob setting"
This reverts commit 0988f80fed.

Change-Id: I60ec2b05a7c66e3c3c8f18dc821d6213934b0cfb
2018-07-22 18:26:06 +00:00
Jérôme Duval
7848bf798e hda: fix 64-bit warnings. 2018-07-22 10:05:37 +02:00
Jérôme Duval
4a062f23c6 glut: fix a warning on x86_64. 2018-07-21 12:22:01 +02:00
Jessica Hamilton
2ff22d6734 vesa: fix missing display_mode for UEFI.
* Broke use of non-standard modes in hrev51207. Code changed
  when merging framebuffer driver back into vesa driver...

Change-Id: I688ae627de23f37ffc8614d8f189593f8833ae3e
2018-07-20 17:08:38 +12:00
Adrien Destugues
83aa7d63a5 Add a test to show that #2509 is not reproductible. 2018-07-19 19:39:23 +02:00
Adrien Destugues
56a7cb3137 Fix build. 2018-07-19 19:28:19 +02:00
John Scipione
3123432674 BeDecorator: update close and zoom button gradients
... to better match BeOS.

Up until this point we have drawn buttons with a perfectly smooth
linear gradient that was nicely provided by Stippi. However, BeOS
used a more stylized gradient instead. This commit seeks to
reproduce this stylized gradient on BeDecorator adjusting itself
for larger button sizes.

Consolidate and correct colors. button, light1, light2, and
shadow1 colors are the same on close and zoom buttons. Zoom has
a lighter shadow2 than close button. Try to get as close to the
colors used on BeOS as possible. Added comments indicating the
colors used on BeOS in active and inactive states for future
reference.

light1 color stays grayscale if grayscale, otherwise skews
non-blue. This replicates how BeOS worked.

Fill with window tab color before drawing: lose B_TRANSPARENT.

Undraw the bottom left and top right corners of bitmaps in the
unpressed state. BeOS did not do this (usually), but it should
have as it closes the ring.

Define a bunch of bitmaps and use them as stencils to write into
ServerBitmaps 1 or 2 colors at a time.

Update close and zoom button down states. When the button is
pressed rotate bitmap by 180° by reading the source bitmap in
forwards while writing destination bitmap out backwards. This
allows the dark part to be draw in the top left while the light
parts are drawn in the bottom right. (opposite of unpressed)

Don't draw the parts of the big zoom square that are obscured by
the small square.

private _CreateTemporaryBitmap() method stolen from AlphaMask.cpp
to create temporary ServerBitmaps and zero them out. Store the
pointers on the BeDecorator class and then release them in the
destructor method when the class object is deleted.

Initialize the ServerBitmaps in the ctor and set fCStatus. On
failure set to B_NO_MEMORY and fallback to drawing a linear
gradiant. This will most likely never happen but just in case
it does we want to avoid crashing.

A few 80-line char fixes

Change-Id: Ic81837aa387f05b04dda3e1ff76fdf103c93f8e8
2018-07-19 14:01:51 +00:00
David Murphy
d8d6c65576 BListView: Restore selection to MouseDown and fix multi-select drag'n'drop
* Moves list item selection logic back to MouseDown from MouseUp to improve
  application compatibility and responsiveness
* Fixes multi-select drag and drop by not modifying the existing
  selection if a MouseDown event is on a selected item.

Fixes #9190, #14264, #14289
Change-Id: I58050b403dac985f98e03faa72de1ebc5d24f95b
2018-07-19 14:01:35 +00:00
Hrishi Hiraskar
bc8427c522 Tracker: Allow add-ons to dynamically extend popup menu.
An add-on may now add custom entries to the popup menu, in order
to provide more than one action.

Change-Id: Ib4726c0c1e70c59e3ba4d752df24b76cfee1c4a4
2018-07-19 14:00:48 +00:00
Augustin Cavalier
d632c685a0 Fix the build following previous changes. 2018-07-18 21:22:06 -04:00
Augustin Cavalier
53a371041c Remove the FreeBSD 9 compatibility layer.
Long live the FreeBSD 11 compatibility layer!
2018-07-18 20:11:35 -04:00
Augustin Cavalier
1e29bfd7d8 Update all remaining consumers of the FreeBSD compat headers. 2018-07-18 20:10:04 -04:00
Augustin Cavalier
fd893db8b1 broadcom43xx: Sync with FreeBSD 11.1.
And with that, the driver upgrades to FreeBSD 11.1 are complete!
2018-07-18 19:47:06 -04:00
Augustin Cavalier
3c42c902d9 Revert changes to BTextInput's text-rect calculation.
This reverts commit 11dee0444f.
This reverts commit 1641a0516d.
This reverts commit 484f64f315.

These changes break various edge-cases in BTextInput (e.g. typing off the end
of a long string, using the arrow keys to navigate while out-of-bounds),
and nobody has found any fixes for them in the nearly-a-year since they've
been instanted, so they are now being reverted.

Reopens #12608, #13796.
2018-07-18 19:31:02 -04:00
Andrew Lindesay
b3a7d91b2e HaikuDepot : Fix for List Algorithm
Fix a mistake in the binary search and insert
algorithms that was causing stability issues.

Fixes #14284
2018-07-18 23:05:58 +02:00
Augustin Cavalier
4aff6a8a2b wavelanwifi: Sync with FreeBSD 11.1.
Untested. Requires the previous commit.
2018-07-17 23:38:24 -04:00
Augustin Cavalier
d97a05f774 freebsd11_network: Completely rework the bus space access system.
Previously, we wrapped FreeBSD's accessors using our own in*/out* assembly
macros. Now, we skip that and just use FreeBSD's macros and assembly
directly. In the process, I've added some proper abstraction,
paving the way for the use of the FreeBSD layer on non-x86 platforms
(which will be sooner rather than later, I hope!).

This introduces some new functions required by some of the drivers
I was attempting to merge (wavelanwifi...), but as it also now
mirrors FreeBSD's bus access mechanisms exactly, it's possible
that some nuances lost before are now preserved. So this has
the potentiality to help with some of the stranger timeouts/failures
on devices that work just fine on FreeBSD.

Tested on VMware (pcnet), VirtualBox (pcnet, ipro1000), and
a T61 (iprowifi4965.)
2018-07-17 23:25:34 -04:00
Augustin Cavalier
f329739cdc marvell88w8363: Sync with FreeBSD 11.1.
Untested, but the changes are mostly adapations to the new KPIs.
2018-07-17 20:05:35 -04:00
Augustin Cavalier
5f64721b30 marvell88w8335: Sync with FreeBSD 11.1.
Untested, but the changes are mostly adaptations to the new KPIs.
2018-07-17 19:54:31 -04:00
Augustin Cavalier
28ca187801 ralinkwifi: Sync with FreeBSD 11.1.
Untested, but the changes are mostly adapations to the new KPIs.
2018-07-17 19:46:44 -04:00
Augustin Cavalier
7edcb06f62 tests/file_systems/bfs: Update tests Jamfiles to refer to the kernel BFS sources. 2018-07-17 19:17:41 -04:00
Augustin Cavalier
3664c8fa36 tests: Remove the "R5" BFS add-on, bfs_shell, and mkbfs.
Virtually untouched since 2007.
2018-07-17 18:27:43 -04:00
David Murphy
9ece492008 BMenu: BMenuBar submenus at screen edge moved onscreen instead of scrolling
Fixes #9093
Change-Id: I1322c0cd8ba4bbfddace037ed8a8ef666ebe7fe3
2018-07-17 21:21:40 +00:00
Alexander von Gluck IV
b19fc3b65d radeon_hd: Add RX Vega PCIID's per #13846. Testers wanted!
Change-Id: I6ab97c96a5e86725d92a973d3edca63508e388d5
2018-07-17 09:00:30 -05:00
David Murphy
e3f7fe948d BMenu: Submenu opening direction follows parent opening direction
Fixes #4859
Change-Id: I8e89afc3ad982d899428e3038fed354a78d04981
2018-07-17 04:12:21 +00:00
Augustin Cavalier
0da0829bbc HaikuDepot: Display the last copyright line instead of the first.
As Diver notes in #13006:
> I saw a few youtube videos with Haiku review where people were confused
> with package copyright year in HaikuDepot. They though this was when the
> package was last updated. HaikuDepot also only shows the very first line of
> copyright year, so if it's multiline (which is quite often) they see very
> old timestamps.

We should eventually display some sort of modified time as well as all
of the copyright lines, but at the very least, we can display the last line
instead of the first line, which usually is much newer than the first.
2018-07-16 23:00:23 -04:00
Augustin Cavalier
146a80c1cf HaikuDepot: Refactor & fix layout initialization in RatingItemView.
BLayoutBuilder is designed for single-shot use; i.e., a "one-liner"
of .AddLayout(), .Add(), and .End()s and no variable storage.
This is basically the only coherent way to use the class, as otherwise
it becomes unclear what state it's even in, and in the case of functions
like these with multiple branches for different options, that is doubly true.

It seems that in certain cases, the final SetInsets() after the End()
was winding up one before the "beginning" of the builder and thus attempting
to set the insets of NULL. Rather than analyze the function to determine
under what control-flow this occured (since it only happened for some
packages, and not others), I've opted here for the more systemic solution
to remove usage of BLayoutBuilder entirely, and just create straight BLayouts.

Fixes #14214.
2018-07-16 22:50:18 -04:00
Augustin Cavalier
4a88aa503a atheroswifi: Turn some apparently-harmless spam into debug-prints.
Both korli and KapiX report seeing this, but the driver works for them.

Fixes #14273.
2018-07-16 20:20:00 -04:00
Augustin Cavalier
c2dbeb9d31 Revert the cargo-culted changes to sata_request.
This reverts commit ffd36865cf.

They didn't fix anything, and on some systems it's reported that they
cause boot failures.

Fixes #14272.
2018-07-16 20:11:59 -04:00
Augustin Cavalier
dffc3e2353 freebsd11_wlan: Drain ageq before cleaning it up.
The comment above ieee80211_ageq_cleanup specifically notes that the queue
is assumed to be empty, and in order to make it so, ieee80211_ageq_drain
must be used.

Possibly helps with #3180, as this might be a source of mbuf leakage.
2018-07-16 20:00:17 -04:00
Augustin Cavalier
8959d55643 freebsd11_wlan: Sync previous ifdetach patch with FreeBSD.
It was upstreamed, albeit in a slightly different location and with
a different comment than I originally had.
2018-07-16 19:43:55 -04:00
John Scipione
0988f80fed Appearance Prefs: Add scroll bar knob setting
Check values before setting them in SetFromScrollBarInfo

Pin arrow and knob settings to the top so they are aligned
Adjust vertical spacing on single/double to match knob style height

Only draw arrows on single/double FakeScrollBar

Change-Id: I6be89f86181a87808ba5201caf88a33c4414d4c8
2018-07-16 16:11:46 +00:00
John Scipione
ec1b18c58a BScrollBar: Add lines and dots knob styles to scroll bar
Fixes #9137

Move scroll bar drawing into HaikuControlLook

Added B_SCROLLABLE flag to BControlLook

Update FakeScrollBar in Appearance to also draw using HaikuControlLook.

Focus works on scroll bars again, used by FakeScrollBar... and probably
nowhere else.

Added private _ScrollingEnabled() convenience method to BScrollBar and
use it in a few places making.

Create ScrollBarPrivate.h header to share a couple of scroll bar related
enums with HaikuControlLook that come from BeOS Scroll Bar prefs.

Stuff arrow_direction enum into BScrollBar::Private as it has been
succeeded by a similar enum already present in BControlLook and is only
around now for BScrollBar::Private::DrawScrollBarButton.

Change-Id: Idc31ee41de091ba45ded2f0315a004af00143803
2018-07-16 16:11:46 +00:00
Janus
70f1070b6f BColumnListView: BSizeColumn sort with big files works as expected
- Use off_t to compute the difference
- Fixes #14279

Change-Id: I253f16bb75501904ff59ac603a4680c66cfec33f
2018-07-16 16:09:36 +00:00
Augustin Cavalier
562ec5674f freebsd11_network: Sync queue.h with FreeBSD 11.1.
Includes some actual bugfixes, from reading the FreeBSD commit logs.
2018-07-15 22:07:09 -04:00
Janus
a5167229e1 Shortcuts: save columns information
- Clean up useless code
- Remove horizontal scrollbar
- Fixes #14278

Change-Id: I7edcb998bfca4b90d02f949b6e7979bcdbcc3cbb
2018-07-15 00:27:48 +02:00
Janus
8d6561d6fc Shortcuts: Use ALT-R for "Revert to saved"
- Fixes #14275

Change-Id: I2ca692e277c130fcee5edd202976ab748d811d7b
2018-07-14 21:53:16 +00:00
Augustin Cavalier
40cab5860d radeon_hd: Disable non-working chipsets.
Fixes #12026.
2018-07-14 17:36:25 -04:00
Augustin Cavalier
a16e3a0b37 freebsd11_wlan: Disable another spammy information print.
Hopefully helps with #14270.
2018-07-14 14:08:25 -04:00
Augustin Cavalier
1a9f01e8ed iprowifi2100: Sync with FreeBSD 11.1.
Untested, but mostly just changes to adapt to the new net80211 stack.
2018-07-14 14:08:25 -04:00
Augustin Cavalier
71bcccaeee ipw2100: Remove.
Long since superseded by the iprowifi2100 driver.
2018-07-14 14:08:25 -04:00
Augustin Cavalier
cb4ca78fbf freebsd11_wlan: Disable a spammy information print.
On some atheroswifi systems, it apparently prints every 100ms.
Hopefully helps with #14270.
2018-07-13 18:31:41 -04:00
John Scipione
71c7f40521 app_server: change the default scrollbar knob to none
Change-Id: Iea13ebe6918f5583c3a4ce10414a54f06c51efe6
2018-07-13 00:21:52 +00:00
David Murphy
e4433ad0fa BMenu: Fix crash and keyboard navigation on 'recent items' menus
* Prevents crash mentioned in Trac, but also enables keyboard navigation
  to 'recent items' menus such as "Open files..." in MediaPlayer and DiskProbe
* Check selected menu and submenu exist in menu tracking thread before accessing
* Update BMenu::AttachedToWindow to pass in keydown param to _AddDynamicItems

Fixes #9251
Change-Id: I3031b8e9c1b9dd4ef1187c5a6b8ab7925e3496d2
2018-07-13 00:16:58 +00:00
Augustin Cavalier
e042d58907 atheroswifi: Add AR9300 HAL.
Not really based on KapiX's patch (I looked at his Jamfile changes, but
did the rest of it myself.)

Besides the usual GCC2 (C89) fixes, this commit also changes FreeBSD's code
in removing two of the _reg_map_macro headers and adding only the relevant
portions to a post-preprocessed version of the non _macro files. This spares
us importing 7 MB (!) of headers.

KapiX confirmed his patch as working; hopefully I didn't break anything
in this import.
2018-07-12 20:07:33 -04:00
Augustin Cavalier
3142fb6996 scheduler: Fix setting priorities following the penalty cancellation changes.
Before hrev46809, the "thread->priority = priority" line was below this
check, and so all was well. But that commit moved the line to its present
location, which means ever since then, the following code which updates
CPU entries, scheduler listeners, etc. has never been run.

On my VMware instance (which is probably pretty affected by the host system
and thus not the greatest performance test), "time jam -j2 HaikuDepot" decreased
from 46.0s real to 43.3s real, 52.3s user to 48.1s user, 12.1s sys to 12.2s sys.
So this seems to make some sort of impact.

Spotted by Fishpond in #10454 and confirmed by korli, but somehow neither of
them followed up on that in the 4.5 years since...
2018-07-11 21:53:44 -04:00
Augustin Cavalier
a052f4807f atheroswifi: Sync with FreeBSD 11.1.
Thanks to khaled and return0e for testing!
2018-07-11 19:32:38 -04:00
Augustin Cavalier
09ddf9b9f3 freebsd11_network: Properly implement CALLOUT_RETURNUNLOCKED.
Fixes a double-lock situation in the Atheros driver. We really should
implement FreeBSD's MTX_SPIN instead of relying on cpu_status here...
2018-07-11 19:03:27 -04:00
Julien Lepiller
3248de3de4 Mediaplayer: remember position and volume
Change-Id: I43fa7cbcedd39c39e4b136e9e1f9bb34bf3eb570
2018-07-11 17:37:56 +02:00
Augustin Cavalier
dd9cb9cdc9 freebsd11_network: Check for NULL in bus_teardown_intr.
Should help with #14235.
2018-07-10 23:22:37 -04:00
Augustin Cavalier
ecdc1bc8e7 freebsd11_wlan: Add missing mtx_destroy of the ic_list_mtx. 2018-07-10 18:41:05 -04:00
Augustin Cavalier
1a35344427 freebsd11_network: Only start_wlan if FBSD_WLAN_FEATURE is required.
Fixes #8634.
2018-07-10 18:40:21 -04:00
Augustin Cavalier
77cf476567 iprowifi3945: Disable hardware AES.
Recommended by the FreeBSD developers as "possibly broken." Hopefully
helps with #14260.
2018-07-10 18:33:19 -04:00
Augustin Cavalier
e131a159c3 iprowifi2200: Sync with FreeBSD 11.1.
Untested, but the changes are relatively minimal (mostly adapations
to the new FreeBSD KPIs), and ttcoder recently opened a ticket (#14258)
about it, so he can test.
2018-07-10 18:28:02 -04:00
Augustin Cavalier
e6f6c1b463 freebsd11_wlan: Don't try to ifdetach if we never ifattached.
The FreeBSD developers say that there are "lots of bugs around driver attach
failures," and this looks like one of them.

Hopefully helps with #12035.
2018-07-10 17:57:01 -04:00
Augustin Cavalier
de6ea5f43f vfs: Move volume->ops NULL check to just after call to mount().
As Rene pointed out on the mailing list, if this is NULL after the file system
mount call occurs, then something has gone very wrong and we should treat it
as an error.
2018-07-10 17:46:59 -04:00
Augustin Cavalier
ffd36865cf sata_request: Cargo-cult some behaviors from FreeBSD.
See 13778#comment:3 for information on FreeBSD behaviors.

I didn't manage to locate where the specification talks about this
(but my specification-fu is rather poor), and it didn't fix the check_sense
syslog spamming on my machine.

But it seems to continue to function as before on my hardware as well as
VirtualBox and VMware, so perhaps it might fix something else.

Signed-off-by: Alexander von Gluck IV <kallisti5@unixzen.com>
2018-07-10 17:43:14 -04:00
John Scipione
e88a89e676 Appearance Prefs: drag and drop between ColorWhichItems
Fixes final piece of #8618

Already added support for list items to drag colors out and you can
drag and drop between the list items and preview. but, what was
missing was drag and drop between list items. Updated
ColorWhichListItem to also accept color drops through their
parent ColorWhichListView.

Also included some related style fixes, use B_RGB_COLOR_TYPE
constant in place of (type_code)'RGBC'. 80-char limit fixes.

Simplify similar code in ColorPreview class to parse out rgb_color
from message.

ColorPreview passes dropped color along to APRView

APRView no longer accepts color drops, this is handled by ListView
and ColorPreview now.

Consolidated "RGBColor" and "which" message name strings into
constants defined in defs.h.

Change-Id: I88ec2a4ffe077620ec4cc3b032196cbff0f09615
2018-07-10 21:20:09 +00:00
Murai Takashi
5d898e77d2 Media addon server: Suppress warnings
Use media_format.Clear() to suppress -Werror=class-memaccess
pointed out by gcc8.

Change-Id: Ib75ee4cb7aa8018af25dd6bdcf79b4dd7c14d240
2018-07-10 21:19:35 +00:00
Augustin Cavalier
12552deffc freebsd11_network: Use FreeBSD's usbdevs file.
Since eventually FreeBSD drivers will be using it, this makes more sense.
Adapt the pegasus driver to it (there's all of one ID out of some multiple
dozen that isn't in the file...)
2018-07-09 23:11:00 -04:00
Augustin Cavalier
9fcd8dadfe freebsd11_network: Adopt the generation of usbdevs.h.
The only thing using it at present is the "pegasus" driver, so it
already doesn't make a lot of sense to keep it in src/apps/devices.
Since in the future it will be used by FreeBSD USB network drivers,
it makes sense for the FreeBSD compat layer to adopt it.

Also some related cleanup to the awk files -- they are now stored
in a "tools" subdirectory, which is more similar to where FreeBSD does it.
We are also now using FreeBSD's usbdevs2h.awk instead of NetBSD's,
as this seems to fit with the overall schema.
2018-07-09 23:09:21 -04:00
Augustin Cavalier
131c64ad4a vfs: Add missing NULL check of volume->ops.
I got a reproducible KDL that upon close inspection seems to have been
a NULL dereference of this, thanks to GCC's mix-source-and-assembly
functionality.

Unfortunately, I deleted my mount_server settings before I fully understood
what was going on, and afterwards it no longer reproduced, so it seems to
have been related to that. I'm confident enough this is the correct fix to
commit it anyway.
2018-07-09 21:08:57 -04:00
Augustin Cavalier
4c43ed243f freebsd11_network: Don't panic on bus_describe_intr. 2018-07-08 15:46:01 -04:00
Jérôme Duval
de2ba86e5e ntfs: gcc2 build fixes. 2018-07-08 19:29:31 +02:00
Jérôme Duval
65e832b71a exfat: fix warning. 2018-07-08 19:19:18 +02:00
Jérôme Duval
d04d6d36d1 bindfs: fix warnings on x86_64. 2018-07-08 19:18:57 +02:00
Jérôme Duval
30be8412d9 ntfs: add comments for NULL interface functions. 2018-07-08 19:04:22 +02:00
Jérôme Duval
a2a8608d32 ntfs: fix signature of fs_mount(). 2018-07-08 19:04:22 +02:00
Jérôme Duval
6ad86087a6 ntfs: convert attributes.* to unix endlines. 2018-07-08 19:04:21 +02:00
Jérôme Duval
c6ee40d2a1 ntfs: attributes read() and write() now pass a kernel buffer to libntfs.
same as f8d3a9ee49 for attributes.
2018-07-08 19:04:06 +02:00
Jérôme Duval
f8d3a9ee49 ntfs: read() and write() now pass a kernel buffer to libntfs.
when a user buffer is provided, we now pass a 128KB kernel buffer
to libntfs. The old loop in case of partial buffer read/write
was useless as ntfs_attr_pread() and ntfs_attr_pwrite() were
provided the same buffer. The new loop fills/dumps the user buffer
from/to the kernel buffer.
when a kernel buffer is provided, it is passed to libntfs, the new
loop exits after one cycle.
2018-07-08 19:02:37 +02:00
Augustin Cavalier
b0e0298370 bluetooth: Remove non-Haiku target platforms logic. 2018-07-07 17:04:19 -04:00
Augustin Cavalier
cf5cc3958d freebsd11_network: Additions for atheroswifi. 2018-07-07 14:24:06 -04:00
Augustin Cavalier
6c9b5f2292 aironetwifi: Sync with FreeBSD 11.1.
Untested; but the changes are relatively minimal.
2018-07-07 14:24:05 -04:00
Augustin Cavalier
76218ef1ca freebsd11_network: Add bus_alloc_resource_anywhere. 2018-07-07 14:24:04 -04:00
Jérôme Duval
208c323649 real_time_clock: fix _user_get_timezone() after 6ad3d25212
6ad3d25212 changed the timezoneOffset type from
time_t to int32 without adjusting the user_memcpy size. Harmless as the
function is hardly used with a non-null argument.
2018-07-07 16:07:39 +02:00
Augustin Cavalier
1b98805383 freebsd11_network: Restore the old mbuf member access mechanism.
This time with a comment noting that they work around a GCC2 compiler bug,
so some poor soul doesn't make the same mistake I did. Fixes the GCC2 KDLs
caused by my previous commits.
2018-07-06 18:28:18 -04:00
Augustin Cavalier
8101468dbf jmicron2x0: Sync with FreeBSD 11.1.
Same Jamfile cleanups as previous commits.

This completes the upgrade of wired ethernet drivers to 11.1! :D
2018-07-06 18:28:17 -04:00
Augustin Cavalier
081fecc2f1 dec21xxx: Sync with FreeBSD 11.1.
Same Jamfile cleanups as in previous commits.
2018-07-06 18:28:17 -04:00
Jérôme Duval
defd975ae2 Update libroot stubs. 2018-07-06 18:59:36 +02:00
Augustin Cavalier
ac555254d4 idualwifi7260: GCC2 fixes (again.) 2018-07-06 11:38:18 -04:00
Augustin Cavalier
4cc829dc65 freebsd11_network: Synchronize fbsd_uipc_mbuf with FreeBSD 11.
Includes changes to the mbuf struct to more closely mirror FreeBSD 11.
Tested with the idualwifi7260 driver.
2018-07-06 10:58:45 -04:00
Augustin Cavalier
5af0299e37 freebsd11_network: Implement m_ext reference-counting and M_NOFREE.
Some FreeBSD developers report that this is required for HT mode, which
might explain why it's so broken on Haiku. I was also told the iwm driver
requires it for multi-frame RX, but as per the previous commit it still
KDLs even with it.

This commit also includes a refactor of the mbuf header implementation,
which now more closely mirrors FreeBSD's.
2018-07-06 10:32:45 -04:00
Augustin Cavalier
1431b61885 idualwifi7260: Properly enable the SINGLE_FRAME flag.
I did this correctly in the original commit, but then inverted the logic
in my C89 fixes commit by mistake ... whoops.

It seems to cause double-frees even with mbuf refcounting (though they do
occur later on), so leave it fully disabled for now.
2018-07-06 10:30:52 -04:00
Augustin Cavalier
ac06bf48c4 freebsd11_network: Combine Unit.cpp and unit.c into unit.cpp.
There's a number of these "C++ wrappers for C code" wrappers in the
freebsd_network compat layer, and there don't seem to be very many
good reasons to use them. We can just as well declare these C++ functions
with C linkage so they can be used from C code directly. So, time to
start cleaning this up.
2018-07-05 22:22:38 -04:00
Augustin Cavalier
49da1d2e3b crypt: Use int8 instead of int. 2018-07-05 22:04:35 -04:00
Augustin Cavalier
61e7a6b1f9 3com: Sync with FreeBSD 11.1.
No functional changes to the actual driver, it seems.
2018-07-05 17:13:11 -04:00
Andrew Lindesay
3b17d8dd7f HaikuDepot / PackageKit: Repositories 'Identifier' URL
Repositories are identified with a 'url' in the
remote 'repo.info' file.  There is also a
'base url' which is the URL locally with which
the system is able to access the repository
data on.  There is some confusion between these
two terms in the source.  This change aims to
separate the two out and consistently name them.
The settings for the repository locally also was
not storing these values and that has been fixed.
Debug info about the repositories also did not
display the two urls consistently and will now
also do so.  Finally, HaikuDepot now correlates
locally configured repositories with the data in
HaikuDepotServer using the identifier URL; this
makes the use of mirrors with HaikuDepot possible.

Fixes #13888
Change-Id: I66dfe589b05c24e1ab123a6945352e0f24b60bf1
2018-07-05 20:06:54 +00:00
Augustin Cavalier
a00c8c4491 freebsd11_network: Add another missing NULL check to taskqueue_free.
Also add missing \ns to the new printfs.
2018-07-05 15:46:02 -04:00
Murai Takashi
c7eabc40dc JPEGTranslator: 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: I3e2a98802ddb379890aefaf8c3f0efb1cd347188
2018-07-05 13:12:56 +00:00
John Scipione
e2d19ae5b7 BListView: do not modify selection on MouseUp if drag & drop
bug seems to have been introduced only recently in hrev52062
2018-07-04 21:55:35 -07:00
Augustin Cavalier
4e5f9d9753 idualwifi7260: C89 fixes to appease GCC2. 2018-07-04 21:50:14 -04:00
Augustin Cavalier
e89c61736e drivers/network/wlan: Import idualwifi7260 from FreeBSD 11.2.
The lowest model number supported by this driver is "3160", but that's just
Intel's insanity: the 7260 was released the quarter before it. So following
our naming convention strictly, "7260" is the correct name for this driver.

The firmware situation for this one is also a little different. Unlike past
instances where Intel has released mostly nonsubstantial firmware updates,
allowing us to just copy a recent-ish version from the iwlwifi archives,
the firmware is more closely tied to the driver in this series. As a result,
some of this firmware is not even used by Linux yet (they're a few versions
behind it seems), so the firmware packages included here come from FreeBSD.

One major hardware feature - RX of multiple frames at a time - is disabled
in this commit, as it depends on mbuf reference-counting, according to the
FreeBSD developers I asked, which we do not implement yet. I'll hopefully
get to looking at that in the next few weeks.

And with that, I finally have WiFi on my primary laptop, my original reason
for setting out on this quest last year. This commit was pushed through it,
even :)
2018-07-04 20:46:32 -04:00
Augustin Cavalier
999fe6b3ea freebsd11_network: Additions for idualwifi7260. 2018-07-04 20:46:31 -04:00
Augustin Cavalier
02463a2c73 freebsd11_network: Handle NULL gracefully instead of faulting.
FreeBSD does not have these checks, but drivers seem to expect that they
can call these functions with NULL and not crash.

Fixes a number of boot-failure tickets (and makes it possible for me at least
to test drivers without rebooting from KDL every failure), though of course the
drivers themselves will still not work.
2018-07-04 20:46:31 -04:00
John Scipione
6fdf2dd2b3 Tracker: center text horizontally again
We alwasys draw text at the bottom of the calculated TextWidget
rect, that's why it needed to be centered to get the desired
placement. However, there is two places
2018-07-04 16:35:06 -07:00
John Scipione
6b9353b4a3 Tracker: Revert to previous CalcRectCommon bottom calc
... in list mode. Fixes #12997

This bug was introduced in hrev50528 along with new 32x32 icon size
in list mode. I'm not sure what I was thinking on this particular
line but reverting it seems to fix the problem and logically the
original code makes sense.
2018-07-04 14:08:38 -07:00
Andrew Lindesay
cd417b96c9 HaikuDepot: Trace Logging of RPC Payloads
Changes the trace logging so that JSON-RPC payloads
are included in the log stream.  Also fixes a
memory-leak in the JSON-RPC client.

Change-Id: Ic19c64869acc525232a60ac2fd814a71bfdafdc8
2018-07-04 13:27:42 +00:00
John Scipione
1dd1976fba Deskbar: update time width based on Deskbar orientation.
Fixes #8641

To fix this bug first I had to fix a long-standing todo:
TODO: SetOrientation never gets called, fix that when in vertical mode,
we want to limit the width so that it can't overlap the bevels in the
parent view.

I made TBarView a friend class of TReplicantTray and called
fReplicantTray->fTime->SetOrientation() when switching between
horizontal and vertical mode. I could have added a setter method
instead but I didn't feel like it was worth it.

SetOrientation calls ResizedToPreferred which calls GetPreferredSize,
which resizes the text width, then it calls CalculateTextPlacement
which places the time string correctly.

Removed GetCurrentTime invocation from GetPreferredSize since that
happens in Update already. Was added in
573f748c5f originally.

Also need to call SetOrientation in TReplicantTray::AttachedToWindow
just after creating the TTime object in order for it to resize the
time view correctly on startup in horizontal mode. It needs to know
that it is horizontal so that it will expand to fit longer than
default time string.
2018-07-04 12:31:23 +00:00
David Murphy
f5face4114 BListView: Fix drag n' drop in multi-select mode
Move list selection logic into MouseUp instead of MouseDown
Change-Id: I4e7c7f6636dabce130578777b5e1203d6695499a
Fixes #9190
2018-07-04 00:47:01 +00:00
Augustin Cavalier
382d022473 libroot: Use 'int' not 'char' in crypt code.
It seems 'char' is unsigned on ARM, so GCC errors on the -1s in here.
2018-07-03 19:08:33 -04:00
Augustin Cavalier
42080aceac DHCPClient: Tweaks to logging.
* "timeout" is in usecs, so / 1000 and say "msecs" not "secs"
 *  Debug-log messages that are not for us received while waiting for
    a message that is for us. Hopefully this will not flood the syslog
    (DHCP renegotiation is, after all, rare), and it might help diagnose
    some of the DHCP failures.
2018-07-03 16:14:22 -04:00
Augustin Cavalier
a7abbdae77 iprowifi4965: Add some more firmwares to the image.
Not sure why these were left out. Probably helps with #12407.
2018-07-03 15:40:54 -04:00
waddlesplash
980d7f22f9 package_infos: Update lib versions. 2018-07-03 00:12:51 -04:00
Augustin Cavalier
d1c51097eb Upgrade FFmpeg to 4.0.1 across the board (including GCC2.)
This was accomplished by adding some pretty nasty hacks to the FFmpeg recipe
so that we can compile it for the GCC2 ABI using GCC7. This works because
GCC's C ABI has not changed between GCC2 and GCC7.

As a consequence of this, pretty much all the longstanding issues of the
ancient-and-still-miscompiled FFmpeg 0.10 are now completely gone.

Fixes #5080, #8461, #12696, #12436, #13981 #13410, #13337.
Closes (possibly fixed earlier) #8605, #8511, #6984.
Probably fixes (couldn't test) #13989, #11974.
2018-07-02 22:21:27 -04:00
Augustin Cavalier
c6992970cd freebsd11_network: Fix alignment check and print more information on failure.
We don't care what the virtual address is aligned to, only what the physical
one is. This now matches what FreeBSD does here.
2018-07-02 22:16:11 -04:00
Augustin Cavalier
c9af3dafd5 freebsd11_network: INTR_FAST is no more.
I didn't figure out exactly when, but the docs from FreeBSD 8 reference it
as being not just deprecated, but already removed; and indeed no drivers
we have from either FreeBSD 9 or 11 use it. The intr_wrapper system is
used in its place.
2018-07-02 18:26:07 -04:00
Augustin Cavalier
1cbcf3e06b via_rhine: Sync with FreeBSD 11.1.
Untested, but the changes are minimal, and the FreeBSD 9 driver worked on
an old tower that I wasn't bothered to boot up just to test this. The new
driver uses an interrupt filter to boot, so we don't even need that glue
anymore.

Also make the build system logic closer to the other FreeBSD drivers.
2018-07-02 18:26:07 -04:00
Murai Takashi
12ed45b60f Media kit: Suppress -Werror=class-memaccess
* Add media_format::Clear(), media_format::Unflatten().
* Replace memset() with media_format::Clear()
* Replace memcpy() with media_format::Unflatten()

Fix #14156

Change-Id: I38ebc2de4915b954a15b6f4f6b40d016506910e5
2018-07-02 21:14:30 +00:00
Jérôme Duval
9e9fc9f1a3 ntfs: only prints a trace in case fs_mount failed. 2018-07-01 15:10:50 +02:00
Jérôme Duval
5bd8cf13c5 intel_extreme: use user_memcpy to write to user mapped memory.
* now boot successfully to desktop with SMAP enabled on intel_extreme.
* enforced 80 chars/line on two occasions.
2018-07-01 14:23:48 +02:00
Augustin Cavalier
aa033e3412 MediaConverter: Fix some "Looper must be locked" assert failure crashes.
Not sure how these cases were never hit before, but I ran into them
when testing MediaConverter...
2018-06-30 22:34:11 -04:00
Augustin Cavalier
9396b53f89 freebsd11_wlan: Add ieee80211_realign.
It is technically "used", but only in blocks that evaluate to false via
preprocessor macros, and so it was usually optimized out completely.
This is not the case for the debug build however, so the lack of it
broke that.
2018-06-30 22:20:32 -04:00
Augustin Cavalier
9269dd58fa freebsd11_network: Use B_PAGE_SIZE not PAGE_SIZE in param.h.
freebsd11_network has PAGE_SIZE defined, but not all of its users do;
so for their sake we should use B_PAGE_SIZE.
2018-06-30 22:19:31 -04:00
Augustin Cavalier
bd60686144 tracker_new_templates: It's not 2015 anymore. 2018-06-30 20:08:14 -04:00
Augustin Cavalier
6a138e1704 freebsd11_network: Enable previously-disabled uses of counter(9).
Tested and verified this doesn't break anything.
2018-06-30 12:39:19 -04:00
Augustin Cavalier
7a41fb9137 freebsd11_network: Implement counter(9) using atomics.
See inline comment.
2018-06-30 12:38:44 -04:00
Augustin Cavalier
dc26a66554 drivers/wlan: Remove ralink2860; unused since 2013.
korli patched the "ralinkwifi" driver to support 2860 in
af5a895fa4, and removed this one
from the image at the same time.
2018-06-30 11:42:34 -04:00
Augustin Cavalier
e4bc0a9658 AboutSystem: ACPICA is "Component Architecture" not "Common Architecture".
That's what I get for committing with my brain off...
2018-06-30 11:41:51 -04:00
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
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