Commit Graph

49940 Commits

Author SHA1 Message Date
Augustin Cavalier
59ecfa6cb6 netfs: Fix and enable on 64-bit. 2018-11-18 14:37:06 -05:00
Augustin Cavalier
f0d5e5b062 userlandfs: Fix the BeOS frontend on 64-bit. 2018-11-18 14:36:28 -05:00
Augustin Cavalier
966c60f355 BMetaData: Fix GCC7 build. 2018-11-18 13:04:10 -05:00
Zoltán Mizsei
9f2e5521fa Signature have to match in rdef and sources.
Change-Id: I4172585fab51e9d9640ae7a40b5b9c3a247fb841
Reviewed-on: https://review.haiku-os.org/711
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-11-18 17:45:24 +00:00
Niels Sascha Reedijk
e980073d22 Clarify desklink translatable
Change-Id: Ia36e44ae4c6fec37694712dd1388cd1abb867f31
Reviewed-on: https://review.haiku-os.org/712
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-11-18 17:44:13 +00:00
Peter Kosyh
a6a7e73f80 mail: revert ~IMAPProtocol
Waiting of worker threads in IMAPProtocol destructor introducred new deadlocks.

For example: fWorkerLock grabbed in destructor leads to deadlock with 
CheckSubscribedFoldersCommand (which grabs this lock with flock grabbed).

So, currently it should be reverted.

Change-Id: Ibc4b4f85300352e045d4ce72deb804e0e613f25c
Reviewed-on: https://review.haiku-os.org/714
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-11-18 17:43:45 +00:00
Barrett17
1f2ddf2fd0 Codec Kit: Initial BMetaData implementation 2018-11-18 16:57:12 +01:00
Barrett17
b4d8bbd540 Codec Kit: Move Managers to private headers
* Those classes are not ready for public consumption. Ideally,
I'd add a well designed BCodecRoster wrapping them. This is part
of the general cleanup I am doing to get the code in a good state
before going to finalize the design.
* I don't plan to reintroduce BMediaFile in the media2 API, and
I'd like to remove any (explicit) usage of entry_refs and things
like that.
* I plan to introduce BMetaData and BMediaFormat which is going
to be different than what we do now.
* We need to explicitly use the mime type when it's available and
it is another design consideration when CodecRoster will be introduced.
2018-11-18 13:15:35 +01:00
Barrett17
3fe994ba28 MediaExtractor: Move stream_info to private 2018-11-18 12:53:14 +01:00
Barrett17
121db87f5f Revert "codec_kit: Remove Perform"
This reverts commit a9ccd74af7.
2018-11-18 12:06:14 +01:00
Augustin Cavalier
041a1f3639 userlandfs: Only add kernel flags in RequestAllocator in _KERNEL_MODE.
Otherwise, create_area fails with "Invalid Argument." Should fix the
"empty directory in userlandfs mount" bug that has been appearing
since the cloneable-area fixes.

Change-Id: I26e73539a9f345e76b22a34a68fe4b49c63683c2
Reviewed-on: https://review.haiku-os.org/707
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-11-18 05:09:13 +00:00
Jérôme Duval
8c053e955e vfs: fail write_stat() on file descriptors opened read-only.
Change-Id: I20d586c606c47df6625cc9272f153250a5a621d6
Reviewed-on: https://review.haiku-os.org/706
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-11-18 00:04:26 +00:00
Augustin Cavalier
9cc0f06a01 kernel: Remove the B_KERNEL_AREA protection flag.
It is now no longer used.
2018-11-17 16:46:49 -05:00
Augustin Cavalier
04f1a9beae vm: B_EXECUTE_AREA should not imply B_KERNEL_EXECUTE_AREA.
Trying to execute user-mapped areas in kernel space should trigger
a fault with SMEP enabled anyway (and we have not seen any thus far.)
2018-11-17 15:24:59 -05:00
Augustin Cavalier
d12a2ff55c vm: Block userland from modifying any area owned by the kernel.
Previously this protection was possible via the opt-in B_KERNEL_AREA flag,
however, almost nothing used that, so in practice these protections were
rarely enforced.

