Commit Graph

43247 Commits

Author SHA1 Message Date
John Scipione
0546bdd5e5 Tracker: code simplication to hrev47374
We don't need to create a BNode from a BDirectory because BDirectory derives
from BNode! So use the BDirectory we already have as a BNode and get the
node_ref from it so we can pass it into WatchNode().

Sorry for the noise.
2014-06-14 21:19:42 -04:00
Cedric Degea
076cb5a752 BOptionPopUp: check for non-NULL Message(). Fixes #10733
Signed-off-by: John Scipione <jscipione@gmail.com>
2014-06-14 20:50:10 -04:00
John Scipione
1f17f750db Tracker: Use BPathFinder to find add-ons 2014-06-14 20:48:15 -04:00
John Scipione
6cf062b93d Tracker: Style fixes to DeskWindow 2014-06-14 16:21:05 -04:00
Jessica Hamilton
00922c9989 Tracker: fix accidental logic inversion. Fixes #10940. 2014-06-15 05:30:21 +12:00
John Scipione
1f424632be Style fixes to IK, focus on docs 2014-06-13 17:27:01 -04:00
PulkoMandy
4a2260f21a Let the bootloader know about ARMv7.
When an ARMv7 CPU is detected, immediately turn on the FPU. This allows
us to use vsnprintf in the TRACE call in that function, as our libc is
compiled with floating point support and will trigger a fault if the FPU
is not available.

This lets the boot go further, and crash in mmu_init. Next steps:
* Find why mmu_init is crashing
* Setup some fault handlers, otherwise we call uboot ones, and they are
not very helpful. They will also probably not work once the mmu is
enabledvery helpful. They will also probably not work once the mmu is
enabledvery helpful. They will also probably not work once the mmu is
enabled...
2014-06-13 22:15:54 +02:00
PulkoMandy
afe56d3ab3 Load uImage higher so it doesn't overwrite itself
Loading of haiku_loader from an uImage is a 2-step process:

* First, the uImage is loaded (in our case from SD card using fatload)
to RAM at a temporary address.
* Then (using bootm), it is unpacked. The uImage is a container format
and can hold several files, with a load and execution address. The files
are copied from the uImage to their final location, and it's better if
that doesn't overlap with the uImage content

When this loading is done, bootm jumps to the entry point found in the
uImage.

We now actually execute our code from haiku_loader. This crashes with
the following call stack:
* vsnprintf
* dprintf
* boot_arch_cpu_init
* cpu_init

It seems vsnprintf is trying to use VFP instructions (probably from the
libgcc) but that triggers some kind of fault, and the handler (setup by
uboot?) ends up crashing the system by jumping to unmapped memory at 0.
2014-06-13 20:26:51 +02:00
John Scipione
2a6a3109e5 shortcut_catcher: tiny style fix 2014-06-13 12:52:49 -04:00
PulkoMandy
3d6edc43d9 Patch by dnivra (GSoC 2014, ARM suppport)
* Cleanup the SD card image building to allow jam -q @bootstrap-mmc to
work.

