46973 Commits

Author SHA1 Message Date
Ingo Weinhold
3209bc40c5 BPathMonitor: PathHandler::_NotifyTarget(): simplify
* Add optional entry_ref return parameter to _HasFile().
* Simplify _NotifyTarget() by using _HasDirectory() and _HasFile().
2013-06-27 21:57:41 +02:00
Ingo Weinhold
ddd775f5ac BPoseView::FSNotification(): fix issue in debug build 2013-06-27 21:57:41 +02:00
Ingo Weinhold
77ca66cdb7 BPathMonitor: make the node watching mechanism configurable
Add inner class BWatchingInterface and method SetWatchingInterface().
This abstracts the calls to watch_node() and stop_watching(), thus
making it possible to use the path monitor in Tracker.
2013-06-27 21:57:41 +02:00
Ingo Weinhold
ad1875fd70 BPathMonitor: use pthread_once for initialization 2013-06-27 21:57:40 +02:00
Ingo Weinhold
6ca95bd813 PathMonitor.cpp: some style cleanup 2013-06-27 21:57:40 +02:00
Ingo Weinhold
62b0b64124 BStringList::Add(): fix ref counting problem
Handle the case that the private data of the given string is not
shareable.
2013-06-27 21:57:40 +02:00
Ingo Weinhold
5fa3519dec BString::Private: Add IsShareable() 2013-06-27 21:57:40 +02:00
Ingo Weinhold
2752612bc6 BMergedDirectory::GetNextDirents(): fix end-of-list return value 2013-06-27 21:57:40 +02:00
Ingo Weinhold
535207ae9a BPoseView::AddPosesTask(): fix count checks
In case GetNextDirents() returned an error, the wrong blocks were
executed.
2013-06-27 21:57:39 +02:00
Ingo Weinhold
105511275e Move PUuid from shared to support 2013-06-27 21:57:39 +02:00
John Scipione
91a5e06148 ExpressionParser: Fix parse exception string
The main point of this commit is to fix this line:

temp << (char)type << "' got '" << token.string << "'";

which gets printed when DeskCalc encounters a parse error.

Specifically the (char)type part needed fixing.

This code would try to print the char equivalent of a token which got
converted to lower ascii character between 0 and 15. This would at
best result in a newline and never anything helpful.

I took the germ of idea and expanded upon it reassigning the TOKENs to the
numeric values of the printable characters they represent where applicable.
For instance TOKEN_STAR now has a value of 42 which is ascii for '*'. By
using implicit char -> int conversion the numeric value is avoided in the code.

So now (char)type will, in many cases get you the equivalent ascii char
represented by that type. Those that don't such as TOKEN_IDENTIFIER and
TOKEN_CONSTANT are special cased.

Once the TOKEN's values correspond to their ASCII equivalents some other
simplifications became possible interchanging the TOKEN and the character
it represents.
hrev45796
2013-06-26 19:21:09 -04:00
John Scipione
51f758db3f DeskCalc: Style fix, add space around binary op 2013-06-26 19:19:31 -04:00
John Scipione
31650fd465 DeskCalc: Limit precision of large magnitude results
This targets a problem where a numbers with large numbers of non-decimal
significant digits took a long time to round after converting to scientific
notation because they are rounded one character a time.

To solve this, after converting to scientific notation lop off everything
after 40 characters greatly reducing the amount of further rounding
needed.

An example I used to test this was to calculate 10,000! which gives
a result with 35660 significant non-decimal digits (aka a lot). By loping
off numbers after 40 characters before rounding to fit the operation goes
from ~10 seconds to complete to under a second.

I chose 40 as a max as it is large enough to ensure that the result will
get rounded with some leeway provided for font width variations.
Worse-case scenario is the result is off by 1 in the last place.