Userland can still access kernel areas according to the protection flags
(and due to SMAP, these have been refined and reduced as appopriate)
and clone them (according to B_USER_CLONEABLE_AREA flag, which has
been required since August of this year), but they can no longer
resize them (something no in-tree application does on any shared area),
set protections (otherwise they could add B_USER_CLONEABLE_AREA...),
unmap them, or essentially do anything else besides get their
information (and even that we should restrict to uid 0, in the future.)

From my testing, this does not introduce any issues, and no applications
nor drivers should have been relying on the previous behavior (unlike
SMAP or the clone-area changes, which did affect applications.)
2018-11-17 15:11:12 -05:00
Augustin Cavalier
a54cdaa07a idualwifi7260: Fix a different instance of memset(NULL). 2018-11-17 14:57:50 -05:00
Augustin Cavalier
01304f19fd idualwifi7260: Don't memset NULL. 2018-11-17 14:05:14 -05:00
Barrett17
a9ccd74af7 codec_kit: Remove Perform
* Undocumented and apparently unuseful pattern.
2018-11-17 18:42:50 +01:00
Barrett17
9d90a8381d StreamerPlugin: Add ctor 2018-11-17 18:39:39 +01:00
Kacper Kasper
35dbbd990c ProcessController: fix replicant for 12 CPUs
* Slightly change the formula for bigger sizes (use real width).

Change-Id: I66204c2727f30e3f139b506174e287811c258fa9
Reviewed-on: https://review.haiku-os.org/704
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2018-11-17 16:30:45 +00:00
Peter Kosyh
a6a1266240 mail: IMAP fix deadlock when connection failed
fLocker must be released in IMAPConnectionWorker::_Worker() before WorkerQuit() call.

Change-Id: I1e622a711fa3349986560af1118b158696025844
Reviewed-on: https://review.haiku-os.org/705
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2018-11-17 16:26:35 +00:00
Adrien Destugues
a4ba432352 Fix line counting in StringView.cpp
- if fText is an empty string, we would start searching past its end,
  possibly leading to a crash (noticed this in HaikuDepot).
- if fText is NULL, BString would report a size of 0 lines, it makes
  more sense to report a size of 1 line.
2018-11-17 14:12:25 +01:00
Michael Lotz
d69baff8cc virtio_net: Align transfer buffers, check get_memory_map result.
The buffers were allocated with B_ANY_KERNEL_ADDRESS and the buffer plus
header block would produce uneven sizes. This lead to some buffers
crossing page boundaries. The call to get_memory_map() is only supplied
with a single entry, which in such a situation may not be enough if the
physical pages are not contiguous. Due to missing result checks this was
not noticed.

Use B_ANY_KERNEL_BLOCK_ADDRESS and align the size of the total buffer
to avoid such page boundary crossing.

Fixes randomly truncated frames in the receive path.
2018-11-17 00:34:49 +01:00
Michael Lotz
15a0bc24cc virtio_net: Use proper frame length in receive path.
Previously the frame length was set to the allocation size of the buffer
itself, which is constant. Use the length returned on dequeing instead,
which tells how much of the buffer was actually filled.

Fixes overly long frames that lead to various problems along the receive
path.
2018-11-17 00:34:49 +01:00
Michael Lotz
2f211cce6d virtio: Replace size return with usedLength in queue_dequeue.
The size was in fact the count of physical entries that were used. That
number must necessarily be the same as the number given when adding to
the queue, so that number isn't really interesting. Consequently none
of the users of that API made use of it.

Return the used length instead, which is the way virtio signals how much
valid data resides in the dequeued buffer. This is for example important
to know the frame length of incoming packets in virtio_net.
2018-11-17 00:34:49 +01:00
Michael Lotz
14b0498cfa arp: Trim the reply buffer to the filled length.
We reuse the incoming request buffer to send our reply. We did however
not trim that buffer to the length we actually filled out, allowing
any extraneous incoming data to remain in that buffer and be sent back.
2018-11-17 00:34:49 +01:00
Humdinger
1eb0122fc7 pkgman: a bit more detail on usage
I forgot that there are special usage texts for the individual
pkgman commands. Make that a bit clearer in the usage text now.