There are a few remaining tricks before you can safely build an image:
* This uses a non-POSIX du option, and is only tested with Linux du
only (Linux is the only supported system to run bootstrap builds,
anyway)
* The Python recipe in haikuports.cross is known to not build on
Debian/Ubuntu, but work fine on OpenSuse. There is a patch available in
haikuports bugtracker to allow the reverse.
* You need to populate the haikuports repo package list with some
packages (which don't exist yet) to make the build system happy. But our
git hook to generate the repositories is preventnig me to share this
hack.

Once built, the image currently crashes early in the kernel execution.
On to debug that!
2014-06-13 17:22:48 +02:00
Jérôme Duval
b64f1a9768 tiff: drop sources and headers from the source tree
* also drop jpeg and png headers
2014-06-13 15:52:11 +02:00
John Scipione
f1e2e389be shortcut_catcher: rename a couple variables
Fix build, msg => message

Fix warning use int32, not uint32

Also do a bit of refactoring.
2014-06-13 00:25:09 -04:00
John Scipione
78daf289c3 shortcut_catcher: A few 80 char limit fixes 2014-06-13 00:17:13 -04:00
Jessica Hamilton
d2da54dee2 Shortcuts: use BPathFinder instead of find_directory. Fixes #9958.
* Previously, BPath::Append() would return an empty path if the
  path didn't exist (and an error); in a nightly image, the
  B_USER_ADDONS_DIRECTORY didn't exist, triggering the bug.
* Replaced the code with calls to BPathFinder instead, which takes
  care of the empty path automatically.
2014-06-13 15:46:37 +12:00
John Scipione
abca6dabb6 Revert "shortcut_catcher: Fix KeyCommandMap::_DeleteHKSList()"
This reverts commit cb3243fbbd.

Sorry, this might do bad things.
2014-06-12 19:36:56 -04:00
John Scipione
1ecf19b82f shortcut_catcher: style overhaul 2014-06-12 19:25:03 -04:00
John Scipione
cb3243fbbd shortcut_catcher: Fix KeyCommandMap::_DeleteHKSList()
You can't increment the list item counter as you delete because the count
decreases as you go. Instead delete the first item until there are no more
items, then delete the list.
2014-06-12 18:45:36 -04:00
John Scipione
2776568d27 Fix BHandler::GetSupportedSuites()
The logic was reversed accidentally in hrev47355

Rewrite the method to make more sense. If data is NULL return
B_BAD_VALUE right away. Otherwise set the status based on the first
operation, if that succeeds perform a second one, and return the
result.

Fixes CID 1222666
2014-06-12 13:57:05 -04:00
John Scipione
219bf21ef6 Style fixes to Locale Kit, focus on docs. 2014-06-11 16:48:02 -04:00
John Scipione
37fedaf849 Style fixes to the Game Kit, focus on docs 2014-06-11 16:44:48 -04:00
John Scipione
be902ac4db App Kit: style changes.
No functional change intended.

Focused on documented classes only.

* Update copyright information.
* whitespace fixes.
* pointer style
* Rename some variables, msg => message, form => what
* Need consistent variable names to make documentation easier,
  allows us to use \copydoc or \copydetails instead of repeating
  ourselves over and over again.
2014-06-11 16:24:02 -04:00
Adrien Destugues
151ef32f45 Fix more of the cookie test following API changes. 2014-06-11 21:59:04 +02:00
Adrien Destugues
6765a83b15 Fix cookie tests for API changes. 2014-06-11 19:27:33 +02:00
Adrien Destugues
895fa41e0b Make handling of Http Authentication thread safe
* Each BHttpAuthentication object is locked on all field accesses,
* They are owned by the BUrlContext and never deleted, so there is no
need for reference-counting them,
* The BUrlContext itself is now reference counted, and all BUrlRequests
hold a reference to it.

This makes sure using the BHttpAuthentication objects from requests is
thread-safe.
2014-06-11 14:11:01 +02:00
Adrien Destugues
463ffbfde4 First steps towards cookie jar thread-safety
* Change the semantics of the iterators copy constructor and assignment
operator: they now return a new iterator for the same cookie jar (and
same url for the UrlIterator). They don't try to point to the same
position as the copied iterator. The only purpose of these is to write
code such as:

Iterator it = jar.GetIterator();

so having a full copy isn't that useful.

* The per-domain cookie lists are now protected with a read-write lock.
The iterators retain a read lock while they are handling cookies from
that list. They get a write lock when doing Remove. Adding a cookie to
the jar also gets the write lock for the matching list

* Fix a memory leak when adding a new domain-list to the jar failed

* Simplify the declaration of the PrivateHashMap type (it would be
even simpler if HashMap was a public API)

* The domain hashmap is now a SynchronizedHashMap. It is locked as long
as an Iterator or UrlIterator exists, which may be a problem as these
are public APIs. Writing safe iterators for an hashmap with concurrent
accesses is not easy, so the API could be modified to return a list of
domains and a list of cookies for a given domain or URL instead. This
would suit the intended uses just as well.

* The jar now store const cookies, so there is no need to lock them for
access/modification. Updating a cookie is done by replacing it with
another one in the jar (with the same domain and value). There is still
the problem of deleting a cookie while other threads may still access
it, this will be fixed by making cookies BReferenceable.
2014-06-11 12:59:33 +02:00
Oliver Tappe
9aec6561a8 More build fixes of unittests, this time for x86_64. 2014-06-11 12:44:39 +02:00
Oliver Tappe
77aa0e2a5e Fix build of unit-tests with gcc4. 2014-06-11 11:43:12 +02:00
Oliver Tappe
bab4c96c5c Fix build problems of makeudfimage with gcc4.
* _ALLOCATOR_H clashes with a std-include provided by gcc.
* add using declaration for std::list.
2014-06-11 11:42:41 +02:00
Axel Dörfler
bc4db40c40 AHCI: use a minimum of 1 block for trim ranges.
* Word 105 of ATA IDENTIFY should contain the maximum number of block
  ranges the device supports, but it always supports at least a single
  one.
* This change lets the trim command do something on Virtual Box.
2014-06-11 00:56:09 +02:00
Adrien Destugues
0256e7a458 Disable the MIME type test.
* This tests requires some private APIs which have been changed, it
needs to be rewritten.
* I'm also not sure if it's still possible to work on a copy of the MIME
* database to avoid messing with the system one.
2014-06-10 10:10:30 +02:00
Adrien Destugues
182a5f8e53 Disable test for TranslatorResoter::Version
* The method was made private and deprecated, so there is no way to
compile code calling it directly.
2014-06-10 10:09:13 +02:00
Adrien Destugues
64e8975369 ResourcesTest: fix build.
* There are several SetTo methods, specify the one we want to test.
2014-06-10 10:08:34 +02:00
John Scipione
888f72ca9a Tracker: close Desktop window on switch to spatial mode
If you have the Desktop window open when you switch to spatial
mode this will now close the window. You aren't allowed to have
the Desktop open in 2 places symultaneously in spatial mode.
2014-06-10 00:59:50 -04:00
John Scipione
646b1fe1e8 Tracker: Open Desktop folder in own window in browser mode.
... in a few more cases.

If you are in spatial mode and you double-click on the Desktop folder
it activates the Desktop putting all other Tracker windows in the
background.

If you are in browser mode and you double-click on the Desktop folder
it opens the Desktop folder in the current window.

If you issue 'open ~/Desktop' from Terminal or if you have Expander set
to open the expanded folder and you expand something on the Desktop
it won't open the Desktop folder in its own window in either spatial or
browser mode.

This patch alters Trackers behavior to  open the Desktop folder in its own
window in these cases when you are in browser mode.

One might argue (as a few have on IRC) that this behavior should also
happen in spatial mode, but, this patch does not alter the behavior of
spatial mode. In spatial mode opening the Desktop folder with
'open ~/Desktop' or extracting a zip file with Expander on the Desktop
simply activates the Desktop pushing all other Tracker windows into the
background state.

Fixes #10929
2014-06-10 00:57:33 -04:00
John Scipione
157e4b428a Tracker: Replace max_c() with std::max() 2014-06-10 00:36:11 -04:00
John Scipione
9437e677ba Tracker: Style fixes 2014-06-10 00:36:10 -04:00
John Scipione
12bd3f0452 Expander: Replace min_c() and max_c()
...with std::min() and std::max()
2014-06-09 15:56:39 -04:00
John Scipione
be931d0706 Expander: Check asprintf() return value 2014-06-09 15:56:27 -04:00
John Scipione
122abe4315 Expander: Check Window()->Lock() return value 2014-06-09 15:56:26 -04:00
John Scipione
1e35cfaea2 Expander: replace string manip with asprintf() 2014-06-09 15:56:26 -04:00
John Scipione
e326cef620 Expander: style fixes, no functional change intended 2014-06-09 15:56:25 -04:00
Jérôme Duval
d64267ffb2 vfs: checks whether the mount's unmounting flag is already set.
* thanks to Ingo for suggesting the idea, quoting him:
"by holding sVnodeLock read-locked, get_mount() ensures that fs_unmount() can't
process the nodes. If it is already past that point, the root node check
(not NULL, not busy, ref count > 0) is supposed to detect that. But it doesn't
look like this can work. fs_unmount() doesn't set the root node to NULL (the
root node field is NULL only during a short period in fs_mount()), but it just
frees the nodes after releasing sVnodeLock. So the not busy and ref count > 0
checks could already access freed memory".
* tested OK, this fixes #10522.
* replaced mount->root_vnode by the local variable with the same value.
2014-06-09 21:45:28 +02:00
Fredrik Holmqvist
ec10d307d0 Really fix gcc4 build.
Here I come to save the day!!
2014-06-09 21:07:29 +02:00
Adrien Destugues
942cf5fdbc Fix gcc4 build. 2014-06-09 18:21:42 +02:00
Adrien Destugues
d306340b66 Don't include number_format tests
* The class isn't currently included in Haiku
* Test test only checks that the constructor doesn't crash, which isn't
very helpful anyway
2014-06-09 17:24:28 +02:00
Adrien Destugues
9570413d2a Fix name conflict between two tests
* There is a SimpleTest in AlertTest.cpp, and an UnitTest in
balert/AlertTest.cpp. They ended up with the same grist as they are
built from the same jamfile. Rename one of them to avoid this.
2014-06-09 17:18:13 +02:00
Adrien Destugues
913e376500 Match linked list tests with the current API. 2014-06-09 17:09:23 +02:00
Adrien Destugues
49a6a0ebf3 Fix build of makeudfimage tests.
* The Udf namespace was removed from the headers, but not all the
implementation files
* kernel_cpp.h is not actually used
* TRACE_ERROR can't be set to dprintf when building as part of the test
(and not as a kernel add-on)

