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.
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.
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.
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.
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.
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.
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
Replace strncpy() with strlcpy(), since destination size equals
maximum number of characters to copy.
Pointed by gcc8 [-Werror=stringop-truncation].
Change-Id: I3e2a98802ddb379890aefaf8c3f0efb1cd347188
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 :)
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.
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
... 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.
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
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.
* "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.
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.
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.
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.
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.
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.
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.
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. :)
They were already enabled for the net80211 code (and thus all the Wi-Fi drivers)
unconditionally; now we enable them conditionally based on KDEBUG_LEVEL_2
for the freebsd11_network core code also.
Includes fixes to the build, since there were some issues with INVARIANTS otherwise.
If numBytes was greater than MCLBYTES (presently 1 << 11 = 2048), then the data beyond
MCLBYTES would be silently discarded instead of being written. Now, we store the
result of the min_c in numBytes, so the caller knows how much was written.
I turn on the printf that's commented out here and found that in practice this
seems to never happen (it's larger than the ethernet limit), so it seems unlikely
to fix any "transmission mysteriously failed" bugs.
Also backported this to the FreeBSD 9 layer.
Changes mostly ported from the FreeBSD 9 code, but some of it is new.
Hopefully in the future, this diff can be reused almost wholesale,
instead of having to re-create it as was done in past upgrades.
Mostly just additions of new primitives and hook functions that are
relatively straightforward and mostly copied from FreeBSD. The one
notable set of changes is the ones relating to gDevices, as the hacks
we used previously to hide the base device are now no longer needed
(as the previous commit noted.)
Previous versions of FreeBSD created a base ifp of type IFT_IEEE80211
in addition to the ifp created for each VAP. We ignored these, so that
the devices we displayed (/dev/.../0, etc.) were numbered properly.
FreeBSD 11 no longer does this and instead uses an ieee80211com as its base
type, so this logic is not needed.
* Don't translate internally used names in BMenuBars.
* Use presentable strings for the title of BAlerts.
* Make the wording a bit less technical.
Should the HaikuServer URL be part of the update/remove rating alert?
Change-Id: I0a984082eadbc5834ac6b8b2b1955e66098d1c8a
* netcat is now provided via a package and is not required by the
'haiku' package
* Display the full name of ACPICA and update copyright year
* Update copyrights for libpng.
The first two have the same license and are also now covered by
intellinuxwireless.org. The second two also share a license among
themselves, and also with following (not-yet-imported) firmware,
e.g. from idualwifi3160.
Added recent folder limit as class member but
defaulted the value to 10.
Stopped using index to keep track of selected
path and folder menu item. Instead use BMessage to send
clicked folder path to the folder bg image loader.
Change-Id: I6b1809ff782db839ef43eb7169a7f6e77fb4ec70
Fixes#5026
You still cannot boot to desktop under SMAP on intel_extreme, however,
as the agp_gart bus has not been patched properly. Doing so breaks the
intel_extreme accelerant, so more investigation is needed.
+ has greater operator precendence than ?, so we need parentheses when
using both in expressions. Both of these look like actual bugs.
Spotted by Clang.
joystick_info contains BLists which initialize themselves upon new(),
and Clang warned (correctly) that using memset() overwites that, as well as
RTTI and other data that they contain. So instead, only memset the first
part of the struct, and then manually initialize the other members.
Fixes#14217.
In 02cb8503d2, I added the m_next and
m_nextpkt structures to mbuf, as per FreeBSD's mbufq system that
FreeBSD 11.1's net80211 code uses. What I didn't realize (and
korli and PulkoMandy who reviewed my code didn't notice either)
is that the data fields in mbuf are sometimes dealt with through
these LEN macros, which were now incorrect after such changes.
This caused an out-of-bounds memory write for data above a certain
size that was attempting to be written into an mbuf that under the
old sizing would have been fine, but under this new sizing was invalid,
and this manifested itself as a KDL under the guarded_heap (#14207).
It possibly also manifested itself as a stack-smash with the new net80211
code (uncommitted on a local machine, and the reason I tried using
the guarded heap in the first place.)
Now we use FreeBSD 11's macros, which use offsetof instead of raw
integer math. This means that we can't specify the struct size in mbuf
as these structs are computed from mbuf's definition, and thus have
to rely on the allocator giving mbuf the correct size (as FreeBSD
does also.)
No functional change. Ideally we would create these via ResAttr like we do
the mail-providers, but these have attributes on their directories and not
just the files, so that will be slightly trickier, so for now just keep them
in their zip format.
There is a (probably non-viable) case where it might not get initialized
by the function and then potentially used, so set it to NULL to silence
Clang.
* When Download window is initially shown, it is correctly
fully onscreen; however, adding a download resizes the
window such that it becomes partially offscreen. Now,
when the frame is resized, reposition the window onscreen
again.
Fixes#12704
The user iframe and associated data that the syscall entry pushes to the
stack directly were causing the stack to be mis-aligned by 8 bytes. Since
we re-aligned %rsp afterwards, for most usecases this wasn't a problem.
However, since we stored the pre-realinged %rsp in %rbp (as we need it to
access the iframe data), this also meant that anything which depended on
%rbp being 16-byte-aligned would run into serious problems.
As it turned out, GCC 7 assumed that %rbp was indeed 16-byte-aligned, and
so optimized certain accesses to use SSE instructions that depended on this
alignment. Since inside any callstack begining with a syscall this was not
the case, a "General Protection Exception" resulted (see #14160 for an example)
at the first usage of such an instruction. I wasn't really sure what was going
on when it first came up, and so "fixed" it by disabling the GCC optimization
that used such instructions. Replacing the -fdisable... with -mstackrealign thus
also "fixes" the problem, as I discovered earlier today, as it forces GCC to
realign the stack in function prologues.
So instead of rounding %rsp down to the nearest aligned address after the
pushes are complete, we offset %rsp by the amount the pushes are not,
thus fixing both %rsp and %rbp in syscall handling routines. This of course
depends on syscall_rsp being already aligned, which it is.
Thanks to PulkoMandy and js for the advice and guidance (and PulkoMandy
for the ASCII art), as this is essentially my first time working with
kernel assembly.
* Using attribute visibility hidden doesn't get applied if a
function returns a non-class pointer type, so the functions
weren't being hidden for gcc4+ builds, resulting in stack
overflows. Using addr_t, which should be the same size as
void* works around this restriction.