Change-Id: Ia6641b2aa20d03a67d9dedddabf3a1f34d324322
Reviewed-on: https://review.haiku-os.org/702
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-11-16 16:11:50 +00:00
Augustin Cavalier
a5297c5905 build: Add SYS:NAME attribute to all folders handled by Tracker.
Mail and Deskbar folders are still TODO.
2018-11-15 22:36:35 -05:00
Augustin Cavalier
795f1571b3 Move data/image_directories to src/data/directory_attrs.
These data files are used in the generation of build targets,
so moving them to src/data alongside the package_infos & etc.
makes more sense.

They don't seem to be activated properly though (I added some tracing
to try and figure out why they aren't used but haven't gotten to the
bottom of that yet.)
2018-11-15 21:20:24 -05:00
Augustin Cavalier
a4dcbfcef1 Mail: Detect URLs by parsing ahead instead of checking every character.
This is a *massive* performance improvement; some longer emails that
took 45+ seconds to load before now take < 1 second, at the cost
of a completely rewritten URL detector. This means some URLs that
were detected before (e.g. anything starting with "www", emails
without "mailto:", etc.) are now not detected, though support
for detecting them could be reinstated in the future.

Fixes #4816.
2018-11-15 20:21:35 -05:00
Murai Takashi
f54b080275 fwcontrol: Fix PVS 1655
Fix char pointer *nodestr was compared with the '\0' value.

Change-Id: Ie6b0beb8b94b35d6824ab205688ce1a54bcd6a74
Reviewed-on: https://review.haiku-os.org/688
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2018-11-15 19:14:19 +00:00
Murai Takashi
63757dbb24 TGATranslator: Fix PVS 2332-2337, 2341-2346
* Use new(std::nothrow) so that NULL check for allocated memory makes sense.
* Other new() without NULL check is replaced with new(std::nothrow).

Change-Id: Ida53be936d14ce63b3bc60442408ec5044df5344
Reviewed-on: https://review.haiku-os.org/699
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2018-11-15 08:22:48 +00:00
Peter Kosyh
e0dbea8a60 mail: use MAIL:status instead of deprecated MAIL:read to query new e-mails
Change-Id: I758cb2b4c3111a300500976d7711e93f9d838a0b
Reviewed-on: https://review.haiku-os.org/687
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-11-14 00:34:47 +00:00
Peter Kosyh
239566d908 mail: simpler query for new e-mails
Before this patch, the BEOS:type was used in query. But in Haiku
the BEOS:type index is not created by default. So, this feature
dis not work.

Change-Id: Ib57b528eb852d256b7e0b7d203659af01e077801
Reviewed-on: https://review.haiku-os.org/684
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2018-11-13 19:31:53 -05:00
Peter Kosyh
1f41c99ffa mail: IMAP inbound protocol destructor fix
This should fix crashes of mailer_daemon in IMAP workers.
This patch makes IMAPConnection destructor wait for all working threads to finish.
Also, do not call _Connect for QuitCommand (it speedups shutdown procedure).

Change-Id: Idffcc00d3459a96a85a8a073a343bcf4cd4984be
Reviewed-on: https://review.haiku-os.org/686
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-11-13 19:31:23 -05:00
Murai Takashi
71103e733c StyledEdit: Fix PVS 1167
Use new(std::nothrow) so that NULL check for allocated memory makes sense.

Change-Id: I6c0e66c63adda430686727a4085132c4e40c7530
Reviewed-on: https://review.haiku-os.org/692
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2018-11-13 19:58:08 +00:00
Murai Takashi
82bbd737a1 sis7018: Fix PVS 1617
Use new(std::nothrow) so that NULL check for allocated memory makes sense.