First step on the way to get jam -q unittests to work again...
2014-06-09 16:06:00 +02:00
Adrien Destugues
080f5d5f5d ProtocolListener test: fix build.
* I'm not sure what this is supposed to test...
2014-06-09 14:42:22 +02:00
Adrien Destugues
0e79d0efbc Disable tracing unless built in debug mode. 2014-06-09 14:12:56 +02:00
Adrien Destugues
3af9a2cac2 Make HttpRequest tests use the test framework
* Use httpbin.org as a server, rather than a local machine.
* Also add an HTTPS version
2014-06-09 14:11:15 +02:00
Adrien Destugues
f38d4d4510 Rename url directory to "service"
* All "services kit" tests will move there.
2014-06-09 11:18:00 +02:00
Adrien Destugues
1cbab031fd More relaxing of cookie-setting rules
* Allow non-secure page to set (but not read) secure cookies
* Allow pages to set cookies for subdomains (but not access them)
2014-06-09 11:17:49 +02:00
Adrien Destugues
d888718621 HttpTime: don't try to parse timezone
* Cookies sometimes come with the UTC timezone, or no tz info at all.
* No other timezone seems to be used

This allows better matching of cookies which would otherwise be kept
only as session cookies.
2014-06-09 11:10:19 +02:00
Adrien Destugues
744bfa6270 Convert existing cookie test to test framework
* The remaining stress-test is a benchmark, and has no success/failure
result. Leave it this way for now.
2014-06-09 11:08:16 +02:00
Adrien Destugues
f7e7eeba4a Limit cookie value size to 4096 bytes.
Too big cookies will make most web servers reject requests.
2014-06-09 08:50:29 +02:00
Stefano Ceccherini
056b2e33e5 ifconfig: fail with a warning if called on a non-existent interface. 2014-06-08 18:59:00 +02:00
Jessica Hamilton
a0b864f0e4 BString: fix possible infinite loop in _DoReplace 2014-06-08 04:37:16 +12:00
Jessica Hamilton
5700f5fcc3 libroot.so: update glibc's e_pow.S on x86. Fixes #9962 2014-06-07 09:33:15 +12:00
John Scipione
5fe7d79d30 Terminal: Fix crash when changing window size
... try 2 without a spurious \

sorry for the noise.

From the commits list (Ingo) <<-EOF

> Terminal crashes because fView is not connected to App Server when
> this is called so calling fView->GetMouse() is not allowed.

The interesting questions therefore are:

1) Why is the view not attached?
2) Why is it in the hyper link state?

1) is because the BTabView removes the non-selected tabs instead of just
   hiding them.

The reason for 2) is that the tab was opened with Cmd+T (the bug is not
reproducible when the tab is opened via menu item). Pressing Cmd causes
hyper link state to be entered and switching to the new tab will leave
the view in that state due to 1).

Possible solutions:

* TermView::_VisibleTextBufferChanged(): Call state hook only when attached
  to window. All other occurrences are safe as they are in BView hooks.

* Leave the hyper link state when the view is detached from the window. A
  new dummy state could be active as long as the view is not attached, though
  using DefaultState would be harmless as well.

EOF

I chose solution 2 using DefaultState rather than creating a new dummy state.

Thanks Ingo.

Fixes #10902
2014-06-06 15:28:36 -04:00
John Scipione
0bdf33686c Revert "Terminal: Fix crash when changing window size."
This reverts commit d3657dc2bc.
2014-06-06 15:27:20 -04:00
John Scipione
d3657dc2bc Terminal: Fix crash when changing window size.
From the commits list (Ingo) <<-EOF

> Terminal crashes because fView is not connected to App Server when
> this is called so calling fView->GetMouse() is not allowed.

The interesting questions therefore are:

1) Why is the view not attached?
2) Why is it in the hyper link state?

1) is because the BTabView removes the non-selected tabs instead of just
   hiding them.

The reason for 2) is that the tab was opened with Cmd+T (the bug is not
reproducible when the tab is opened via menu item). Pressing Cmd causes
hyper link state to be entered and switching to the new tab will leave
the view in that state due to 1).