Numbers with large numbers of significant decimal digits get rounded
by MAPM so aren't a problem.
2013-06-26 19:19:21 -04:00
John Scipione
f9d2a8cb25 DeskCalc: Remove extra FrameResized() call.
BView::ResizeTo() calls FrameResized() which resolves to the virtual
FrameResized() method in CalcView. So, FrameResized() was
getting called twice.
2013-06-26 18:10:54 -04:00
John Scipione
d81cbcf359 DeskCalc: tiny whitespace style fix 2013-06-26 18:08:23 -04:00
Jérôme Duval
a83b0c51c0 pci: memory behind bridge wasn't padded correctly. hrev45795 2013-06-26 22:27:56 +02:00
Jérôme Duval
b9a31d3e18 xhci: 64bit fixes.
* some coding style fixes.
* adjustments to make use of phys_addr_t where needed.
hrev45794
2013-06-26 21:45:06 +02:00
Jérôme Duval
691f8e5a27 ehci: initializes fItdEntries and fSitdEntries. 2013-06-26 21:45:03 +02:00
Rene Gollent
54574eda59 Correct locking error. hrev45793 2013-06-25 20:35:09 -04:00
Rene Gollent
bbbe023af3 InspectorWindow: slight behaviorial tweak in failure case.
Don't release the reference to the current block until we get the
notification that the next block has been retrieved. Otherwise, the
previous/next block buttons would cease to work if the requested block
failed to be retrieved.
hrev45792
2013-06-25 18:03:49 -04:00
Rene Gollent
b906e10a5d Fix crash in InspectorWindow.
- In the case where retrieval of a memory block failed, InspectorWindow
didn't handle the notification. Consequently, it never removed itself as
a listener from the failed block, nor did it release its reference for
it. Consequently, if one attempted to retrieve data from the same block
again, walking the listener list would crash due to the already-deleted
entry in the list.

- The success case had the same problem with regards to not removing its
listener, but was masked by virtue of the inspector currently being the
only user of the memory block manager, so in the latter case the blocks
would be properly released/destroyed and the aforementioned walk would
never occur.

- Adjust locking a bit to ensure that manipulating the listener list
always happens with the team lock held.

- Style fixes.
hrev45791
2013-06-25 17:42:06 -04:00
Rene Gollent
2214cb57ee Fix regression introduced in 21d8063.
We can't use BPath to get the filename for the source file path embedded
in the debug information, since it may be relative, which BPath will try to
normalize.
hrev45790
2013-06-25 17:00:54 -04:00
Jérôme Duval
8a690c4914 acpi: fixed namespace dump, last written data weren't displayed.
* added a copyright header.
* fixed includes order.
* don't return early on B_BAD_SEM_ID as it means the writer has finished,
but there can be data to read.
* free resources in acpi_namespace_free() instead of acpi_namespace_close().
hrev45789
2013-06-25 18:11:41 +02:00
Alexander von Gluck IV
eb6f09d2fc route: Add preferred prefix formats per protocol
* As per mailing list discussions
hrev45788
2013-06-24 18:54:24 -05:00
Alexander von Gluck IV
2e8bac6bce route: Update Next Hop to Gateway as per ML 2013-06-24 18:28:07 -05:00
Alexander von Gluck IV
4dff02682c Revert "debuganalyzer: Fix double free. CID 992566"
This reverts commit ea27e95f489fbb29cedad74788ee607b331f8a2f.

* AnEvilYak pointed out that this was a false positive as
  BObjectList can optionally delete on remove.
* I'll add a penny to the bitcoin bad commit jar :)
hrev45787
2013-06-24 16:29:04 -05:00
Alexander von Gluck IV
ea27e95f48 debuganalyzer: Fix double free. CID 992566
* RemoveRow frees row, thus the delete isn't
  needed.
hrev45786
2013-06-24 15:22:37 -05:00
Alexander von Gluck IV
27938cb64f virtio bus: Fix resource leak. CID 1032283
* bus is allocated but not deleted and not used
  after an error
2013-06-24 15:18:23 -05:00
Jérôme Duval
b027a0a2f7 pci: change offset type to uint16 in config space API.
* The config space is larger than 255, we need to use an uint16 to access
offsets superior or equal to 256. The current API only proposes an uint8 for this.
This change switches the offset parameter to the uint16 type. Axel hinted that
the used values are the same with such a change (the doc says sign extended to 2 or
4 bytes).
I checked with GCC2 and it's indeed the case when inspecting the memory.
With GCC4, instructions are the same on function call.
* prints info about extended capabilities.
* struct pci_module_info and struct pci_device_module_info are extended with
pci_find_extended_capability().
hrev45785
2013-06-24 19:29:00 +02:00
Philippe Saint-Pierre
0ebfc3e032 Tracker: remove superflous separator item in ContextMenu #6997 hrev45784 2013-06-23 16:05:12 -04:00
Philippe Saint-Pierre
89d2bf3aa7 People: allocate BFile on stack hrev45783 2013-06-23 13:46:42 -04:00
Rene Gollent
dc5cd9e4db Style fix. hrev45782 2013-06-23 13:06:50 -04:00
Oliver Tappe
ece582547a Improve robustness of asctime() and asctime_r().
* Return NULL and set EINVAL if the given tm pointer is NULL. This 
  isn't mandated by the POSIX base specs, but it just makes sense.