Change-Id: Iab5efa869b83f5a312a1eaf8851a9e99888ff075
Reviewed-on: https://review.haiku-os.org/691
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2018-11-13 19:58:08 +00:00
Murai Takashi
6c8b0b3724 PNGTranslator: Fix PVS 2237-2241
* Use new(std::nothrow) so that NULL check for allocated memory makes sense.
* Other new() without NULL check is replaced with new(std::nothrow).

Change-Id: I23df98e58ea1960463e86a75ff69d67855f59074
Reviewed-on: https://review.haiku-os.org/690
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2018-11-13 19:58:08 +00:00
Murai Takashi
99b0a7e0ed OpenSound: Fix PVS 2232, 2233
Use new(std::nothrow) so that NULL check for allocated memory
makes sense.

Change-Id: I690a796ac5a9a7a61440ccccf19f93fc6bf2d328
Reviewed-on: https://review.haiku-os.org/689
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2018-11-13 19:58:08 +00:00
Augustin Cavalier
05f730b0f8 More WriteAttr -> WriteAttrString cleanup across the tree.
Some of these were correct as they were ... but most weren't.
There are a variety of other correct ones I didn't change over yet
that someone else probably should (GCI task?).
2018-11-11 16:22:10 -05:00
Augustin Cavalier
5f5cc39c2c STXTTranslator: Fix truncated "be:encoding" attribute write.
Same issue as the mail_util fix.

Also while I'm here, alter behavior so that the Be-style attribute
gets overwritten with the Haiku-style one, instead of getting left
as is.

Should potentially help with #14674.
2018-11-11 15:58:45 -05:00
Peter Kosyh
398bb93961 mail: fixes of default notifier (reset)
This fixes POP3 notification messages.

Change-Id: Ic7d9c0bb23c4dc9814f6c4bade0aba367fa28db1
Reviewed-on: https://review.haiku-os.org/685
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-11-11 20:36:28 +00:00
Peter Kosyh
fea29e79c7 write_read_attr: fix truncated B_MAIL_ATTR_STATUS
This fix garbage attributes on e-mail messages on status changes.

Change-Id: I5293a0e71a1b84c04889fa3375488b0075aad12e
Reviewed-on: https://review.haiku-os.org/682
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2018-11-11 14:26:55 +00:00
Augustin Cavalier
23623eee9a registrar: Remove now-unused non-Haiku code. 2018-11-10 15:16:25 -05:00
Augustin Cavalier
387609c3be shortcuts: Remove #if __INTEL__.
This isn't true on x86_64 (so we were displaying the wrong key names there).
The actual names of the keys should probably be fetched from the selected
keyboard.
2018-11-10 15:02:04 -05:00
Augustin Cavalier
3bf15c7f86 shortcut_catcher: Remove non-Haiku code. 2018-11-10 15:01:45 -05:00
Augustin Cavalier
231ee3b8ad mail: Remove regex match limitation from the BeOS days.
It was still enabled on 32-bit x86...
2018-11-10 15:00:49 -05:00
Augustin Cavalier
68d50ca8a3 mail_daemon: Replace own_image with the one from PowerStatus.
We probably should make this a common function...

Fixes the mail status icon not appearing on x86_64, as __INTEL__ is
not defined there.
2018-11-10 14:28:26 -05:00
Augustin Cavalier
494a6e4e8e kernel/vm: Remove hacky stack dumper from vm_page_fault.
As the TODO said, we now have good userland debugging facilities, so
this isn't needed (and has been if 0'd out for almost a decade now.)
The dprintf on page faults may still be useful under rare circumstances,
but we already have a "TRACE_FAULTS" configuration for this file,
so guard it behind that.

Fixes part of #14360.
2018-11-10 14:12:18 -05:00
Adrien Destugues
c4bb4fbb7e Devices: remove "not implemented" driver line
This just confuses users. Let's re-add it when we have implemented it.
2018-11-09 20:30:39 +01:00
Adrien Destugues
0ca6ba69fa screenmode: remove leftover debug print. 2018-11-09 20:29:35 +01:00
Adrien Destugues
4c8208af52 ffmpeg: fix crash at end of video stream
Mixing new and old style decoding APIs won't work. And we were still
using the old API for managing the end of videos.