Possible solutions:

* TermView::_VisibleTextBufferChanged(): Call state hook only when attached
  to window. All other occurrences are safe as they are in BView hooks.

* Leave the hyper link state when the view is detached from the window. A
  new dummy state could be active as long as the view is not attached, though
  using DefaultState would be harmless as well.

EOF

I chose solution 2 using DefaultState rather than creating a new dummy state.

Thanks Ingo.

Fixes #10902
2014-06-06 15:14:15 -04:00
Adrien Destugues
cb7d1c5ecd Add some more tests for cookies
Also derived from Opera test suite.
* Fix nbsp instead of space in some tests (I shouldn't have copypasted
these...)
* Add most of the advanced tests from Opera. This exposed several bugs
in the cookie code (all fixed) as well as strptime and strtol (tickets
opened)
* All the cookie2 tests are skipped. I didn't find any use of it on the
internets, so it doesn't seem useful to implement it.
* The last two tests sets are still missing. I'll add them next week.
2014-06-06 18:42:11 +02:00
Adrien Destugues
550f5b1c95 Fix some issues detected by the testsuite
* An empty "expires" field results in a session cookie, rather than
rejecting the cookie altogether
* A page can set a cookie it is not allowed to access (for example in a
subdirectory of where the page is located). Separate IsValidForUrl and
_CanBeSetFromUrl to perform the appropriate checks in each case.
* Limit cookie path to 4096 characters. As a result of the previous
change, a page would be allowed to set a cookie with an aribrarily long
subpath, wasting disk space and RAM by growing hte cookie jar.
* Don't allow path with . or .. elements. These are a source of
confusion and are not needed.
* Reset the cookie fields when parsing failed. This does not matter when
using the cookie jar, but is useful when working directly with
BNetworkCookie.
2014-06-06 16:53:50 +02:00
Adrien Destugues
fed9b96e26 Better handling of parse errors in HttpTime
strptime can return non-NULL values even if it only parsed part of the
string. This was sometimes making us use the wrong format. Now we try
all formats and checks how much of the string strptime managed to parse.
We stop when it has parsed a big enough part of it.
2014-06-06 16:49:11 +02:00
Adrien Destugues
6ac7ba848b Sort cookies by path length (longest first)
* This makes sure the most specific cookies are sent first, matching
what other browsers do.
2014-06-06 16:48:15 +02:00
Adrien Destugues
4e14963b73 CID 1108421: BUrl constructor missing initializers. 2014-06-06 08:04:16 +02:00
Stephan Aßmus
5eba63a680 UrlContext: Improved comment 2014-06-06 00:23:47 +02:00
Stephan Aßmus
cb1a99c5f0 HttpHeaders: Small code refactorings
Also check BList::Add() for success when adding a BHttpHeader.
2014-06-06 00:23:47 +02:00
Stephan Aßmus
79852c5551 HttpHeaders: Check assigning self in operator=() 2014-06-06 00:23:46 +02:00
John Scipione
7a214200ed Revert "TermViewStates: Check if fView is NULL before using it."
This reverts commit b84955c738.
2014-06-05 18:02:44 -04:00
John Scipione
4bf5fb9252 Revert "Fix #10902 Terminal crashes setting window size."
This reverts commit 4c8d238716.
2014-06-05 18:02:33 -04:00
John Scipione
5443e035e8 DiskUsage: Open file/folder on cmd-click, zoom on regular click. 2014-06-05 17:55:42 -04:00
John Scipione
eef00544a4 DiskUsage: Style fixes. 2014-06-05 17:52:00 -04:00
John Scipione
4c8d238716 Fix #10902 Terminal crashes setting window size.
Terminal crashes because fView is not connected to App Server when
this is called so calling fView->GetMouse() is not allowed. We could
perhaps check to make sure that fView is connected to App Server by
checking that fView->Window() != NULL, but, a better way to handle this
is to grab the already set fLastClickPoint variable from fView
which eliminates the need to grab the current mouse position again.
Worst case scenario is that fLastClickPoint hasn't been set in which
case Terminal won't find anything to highlight or unhighlight.

Also check to make sure that fView != NULL here for good measure.

Fixes #10902
2014-06-05 16:19:58 -04:00
John Scipione
b84955c738 TermViewStates: Check if fView is NULL before using it. 2014-06-05 16:19:24 -04:00
John Scipione
da80e3d9e2 TermViewStates: Style fixes 2014-06-05 16:19:24 -04:00
Stephan Aßmus
16b8886a59 HttpAuthentication: Check LockBuffer() success...
... in _H() MD5 digest method. Thanks to axeld
for the suggestion.
2014-06-05 21:43:35 +02:00
Adrien Destugues
295a23a4e3 Add some tests for cookies.
* Mostly extracted from Opera cookie testsuite.
* Shows one bug with parsing expiration date of cookies in
ExpirationTest.
2014-06-05 19:29:11 +02:00
Stephan Aßmus
258817720c HttpAuthentication: improvements and fixes
* BString::CopyInfo() takes length as second
   parameter, not the end-offset. This bug didn't
   have any effect, since BString clamps the length.
 * ',' is a comma, ':' is a colon.
 * When parsing "additionalData" in the loop for
   name=value pairs, an empty name is not useful,
   continue the loop early.
 * "value" may have the length 0, accessing it
   with value[0] would not lead to an access violation,
   since it just reads the terminating zero (I think),
   but it's nicer if the code makes it clear that
   value being empty is considered.
 * _H() was using a static buffer, in a heavily
   multi-threaded situation. I don't think this was
   healthy.
 * Implement the proposed optimization of using
   BString::LockBuffer(). Appending one char at a time
   is really bad for peformance. The Base64 encoding/decoding
   should really be rewritten as well for similar reasons.
2014-06-05 00:01:13 +02:00
John Scipione
daabbbe5f9 BRegion: Style fix, update parameter name
No functional change.

Trying to indentify each kind of object uniquely and consistently.