2013-06-23 17:01:12 +02:00
Oliver Tappe
51bce887cd Fix behaviour of localtime(), gmtime() and mktime().
* In case the locale backend could not be loaded, these functions (and
  their reentrant counterparts) just returned an error. So we reactivate
  parts of the BSD-/Olson-implementation in localtime_fading_out.c in
  order to use them as fallback.
* Cleanup localtime_fading_out.c (remove a lot of unused cruft).
2013-06-23 16:43:23 +02:00
Rene Gollent
6eb68a0430 Slight tweak to inactive instruction pointer highlight color. hrev45781 2013-06-23 08:10:10 -04:00
Jérôme Duval
20da79d7da pci: fixed ppc build
* removed default parameter value, this interface is used by C code.
hrev45780
2013-06-23 12:40:37 +02:00
Oliver Tappe
b4dc51b39a Fix behaviour of towlower(), towupper() and towctrans():
* all those functions need to return the given wc unchanged in case of
  error, not 0
* towctrans() didn't actually look at the requested transition, but 
  always acted as if _ISlower was given
2013-06-23 11:45:38 +02:00
Philippe Saint-Pierre
a09c983cc6 People: open files in READ_WRITE mode only when necessary. (#5791) hrev45779 2013-06-22 19:46:40 -04:00
Rene Gollent
b1975a590f Implement #9775.
- When possible, SourceView now adds a context menu option to switch
between source and disassembly. If the disassembled code is not yet
available, it is asynchronously requested. Adjusted SourceView::Listener
and implementing subclasses accordingly to make that request feasible.

- Adjust TeamWindow to correctly deal with the possibility of the
function source code being available but not loaded.
hrev45778
2013-06-22 16:01:58 -04:00
Rene Gollent
442f71a7d9 Extend FunctionSourceCodeRequested().
Now takes an optional boolean parameter to indicate that disassembly is
explicitly being requested. Adjust TeamDebugger and LoadSourceCodeJob's
implementations accordingly.
2013-06-22 15:48:17 -04:00
Jérôme Duval
26a4510e59 pci: added pci_find_extended_capability().
* added PCI Extended Capabilities definitions.
* pci_find_capability() parameter offset is now optional.
hrev45777
2013-06-22 19:48:56 +02:00
Jérôme Duval
e1c44764ef pci: switched PCI::[Read|Write]Config to type uint16 for the offset. 2013-06-22 19:48:54 +02:00
Jérôme Duval
ce353e5d6e pci: added pcie mechanism for config space access.
* pci-acpi.cpp is based on the bootloader bios_ia32/acpi.cpp. The ACPI module
has already a dependency on the PCI module. Using pci-acpi.cpp eases the simple
task of finding the PCIe base address to map the config space.
* pci_read_config and pci_write_config in pci_controller.h were using an uint8
for offsets in the config space. Switched to uint16 to enable access to the extended
config space (0x100 and upper). Added a check for these offsets in
pci_mech[1|2]_[read|write]_config() for x86 and other platforms as these mechanisms
don't support a priori the extended config space.
2013-06-22 19:48:54 +02:00
Niels Sascha Reedijk
bc7a518375 Update translations from Pootle hrev45776 2013-06-22 06:16:11 +02:00
Rene Gollent
ecd9ecb132 Add missing error check. hrev45775 2013-06-21 18:54:55 -04:00
Rene Gollent
21d8063591 Slight tweak to located file handling.
- When the user helps locate a missing source file, verify that the
source and located file names match. If they don't, prompt the user to
verify that they did in fact intend to choose the file in question.
Helps avoid accidentally clicking the wrong file when performing
location.
2013-06-21 18:54:55 -04:00
Rene Gollent
143fdaf7cf Style fix. 2013-06-21 18:54:54 -04:00
Pawel Dziepak
06dc1b57d4 nfs4: Fix double free when NFS4Inode::ReadDirOnce fails hrev45774 2013-06-20 15:05:30 +02:00
Pawel Dziepak
6e375b85bd nfs4: Remove assertion against NFS4ERR_NOFILEHANDLE
According to the NFS4 specification NFS4ERR_NOFILEHANDLE is returned only
when the clients sends malformed request. FreeBSD nfsd implementation chooses
to ignore that fact and returns this error code also for correctly formed
requests that it can not service due to the restrictions in the server
configuration.
2013-06-20 15:03:08 +02:00
Rene Gollent
77d2c53ce7 Slight tweak to instruction pointer highlight drawing.
- When highlighting lines that match IPs in the current stack trace,
draw those which aren't from the currently selected frame in a lighter
color, so as to make it more clear which is which when multiple calls
are visible at once.
hrev45773
2013-06-19 18:38:20 -04:00