Change-Id: Ic194ab98721455658ecefde4f951c3f1e43ae1be
Reviewed-on: https://review.haiku-os.org/679
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-11-08 20:09:08 +00:00
Peter Kosyh
2e8be594e7 mail_daemon: IMAPConnectionWorker missing ::WorkerQuit() on errors
This fixes some crashes.

In _Worker thread on connect or process errors fOwner.WorkerQuit(this) was not called, leaving destroyed thread object in fWorkerMap and fWorkers.

Moreover, on connection problem the imap mailboxes was never checked on next planned sync because of non empty fWorkers.

Change-Id: I55ce6474b655fad5ddd8024225fc8f633bc35c48
Reviewed-on: https://review.haiku-os.org/678
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-11-08 14:26:03 +00:00
waddlesplash
2cf9765df8 Revert "add-ons/mail_daemon: IMAP: limit UIDs in UID FETCH"
This reverts commit ed08b22dec.

See discussion on the commits mailing list (and on IRC.)
2018-11-07 19:03:30 -05:00
Peter Kosyh
3a469b95be mail_daemon: IMAP remove trailing space in flags list
This fixes STORE FLAGS request and gmail

Change-Id: I28c507244788e2e56e46bef428a465bd8d798d51
Reviewed-on: https://review.haiku-os.org/673
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-11-06 00:06:38 +00:00
Andrew Lindesay
4b30bf30b8 HaikuDepot : Handling for NULL Identity URLs on Repository Sources
Change-Id: I0f0094cf2ed38750dca4783b41f061977d833cea
Reviewed-on: https://review.haiku-os.org/677
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-11-06 00:06:10 +00:00
Axel Dörfler
419bc0a2ca Deskbar: Made the leaf scale with the font size
* It's now a vector icon as well.
* Vertical mode doesn't look that good anymore with higher font sizes,
  but I didn't understand how to do it properly.

Change-Id: I0eed0e2873b270c349dfd3af117cfcb751e590a1
Reviewed-on: https://review.haiku-os.org/671
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2018-11-06 00:05:42 +00:00
Axel Dörfler
b791e997bf Tracker: Improved NavIcon spacing
* The spacing between icon and text now scales with the font size, too.
2018-11-05 22:41:32 +00:00
Axel Dörfler
a55e9f5235 Tracker: NavMenu icons scale with font size
* Moved icon size computation into separate utility function.
2018-11-05 22:20:55 +00:00
Axel Dörfler
fa584266d5 Tracker: Simplified test; fColumnList cannot be NULL 2018-11-05 22:20:55 +00:00
Peter Kosyh
f2d9de4577 mail_daemon: IMAP Settings.h DeleteRemoteWhenLocal forgotten prototype
this fixes broken build, sorry

Change-Id: I2d6dd152739ae1d7aefdf0c98732b9f302b90025
Reviewed-on: https://review.haiku-os.org/676
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-11-05 19:57:22 +00:00
Kacper Kasper
35a074e071 BStringView: fix #14680 2018-11-05 19:41:38 +01:00
Peter Kosyh
eef12cec97 mail_daemon: IMAP delete messages on the server only when delete_remote_when_local setting is set
Change-Id: I88fcc7a185cede080af7c3b85f9466a02f895809
Reviewed-on: https://review.haiku-os.org/674
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2018-11-05 17:30:09 +00:00
Olivier Coursière
7c96721b51 Usability improvements in StartTeamWindow
- Enlarge the window's width so a larger part of the path will fit in the TextBox.

- Apply the existing path to the BFilePanel before browsing. It improve
usability when you paste a path or type a new one in the TextBox
then click on the browse button to choose the application
or fine tune the directory.

Please not that it is a best effort feature : if the file or the directory does
not exist, the BFilePanel will fallback to the old behavior :
showing the previously selected file/directory in the session
(or home directory).