... update docs as well.
2014-06-04 11:58:07 -04:00
Adrien Destugues
cd805f6793 Remove some redundant fields
These were getting out of sync and causing trouble, and they are easy to
compute from existing information.

Fixes some problems detected by the testsuite where the user/password or
the host would sometime disappear from the URL.
2014-06-04 11:56:23 +02:00
Adrien Destugues
3fd76758ed Add some tests derived from Ruby Addressable
They have a very complete testsuite, but not all of it is relevant to
us. Pick some of the interesting tests for now.
2014-06-04 11:36:09 +02:00
Adrien Destugues
b5bde4ad81 Fix bugs identified by the testsuites
* Handle resolving . and .. in path properly
* Make the subtle distinction between empty and unset for the authority,
fragment and query.
2014-06-04 10:36:10 +02:00
Adrien Destugues
e29e0a0d2a Fix Url relative constructor.
Actually get the query from the base URL.
2014-06-04 08:22:13 +02:00
John Scipione
44cee34013 BRegion: Style updates for documentation.
No functional changes intended.

* Updated copyright information.
* Reduced doxygen documentation down to a helpful summary
  in a regular comment, the documentation has been moved into
  the Haiku Book.
* Some parameter renaming for consistency and clarity.
* A few other style fixes.
2014-06-03 20:26:45 -04:00
Axel Dörfler
c1400fb617 intel_extreme: use VESA EDID info as fallback.
* Only in case retrieving EDID info failed on head A and C.
* Should help with detecting the native resolution for ticket #10878.
2014-06-04 01:02:40 +02:00
Axel Dörfler
5336a8d11e intel_extreme: fixed warnings.
* And also most coding style violations.
2014-06-04 01:02:39 +02:00
Axel Dörfler
0ed0765067 create_display_modes: added missing 1600x900.
* Might help with #10878.
* 1366x768 was at the wrong spot.
2014-06-04 00:23:38 +02:00
Adrien Destugues
0013f47d3f Import tests from http://skew.org/uri/uri%5Ftests.html
This shows there are some problems with BUrl, still.
CppUnit stops at the first failed assert in each test, which doesn't
give a good overview of the number of failures in this case (the first
subtest fails). A possible solution is splitting this into smaller
subsets.
2014-06-03 17:10:29 +02:00
Adrien Destugues
68c13f94fb Convert BUrl tests to the UnitTester framework. 2014-06-03 13:34:35 +02:00
Jessica Hamilton
01fbdbab83 xsi_semaphore: use MemoryDeleter instead of multiple free() 2014-06-03 13:38:04 +12:00
Jérôme Duval
9cd7c6a433 tiff: use the outsourced packages.
* packages for secondary architectures would be welcomed.
2014-06-02 23:45:19 +02:00
Jérôme Duval
da76d8da0c wget: remove 2014-06-02 23:25:12 +02:00
Oliver Tappe
d527dbc8f6 Avoid unwanted output of <build>unzip with DEBUG=1. 2014-06-02 02:00:29 +02:00
Oliver Tappe
1a7bcf6962 Lots of B_PRI... insertions to fix errors with DEBUG=1. 2014-06-02 02:00:28 +02:00
Jérôme Duval
1ee3031a90 wget: use the outsourced packages.
* remove wget Jamfile from the build.
2014-06-02 00:06:31 +02:00
Jérôme Duval
f196b1a662 hda: add snoop quirk for a few other pci ids.
* based on alsa.
2014-06-01 16:21:08 +02:00
Murai Takashi
45e3a5edae hda: Add Baytrail HDA controller
Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2014-06-01 16:21:08 +02:00
John Scipione
532c873311 BRect: Replace max_c() and min_c() with std::max() and std::min() 2014-05-30 19:46:30 -04:00
John Scipione
1f46fc6d52 BRect: Style fixes for documentation 2014-05-30 19:31:10 -04:00
Jérôme Duval
735f58f3e4 xhci: build fix 2014-05-30 16:28:40 +02:00
Jessica Hamilton
fad4fc59f9 Revert "ByteOrder.h: remove use of __builtin_bswap16."
This reverts commit 040dc2eebc.
2014-05-30 20:39:43 +12:00
Paweł Dziepak
b20eb413cd kernel/x86_64: help gcc with devirtualization
This patch gets rid of some indirect calls in the paging code.
2014-05-30 02:11:05 +02:00
Paweł Dziepak
fb010e297f kernel/x86_64: use C++11 atomics in X86PagingMethod64Bit 2014-05-30 00:23:49 +02:00
Paweł Dziepak
91e7f347f9 kernel/x86_64: try to inline physical page mapper functions
The way we handle paging is very wasteful and relies heavily on virtual
funcions even if there is absolutely no reason to do so. The proper
solution would be to do a major rework of paging code (including
arch-independent parts).

On x86_64 physical page mapper is very simple what makes the overhead
resulting from the desing of paging interface very expensive. This
patch attempts to make things a bit better by helping GCC with
devirtualization and allowing inlining physical page mapper impementation
(well, only when it is devirtualized).
2014-05-29 23:41:46 +02:00
Jessica Hamilton
040dc2eebc ByteOrder.h: remove use of __builtin_bswap16.
* Fixes the build for host compilers older than gcc-4.8
2014-05-30 08:45:57 +12:00
Puck Meerburg
d0592a1164 Fix Coverity bug 605892: Resource leak
Signed-off-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
2014-05-30 08:45:56 +12:00
Michał Siejak
679ad262e9 haiku_loader now ignores unusable drives reported by BIOS.
This fixes the problem with find_unique_check_sums() taking a very long
time to complete when one or more drives report read errors.

Fixes #10880.

[Paweł: minor style issue]
Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
2014-05-29 22:32:15 +02:00
Jessica Hamilton
44ec21c3ff ByteOrder.h: simplify compiler test
* A problem with our gcc requires adding casts for gcc4 when
  the __builtin_bswap functions are used with a format string
* Unlike gcc2, the __builtin_bswap functions do not get disabled
  despite using -fno-builtins, hence added compiler check in
  runtime_loader/utility.cpp
2014-05-30 00:15:38 +12:00
Michał Siejak
221ea8a17e Updated FreeBSD rtl81xx network driver with the 10.0 release.
Should fix #10412.

Signed-off-by: Pawel Dziepak <pdziepak@quarnos.org>
2014-05-29 13:45:16 +02:00
Stephan Aßmus
c3a07a5aed PackageInstaller: Added -v/--verbose option
It enables just a few printf()s in PackageItem.cpp.
I went with a quick solution using a global variable
instead of using/writing some nice logging framework which
could even generate install logs... but it helps in tracking
down some package problems without first having to uncomment
some printf()s...
2014-05-28 23:04:41 +02:00
Stephan Aßmus
ecf119cc17 PackageInstaller: Fix Paladin installation
... and perhaps more packages build for pre-PM Haiku.
 * Restore the original path rewriting of "/boot/system"
   alongside rewriting "/boot/beos/system".
 * Rewrite "/boot/apps" in install scripts. This one fits
   the existing TODO that the rewriting should not use
   hard-coded replacement paths.
 * Fixes ticket #10875
2014-05-28 22:40:59 +02:00
John Scipione
8ad6baf789 BButton style fixes for docs.
No functional change intended.
2014-05-28 14:21:06 -04:00
John Scipione
b29d84a85a BRadioButton style fixes for docs. 2014-05-28 14:10:35 -04:00
John Scipione
7ad8e674de BCheckBox: Style fixes, variable renaming for consistency, docs.
Also some other style fixes, no functional changes intended.
2014-05-28 14:06:32 -04:00
John Scipione
092e3093c3 BControl: Style fixes, variable renaming for consistency, docs.
Also some other style fixes, no functional changes intended.
2014-05-28 14:05:22 -04:00
John Scipione
f4870e1cf4 BView: Rename parameters for consistency, docs.
No functional change.
2014-05-28 12:11:57 -04:00
Alexander von Gluck IV
99f83552ca radeon_hd: Fix comment typo, no functional change 2014-05-26 22:35:36 -05:00
Alexander von Gluck IV
e938ebdae0 radeon_hd: Rework PLL picking code
* Rewrote to be more efficient and more accurate.
* Fix a DP bug where we didn't choose the correct
  external PLL.
2014-05-26 22:26:24 -05:00
Adrien Destugues
36764b4001 AlphaMask: add missing error check.
It's possible to allocate the bitmap object, then fail allocating the
bits. The WebKit testsuite is a way to trigger this, and it crashed
app_server.
2014-05-26 17:28:51 +02:00
Adrien Destugues
a4a2abe0d9 Test case for pixel alignment on transforms.
Transforming an aligned rectangle shifts it up and left by 0.5 pixels.
2014-05-26 10:06:42 +02:00
Adrien Destugues
549314746b BookmarkBar: style fixes and some error checking.
Thanks to axel for reviewing.
2014-05-26 09:13:46 +02:00
Axel Dörfler
6ed2992fb6 scheduling_recorder: fixed spelling. 2014-05-26 01:10:31 +02:00
Alexander von Gluck IV
4bb543e517 radeon_hd: Add in a bunch of missing Trinity/Richland ID's
* Add market name to a bunch of Kabini, Mullins cards
  after some creative web searches
2014-05-25 12:03:35 -05:00
Alexander von Gluck IV
e321d716e4 radeon_hd: Add latest generation radeon_hd cards
* These aren't tested, but since we go off of DCE
  versions for a lot of stuff, they may work.
* AMD doens't include market names in their drivers
  anymore, so if we want to label them it will take
  additional work.
2014-05-25 09:03:03 -05:00
Alexander von Gluck IV
75dcf02ac8 radeon_hd: Add PCIID for Radeon HD 3430
* Should resolve #10791
2014-05-24 21:54:54 -05:00
Alexander von Gluck IV
38ec158d2a radeon_hd: Cleanup atombios parser types
* pptable.h now 100% stock
* atombios.h now 99% stock
* Resolves issues with radeon_hd on x86_64 by
  making atombios structs match OS typedefs
* Resolves #10614
2014-05-24 21:05:03 -05:00
Alexander von Gluck IV
bc73719d2f radeon_hd: Add some additional APU's, should resolve #10606 2014-05-24 16:49:03 -05:00
Alexander von Gluck IV
a8307efa46 radeon_hd: Improve pll probing. Let probe calls enable ss 2014-05-24 16:49:03 -05:00
Oliver Tappe
6b6ff33d60 Fix zlib-dependency in libnetapi.
* Fix copy-'n'paste bug that resulted in the zlib.h dependency being
  added to no source file at all.
2014-05-24 20:26:41 +02:00
Oliver Tappe
06ed405803 Fix zlib-dependencies of (boot & standard) packagefs.
* Some files that depend on zlib.h weren't declared as such, which
  could cause multijob builds to fail.
2014-05-24 20:26:41 +02:00
Jessica Hamilton
bfb8caf10f Fix the build. Introduced in hrev47248. 2014-05-24 13:25:51 +12:00
Stephan Aßmus
d30a0a6eae app_sever: Fix more mixups of transformed clipping bounds 2014-05-23 21:03:33 +02:00
Stephan Aßmus
81507fa496 app_server: Fix transformed DrawString()...
...when the transformation moves the text into the view bounds. The
rect returned from Painter::BoundingBox() is already transformed, as
should be expected.
2014-05-23 20:52:14 +02:00
Stephan Aßmus
ae4fa7ce39 Transformation test: Refactored duplicated code. 2014-05-23 20:44:51 +02:00
Stephan Aßmus
bfb2fd4153 HaikuDepot: Cleanup JSON string builder. 2014-05-23 20:29:43 +02:00
Adrien Destugues
5e36a367d7 Convert strdup.c to C++. 2014-05-23 18:30:26 +02:00
Adrien Destugues
5710ad967d Move overflowing items from bookmark bar to a menu.
Since the bookmark bar can now be resized smaller than the space needed
for the items, move items that don't fit in it to a menu, which is
always the last item in the BMenuBar.
2014-05-23 17:54:30 +02:00
Adrien Destugues
6f79af3c55 Web+: move BookmarbKar to own file.
It's a bit long for an inline class, and I'm going to add more stuff to
it.
2014-05-23 15:38:10 +02:00
Adrien Destugues
b6c34f4c44 Add a transform test for DrawString with offsets
* The text is not drawn at all when some transforms are used.
2014-05-23 15:07:19 +02:00
Axel Dörfler
59750213e7 usb: fixed potential crash.
* The active interface may be null. This actually happens with a Lasmex
  USB speaker in case it is turned on.