Change-Id: I504a1ec72f9f7a236e2e37039961fddc58218eae
Reviewed-on: https://review.haiku-os.org/672
Reviewed-by: Rene Gollent <rene@gollent.com>
2018-11-05 00:01:36 +00:00
Augustin Cavalier
6ccc2b9f89 Tracker: Add some missing NULL checks.
Fixes #14685.
2018-11-04 15:38:21 -05:00
Axel Dörfler
efafab643c Deskbar: Resizable tray
* Adds max width and height arguments to
  instantiate_deskbar_(item|entry).
* Old applications just stay with a 16x16 scaled icon, though.
* All used apps within the repository are converted to the new call
  besides the input_server input method icon (that will need further
  API changes in the input_server).

Change-Id: I29cc439396917be2c24135888459d31364997dff
Reviewed-on: https://review.haiku-os.org/656
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-11-04 19:00:49 +00:00
Peter Kosyh
1ad1c1c87b mail_daemon: ESMTP auth fix (250 AUTH reply)
See RFC 5231 (https://tools.ietf.org/html/rfc5321): "Following the normal
syntax for multiline replies, these keywords follow the code (250) and a
hyphen for all but the last line..."

Change-Id: I1ee533a332d1e18ffddd4ad1520d14f4013b739e
Reviewed-on: https://review.haiku-os.org/670
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-11-04 18:57:28 +00:00
Axel Dörfler
b5ecd7c203 DirectWindowStars: Fixed 64-bit build 2018-11-04 18:37:55 +00:00
Axel Dörfler
0f03d737b9 Tracker: List view icons now grow with font size
* This also removes the mini/large icon mode for list views; it's now
  simply always matching your font size.

Change-Id: Ieedd86cc3a50dd0f950d97bbd9839384d44f8bd3
Reviewed-on: https://review.haiku-os.org/662
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-11-04 17:36:50 +00:00
Peter Kosyh
65d8c2f34f mail_daemon: ErrorLogWindow fix forever ResizeTo
Change-Id: Ibd5721ff7c9bfd7fcee30438b61a63720f1a6206
Reviewed-on: https://review.haiku-os.org/668
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-11-04 17:05:53 +00:00
Adrien Destugues
5e14319a11 ffmpeg: use new producer/consumer API for video decoding
This API allows us to send whole packets no matter how the video is
formatted, and get frames out as they are ready (sometimes multiple
frames per packets, which did not work well with the previous API).

Change-Id: I0bd7d4706e330bb11d87cb41e93cfc6995b4b3a5
Reviewed-on: https://review.haiku-os.org/665
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-11-04 17:04:06 +00:00
Adrien Destugues
ce402e82f2 ffmpeg: remove deprecated comment.
This field is deprecated.

Change-Id: I18c3b89ef7438c61b464aaf8bebc1484bf479d6b
Reviewed-on: https://review.haiku-os.org/664
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-11-04 17:03:13 +00:00
Adrien Destugues
9e2c056c27 ffmpeg: fix timestamp tracing
Use ffmpeg functions to format the timestamps.

Change-Id: Idd51feb22fc6c5a70e177604eb995ae2d8601cd4
Reviewed-on: https://review.haiku-os.org/663
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-11-04 17:03:13 +00:00
Augustin Cavalier
c87601b89a ps2: Fix Werrors. 2018-11-03 15:22:53 -04:00
Augustin Cavalier
4e1ffc1266 freebsd11_network: Add "return 0" to placate warning. 2018-11-03 15:22:30 -04:00
Axel Dörfler
1fab551726 Deskbar: Center window icons in WindowMenuItem
* They had a fixed top offset which looked bad with larger font sizes.
* The icons should be replaced with vector icons, though, and properly
  resized.
2018-11-03 20:03:16 +00:00
Axel Dörfler
5fd3bc6d2c BDeskbar: Moved constants to shared header
* Instead of duplicating them in different files.
2018-11-03 20:03:15 +00:00
Kuroneko
ed08b22dec add-ons/mail_daemon: IMAP: limit UIDs in UID FETCH
Some IMAP servers (such as dovecot) have hard line length limits for
commands.

The way UID FETCH was being scheduled was creating FETCHes longer than
the maximum length.

Limit these to a reasonable number of UIDs per fetch, such that we have
a hope of success when facing monsterous mailboxes.

Change-Id: I8a2184eec1b8fcab6f7914a9b14ad008700b96d1
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Reviewed-on: https://review.haiku-os.org/c/haiku/+/626

Style fixes by me, and also replaced emplace_back with push_back
for GCC2 compatibility.
2018-11-03 14:45:50 -04:00
Augustin Cavalier
065c9986f8 ipro1000: Enable the non-legacy TX path. 2018-11-03 14:31:45 -04:00
Augustin Cavalier
94064605f5 freebsd11_network: Add mtx_trylock() and curcpu.
These are needed for the "non-legacy" TX path in ipro1000.
Also remove the "spinlock" member from struct mtx; struct mtx_spin
is different (and not implemented by us presently.)
2018-11-03 14:30:37 -04:00
Peter Kosyh
6f3f2e141c NetServer::_JoinNetwork: fix crash when name == NULL
Change-Id: Ie6a5b5af855ee2b6bec81dc6c37ff0fa6271deea
Reviewed-on: https://review.haiku-os.org/661
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-11-03 17:49:03 +00:00
Fredrik Holmqvist
3431cf5b06 PS2 Elantech mostly working still disabled
Does handle coords correctly, but two finger jumps position somewhere
We can also report actual buttons, but not sure how movementmaker handles
it.

Will do cleanup once working

To test or help out return B_OK in probe_elantech
2018-11-03 18:10:40 +01:00
Peter Kosyh
586138b632 ps2_reset_mouse: error in checking response logic
Change-Id: Ia4011938cf914b2bc2ba9d5cd595fa0ef66d11dd
Reviewed-on: https://review.haiku-os.org/659
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2018-11-03 17:04:55 +00:00
Fredrik Holmqvist
9b6198ec5f Unused #define INFO, no sense in internal logic
(Just starting to cleanup my ps2_elantech code)
2018-11-03 17:56:31 +01:00
Kacper Kasper
800e6fe412 BStringView: add support for multiline strings
* Actually draw the string at the bottom of the frame.
* Unfortunately BStringList cannot be cached because there is no
  space left in the class.
* Change SGI and PNG translators to use it in place of BTextView.

Change-Id: I07e12bf1a8dc956d18c9624604c7b63453ad15a2
Reviewed-on: https://review.haiku-os.org/620
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-11-03 16:44:10 +00:00
Adrien Destugues
22e03e588e Allow to change brightness from the command line
screenmode can now set the brightness (only for intel_extreme, still).
Both absolute and relative values are accepted, allowing to bind
keyboard shortcuts to "increase brightness" and "decrease brightness".

Change-Id: I5221532ebdfba5df1b4d4e1f3331406359f2807c
Reviewed-on: https://review.haiku-os.org/655
Reviewed-by: Kacper Kasper <kacperkasper@gmail.com>
2018-11-03 15:51:08 +00:00
Axel Dörfler
e85413ad6c DiskProbe: Coding style cleanup
* Not complete, no functional changes intended.
2018-11-03 14:07:00 +00:00
Axel Dörfler
49135c955b desklink: Replaced muted speaker icon with stippi's version
* Replaced the muted speaker icon with a new one, thanks Stephan!
* Moved speaker icons into resources.
2018-11-03 14:07:00 +00:00
Adrien Destugues
95e0ce2c0b Add an haiku_extras package.
Curerntly contains support for amiga RDB and Apple (PPC) partitionning systems,
that is, things that might be useful, but not for most users, and was
not part of the default package.

Naming inspired from the Extras disk shipped with Amiga Workbench, for
lack of a better idea.

Change-Id: I57fb229806139939bc019e6c43b0aec7ea1f483a
Reviewed-on: https://review.haiku-os.org/652
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-11-03 00:43:41 +00:00
Alexander von Gluck IV
8de3883d8b bcm2835: Move mailbox init into bcm2835 framebuffer
We won't need the mailbox for most chipsets except bcm2835
to determine the framebuffer base address.
(especially at this early boot stage)

This simplifies things by making the mailbox usage limited
to boot_arch_arm and not spreading it all thoughout the
platform u-boot code... however we keep the mailbox driver
as-is since it would make a good kernel driver someday.

mmu_man mentioned us "finding" the fb base from the mailbox
and modifying the FDT to let it know the base reg of the
framebuffer... that's beyond 'just getting things building'
though :-)