2014-05-22 18:34:23 +02:00
Axel Dörfler
1152f83ddc usb: coding style cleanup.
* Removed a few superfluous comments, too.
2014-05-22 18:33:26 +02:00
Axel Dörfler
ee6a0b91b2 FAT: minor style cleanup. 2014-05-22 16:12:37 +02:00
Axel Dörfler
257739f2d4 FAT: improved last fix.
* Don't use filename at all, since it's not clear if puni has already
  been set at this point.
* Also, fixed warning *vnid is ino_t, not a pointer.
2014-05-22 16:09:34 +02:00
Axel Dörfler
e2e54a381b FAT: Fixed some dirent pointer access issues.
* Fixed #9806 which Ingo had analyzed perfectly, but then forgot to
  fix it.
* Fixed CID 603015.
2014-05-22 15:58:37 +02:00
Jessica Hamilton
549fcbf51a Don't delete session objects...
... disc->GetSession() doesn't allocate a new object, so delete
will cause problems later on.
2014-05-22 19:38:55 +12:00
Jessica Hamilton
d1c05d9b22 Revert "Partitioning system: avoid leakage of resource"
This reverts commit f6bd30f2af.
2014-05-22 19:35:48 +12:00
Jessica Hamilton
2e454dffc2 Revert "Fix coding style violation"
This reverts commit 00e081a1ec.
2014-05-22 19:35:36 +12:00
John Scipione
b955a4ca6b BPolygon: Style fixes for documentation. 2014-05-21 16:12:47 -04:00
Stephan Aßmus
82d885a82b app_server: Fix another problem with transformed bitmaps...
... the view rect was clipped to the view bounds in
_DrawBitmapGeneric32(), which is incorrect when affine
transformations are used.
2014-05-21 21:26:38 +02:00
Stephan Aßmus
b944cf31b1 app_server: Fix drawing transformed BBitmaps...
...when the untransformed view rect is partially outside
the view bounds. Untested.
2014-05-21 20:35:56 +02:00
Adrien Destugues
569bd922a6 Add a test that shows bitmap being wrongly clipped.
* The bitmap should cover the same area as the rectangle, but it
doesn't.
2014-05-21 17:02:13 +02:00
Alexander von Gluck IV
2aaeccd9ec autoraise: Toggle not toogle; no functional change 2014-05-20 18:36:31 -05:00
Fredrik Holmqvist
5c62e15f76 Fix bitrot, parent unused error and acpi_object_type union change. 2014-05-20 22:19:43 +02:00
John Scipione
1867d69c8b BPoint: Replace max_c() and min_c() with std::max() and std::min() 2014-05-20 15:48:04 -04:00
John Scipione
e430d19ef6 BPoint: Style fixes for documentation. 2014-05-20 15:47:25 -04:00
John Scipione
c109d7e06f BPictureButton: Style fixes related to documentation
Some variable renaming for consistency.
2014-05-19 20:13:38 -04:00
John Scipione
df48d3f9a8 BPicture: Style fixes related to documentation.
Mostly pointer style adjustments
2014-05-19 20:13:38 -04:00
Adrien Destugues
1d6f73bcbd Follow-up fixes for FillRect+transforms
* Factor out AlignRect to avoid code duplication
* Give the right rectangle to the OverlayHider.
2014-05-19 17:30:49 +02:00
Adrien Destugues
2f9ac9582d Transformation: add one more test
* Add test for a translation that makes things that are out of view
bounds to become visible
* Fix the "rectangles" test to handle scrolling of the view. It seems
that in some cases some of the rectangles are not drawn.

The gradient and bitmap tests currently have problem with view
scrolling, but I'm not sure why.
2014-05-19 14:18:57 +02:00
Adrien Destugues
79eb23a82d Fix handling of filled rectangles with transforms.
The DrawingEngine didn't properly make a distinction between the
rectangle being filled and the damaged region on screen. This led to
unexpected results when using BAffineTransform.
2014-05-19 14:18:56 +02:00
Adrien Destugues
66bce8233a CID 1210936: use after free. 2014-05-19 14:18:55 +02:00
Alexander von Gluck IV
a8f9011015 h2: Fix bluetooth driver build, missing PrivateKernelHeaders
* We likely should move all of this stuff to normal
  atomic test and set operations at some point.
2014-05-18 22:33:56 -05:00
Rene Gollent
fd8693ea29 Debugger: Improvements to crash report generator.
- If debug information is available for a given stack frame, show the
corresponding source file path and line number in the crash report.
2014-05-18 11:05:28 -04:00
Rene Gollent
4abae4aba8 Debugger: Fix #10781.
- Don't attempt to calculate a selection region if we don't currently have a
valid target block. Should fix remaining part of #10781.
2014-05-17 21:41:35 -04:00
Rene Gollent
6053c78a92 Debugger: Fix #10764.
- Destroy the background worker before going after all the managers. Otherwise,
there might potentially still be jobs in flight that might touch them, leading
to crashes.
2014-05-17 21:26:40 -04:00
John Scipione
979af5a8a2 IFSSaver: Don't DirectDraw for preview.
The ScreenSaver window is now a BDirectWindow, but, _DrawFractals() makes
the assumption that a direct window means that the screen saver is running full
screen, so, we need to make sure we draw the preview using the
DrawBitmapAsync() method.

Fixes #10832
2014-05-15 17:42:12 -04:00
John Scipione
f5e32a8614 IFS: Style fixes 2014-05-15 17:41:48 -04:00
John Scipione
49ea2debde IFSSaver: reverse these for consistency. 2014-05-15 17:41:47 -04:00
John Scipione
da679effb4 IFSSaver: remove fBounds variable 2014-05-15 17:41:45 -04:00
John Scipione
664720405e IFSSaver: style fix, check if NULL explicitly 2014-05-15 17:41:44 -04:00
John Scipione
694d9bc1e6 IFSSaver: style fixes 2014-05-15 17:41:39 -04:00
John Scipione
ca7ee40437 IFSSaver: Add some better error checking 2014-05-15 17:40:51 -04:00
John Scipione
3daf447497 IFSSaver: Use single-precision floating point math 2014-05-15 17:40:51 -04:00
John Scipione
71d273ad49 IFSSaver: cast to bigtime_t, not uint64 2014-05-15 17:40:50 -04:00
John Scipione
fd18c60886 IFSSaver: NULL check style fix 2014-05-15 17:40:50 -04:00
John Scipione
98b054fe02 IFS: Style fixes 2014-05-15 17:40:49 -04:00
Adrien Destugues
4c901476bf CID 1210843: useless delete. 2014-05-15 22:57:33 +02:00
Adrien Destugues
0674a9ca80 CID 1210931: missing "default:" in switch. 2014-05-15 22:57:29 +02:00
Stephan Aßmus
e443b44ab8 IFS: Prevent division by zero...
...when the BRect passed to the constructor is not valid.
Should fix ticket #10832. Untested.
2014-05-13 16:47:22 +02:00
Ingo Weinhold
f307a18588 package daemon: Volume: Fix destruction order
We must destroy the VolumeStates before destroying the
PackageFileManager that manages their packages.

Kudos to Rene for analyzing.
2014-05-12 11:30:42 +02:00
Jérôme Duval
c73c8e2367 gutenprint: add gutenprint as a mandatory package.
* use the shared library libgutenprint.so
* remove the xml data files from the tree and the Haiku package.
2014-05-10 13:08:35 +02:00
Jessica Hamilton
4d4fc432b2 PackageFile: correct inverted NULL check. Fixes #10817. CID 1211989. 2014-05-10 11:06:28 +12:00
Jérôme Duval
0584f69356 gutenprint: use outsourced package.
* data files are still in the source tree.
* gutenprint headers contain a image.h header file which collides
with ours. This is solved by forcing include search first on
os/kernel directory.
2014-05-09 20:19:35 +02:00
Joseph R. Prostko
4f08777610 Raise the limit for the maximum VMDK image size
* Raised the limit from 4 GB to 160 GB, as the is the highest I could test
2014-05-08 20:42:11 -04:00
Pawel Dziepak
680ca3b13d runtime_loader: fix CID 1211995, improve generation counting
There is no need to increase generation counter each time new DSO is
registered.
2014-05-08 23:07:50 +02:00
Pawel Dziepak
fad7246fcd runtime_loader: fix CID 1211997, proper corner case handling 2014-05-08 23:07:50 +02:00
Pawel Dziepak
2c001246a0 build: when using gcc4 build kernel with c++11 2014-05-08 23:07:50 +02:00
Pawel Dziepak
578558b439 add-ons/kernel: add spaces between literals and identifiers
Due to introduction of user-defined suffixes C++11 requires that there
is a space between literal and identifier to avoid ambiguity.

This patch makes the whole kernel build successfully with C++11.
2014-05-08 23:07:50 +02:00
Jessica Hamilton
edc6d1558e packagekit: fix using free instead of delete[]. CID 1210827. 2014-05-08 16:41:15 +12:00
Jessica Hamilton
194ce33d65 DynamicBuffer: remove unneeded size check. CID 604168. 2014-05-08 16:41:14 +12:00
Jessica Hamilton
41a9299bb5 BNetEndPoint: fix signedness issues. CID 604169. 2014-05-08 13:48:51 +12:00
Pawel Dziepak
76636769bd kernel/x86_64: inline x86_{read, write}_msr()
This patch makes it possible to inline rdmsr and wrmsr instruction. The
performance impact shouldn't be significant since they are used relatively
rarely and wrmsr is usually a serializing instruction, but there is no reason
not to do so.
2014-05-06 21:41:49 +02:00
Pawel Dziepak
88e8e24c84 kernel/x86_64: improve context switch implementation
The goal of this patch is to amortize the cost of context switch by making
the compiler aware that context switch clobbers all registers. Because all
register need to be saved anyway there is no additional cost of using
callee saved register in the function that does the context switch.
2014-05-06 21:15:55 +02:00
Pawel Dziepak
9db5b975f9 kernel/x86_64: rework of IDT handling code
Similarly to previous patch regarding GDT this is mostly a rewrite of
IDT handling code from C to C++. Thanks to constexpr IDT is now entirely
generated at compile-time.
2014-05-06 14:59:54 +02:00
Pawel Dziepak
2b6d4bc657 kernel/x86: add space between literal and identifier
Due to introduction of user-defined suffixes C++11 requires that there
is a space between literal and identifier to avoid ambiguity.
2014-05-06 14:59:53 +02:00
Pawel Dziepak
cd59bf4349 kernel/x86_64: x86_64 gdt handling code overhaul
Virtually no functional change, just rewriting the code from
"C in *.cpp files" to C++. Use of constexpr may be advantageous but
that code is not performance critical anyway.
2014-05-06 14:59:53 +02:00
Pawel Dziepak
c1dc104960 kernel/x86_64: enable c++11 in x86_64 specific code 2014-05-06 14:59:53 +02:00
Pawel Dziepak
f31c19bb9e libroot/x86_64: relax asm constraints in find_thread() 2014-05-06 14:59:53 +02:00