Change-Id: Ic2772b85dff004f9d21447ea5958b5ae9776d526
2018-11-02 12:46:54 -05:00
Kacper Kasper
3bac8deff6 Add -a option to locale utility
* Required by POSIX.

Change-Id: Ided0a9d45d5edd00f3aa6279e99ca486ca372f6c
Reviewed-on: https://review.haiku-os.org/651
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2018-11-02 14:25:57 +00:00
Alexander von Gluck IV
bdcc7b74fc arch_mailbox: Stub out virtual Read/Write functions
* Nice catch mmu_man!

Change-Id: I92a00ec5c66313107e586f7b3ee8a1fa5021b2be
2018-11-01 21:31:56 -05:00
Augustin Cavalier
49783dc8f2 strace: Gracefully handle invalid syscall numbers.
OpenJDK 1.8 somehow manages to trigger this. Before this commit it would
just attempt to read past the end of the vector, which of course segfaulted,
which seems to imply nobody has run into this case before.
2018-11-01 20:51:05 -04:00
Adrien Destugues
ffd9d565d2 BDate: do not use strftime
Using BDateFimeFormat avoids going through libroot and up again to ICU
throuhg the locale add-on. Moreover, it uses the Locale settings
directly instead of relying on the LC_* environment variables.

Fixes day names in Web+ history menu always showing in english. Tnaks to
Oco for noticing!

Change-Id: I0c7f321a6147e8f5ab31f82de836c5ad23bb321b
Reviewed-on: https://review.haiku-os.org/650
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-11-01 23:03:41 +00:00
Jérôme Duval
c30513840a runtime_loader: correctly detect gcc7 abi as gcc4 abi compatible.
Change-Id: I0e3df832e2fcc0b687344f54d5b0a639f5add370
Reviewed-on: https://review.haiku-os.org/649
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-11-01 15:25:33 +00:00
Augustin Cavalier
fb00a65fc6 freebsd11_network: Avoid triggering timer interrupts 1000 times/sec.
FreeBSD's "ticks" has a granularity of whatever "hz" is, presently 1000.
It's declared as "extern int32" in FreeBSD's codebase, as it's the
defining unit of time for most operations.

We just use system_time() for essentially the same purpose, which requires
no hard-clock timer interrupts at all, and so Colin seems to have decided
to emulate "ticks" by just triggering a timer once per millisecond and then
incrementing the "ticks" variable.

1000 timer interrupts per second is quite a lot (assuming the kernel
actually combined these between drivers, otherwise it would be 1000
*per driver*), and probably a contributor to Haiku's not-so-great
battery performance on most laptops.
2018-10-31 19:03:40 -04:00
Augustin Cavalier
04b07407ef rtl8139, ipro1000: Don't shadow "ticks" global variable.
The next commit will make it a "#define" instead of an "extern".
I've already submitted this for upstream inclusion in FreeBSD.

Sorry for the noisy diff with all the whitespace changes...
2018-10-31 19:03:39 -04:00
Augustin Cavalier
753d3506d8 efi: arch_src also depends on gnuefi.
Fixes the x86_64 parallel build after recent changes.
2018-10-30 22:38:21 -04:00
Augustin Cavalier
811da1f129 efi: aarch64 -> arm64. 2018-10-30 22:37:48 -04:00
Augustin Cavalier
84f3356750 random: Fix mutex use-after-destroy.
sRandomLock is a driver-global lock used by all instances of the "random"
device, of which there can be more than one, it seems; and somehow some
are destroyed before others. I didn't really investigate too far to see
under what circumstances that occurs.

Found while trying to compile some ports; suddenly all attempted
reads of /dev/random started PANIC'ing with "mutex uninitialized".
2018-10-30 22:33:42 -04:00
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