* BCompressionAlgorithm is a base class for classes that provide
compression/decompression functionality. There are methods for
compressing/decompressing a single buffer and factory methods for
a compressing/decompressing input/output BDataIO.
* BZlibCompressionAlgorithm is a BCompressionAlgorithm implementation
using zlib.
* Use arch-independent format specifiers.
* Print pointers at a fixed length padded with 0s,
length is eitther 8 or 16 depending on pointer width.
* Uppercase titles.
* Add an extra space between Data and Seq# columns to
more clearly show that they represent separate titles.
* Move the Name column last because it is variable length.
This way, all columns line up vertically and the name can
overflow past the end, before a long path would push all
the other columns to the right.
* Make the Name column title is left-aligned, dashes go to
80 cols.
* Use C89 comments and C89 variable declarations.
Screenshot:
http://38.media.tumblr.com/4aea59cf15f8a7c186fc97d62916f38b/tumblr_n7yrw7nwma1r0f0hfo1_1280.png
Also use puts() in place of printf() in a couple places
where no string interpolation takes place.
Replace the variable name "status" with "result", I just like
it better that way for easier grep-ability.
... to use BPathFinder instead of iterating through each of the
(current) add-on directories.
Update copyright header, add myself to authors.
add an ATRACE() of the path once it is found.
Should be functionally identical.
* Removed / after Tracker, thanks Axel.
* BString::FindFirst() returns an index not a status_t so check that
it finds the path at the start of the string (index 0).
* Put paths.CountStrings() in a count variable.
I wanted to clean this code up because I use it as a reference.
- When we explicitly handle sending B_COPY/B_SELECT_ALL, don't
then pass control back to BWindow::DispatchMessage(), as that will
wind up sending the message to the target view twice.
#9882 comment:8 suggested applying a similar fix
to MidiPlayer as the one to Backgrounds, which makes
the menu fields variable width and isn't affected by the
check box.
In addition this replaces BGroupLayoutBuilder and
BGridLayoutBuilder with BLayoutBuilder templates and
replaces hardcoded spacing units with B_USE_ spacing
constants.
I also put the Volume slider on its own line and tightened
up the spacing around the scope view.
picture:
http://31.media.tumblr.com/74d93b806033d9adee83eeb2adead48d/tumblr_n7v06onPdl1r0f0hfo1_250.png
Change the BAlert about box into a BAboutWindow.
Add Authors based on commit logs.
Unfortunately the description contained:
"Haiku MIDI Player 1.0.0 beta\n\n" which means that it
is going to get flagged for re-translation, sorry! This was
bound to happen when the version number changed,
on the bright side it shouldn't happen again in the future
since the Name and version number are separate.
Add Haiku, Inc. for all changes 2008-2014 based on commit logs.
If people want to assign their own copyright for work they did they
probably should add there name to the copyright list.
...instead of hardcoding black.
Only you can prevent hard-coded colors.
Make sure to set both high color and low color so we don't get
anti-aliasing glitches.
Also, use be_control_look->DefaultLabelSpacing() instead of 5.0f.
Only you can prevent hard-coded label spacings.
Also return early if text is NULL (not set).
Fixes a small part of #10840
... matching the rest of the list view borders.
* Don't draw the middle bar in DrawItem(), that already happens in
owner->Draw(), no reason to draw it twice.
* Update copyright header.
* Currently, no command line options are being passed via u-boot
to haiku. However, the comparison doesn't ensure that cmdline
is not an empty string - it merely ensures cmdline is not null.
Signed-off-by: Ithamar R. Adema <ithamar@upgrade-android.com>
* After initializing the page table and enabling MMU,
the pre-MMU stack becomes invalid leading to a fault.
This was fixed by moving the stack to SDRAM as specified
in LOADER_MEMORYMAP before ARM entry point start_netbsd.
Signed-off-by: Ithamar R. Adema <ithamar@upgrade-android.com>
- Isolate the filesystem query/result list building into a separate
worker thread in order to prevent blocking the window thread in
case the query winds up being a bit more time consuming. This
doesn't yet handle intelligent prefetching (and associated can of
synchronization worms), but that will come once time permits.
- Also fixes a missing break statement introduced in the aforementioned
commit, though that one shouldn't have caused any actual harm.
Keep the brief description as a regular comment above each public method.
Leave the docs of private methods.
Some variable renaming mostly because of abbreviations.
Add documentation for all the public methods and app_info members and defines
that didn't have docs in the cpp file.
- If a source file cannot be found, and the user clicks the item to locate it,
Debugger now attempts to query all volumes for the corresponding filename.
If any are found, they are presented in a menu, along with an option to
locate the file manually as before (since the file may potentially live on
an unindexed volume). If no matches are found via query, we fall through to
the file panel directly as before.
* FDDataWriter and ZlibDataWriter weren't used anymore.
* AbstractDataWriter was implemented only by PackageFileHeapWriter,
which was only used by WriterImplBase.
* Add a PackageFileHeapWriter::AddDataThrows() which has semantics
equivalent to the previously inherited WriteDataThrows().
Place Cancel button on left rather than on right in the add
extensions popup. Also add glue to make it more similar to the other
popup windows of the preflet.
DwarfLoadingStateHandler now attempts to locate a matching package for the
missing debug information file. If one is found, the user is prompted to
install it. The actual installation process is currently handled by calling
pkgman, but this will be adjusted in future commits to either rely on
HaikuDepot in the graphical case, or to integrate the requisite functionality
directly so that proper download/installation progress can be shown.
In any case, this completes the low level functionality for ticket #10138,
leaving mainly presentation issues.
Add hook to UserInterface to query if Debugger is currently being run
interactively or not. Add corresponding implementations in
{CommandLine,Graphical}UserInterface.
- Remove duplicate instance of libshared.
- Add linker flags to not export symbols from linked in static libraries.
Resolves an issue on gcc4 where symbols from libedit and libsolv would clash,
leading to crashes.
- Add package kit-related headers and libraries.
No functional changes intended.
* Some variable renaming for clarity and consistency.
* Pointer style fixes.
* Added private method documentation back to cpp files for some methods.
Can be requested/stopped via BPackageRoster::{Start,Stop}Watching().
The notification message has the what code B_PACKAGE_UPDATE and contains
fields "event", "location", and "change count".
We already did this when the URL was entered in the address bar, now
also do it when it comes from a link in a webpage.
Makes mailto links work and fixes#6236.
- When terminating TeamWindow, if InspectorWindow is still active,
ensure that it's also quit at that point. Otherwise, it was
possible for the inspector window to receive the quit message from
the main application's shutdown process after TeamDebugger had
already been terminated, leading to a crash when the window tried to
release its current memory block, since the block manager had
already been destroyed by that point.
Rather than trying to buffer the entire report in memory and write
it in a single shot, write it incrementally as the data is gathered.
Fixes an issue reported by Diver with generating crash reports for
apps that had crashed due to an infinite recursion stack overflow.
Fixes#9593.
The complete name could be stored inside the file or as an additional
attribute, but do we really need it? The bookmark menu will truncate it
even further, anyway.
* Check that the two high-order byte of the DIB header size are 0 (the
largest known size according to wikipedia is 124 bytes).
* This avoids identifying any text file that starts with "BM" as a BMP
file.
Fixes#10912.
Block SIGCHLD in all threads and spawn a dedicated thread that handles
the signal in a loop (via sigwait()). This avoids the issue that the
SIGCHLD could be handled in any of our threads and thus possibly
interrupt a syscall.
Fixes#10941.
* Actually stop the download when the target file is deleted
* Check the download state before sending a notification or changing the
progress bar color.
Fixes#10907.
* In C++03 and earlier, the sign of the modulo result is implementation
defined (this was fixed in C++11).
* Setting a negative time is not what we want here, so make sure we use
the proper value.
* The Install() and Update() versions that take a const char* array
now check whether a string looks like a path to a local package file.
If so, they use that file instead of interpreting the string as a
search string.
* Extend the repository hierarchy. There's now a LocalRepository base
class from which InstalledRepository and the new MiscLocalRepository
derive. The latter is instantiated once and collects all package files
specified by path.
* BFatalErrorException: Add commitTransactionResult property and
respective constructor. In case committing the transaction failed,
BPackageManager throws a BFatalErrorException with the result.
* BFatalErrorException::UserInteractionHandler: Pass
BCommitTransactionResult to ProgressTransactionCommitted().
* BDaemonClient: Move inner class BCommitTransactionResult to top level
and make it public.
* BCommitTransactionResult:
- Add a whole bunch of specific error code enum values. Such an error
code is now the primary error, as opposed to before where we would
mix status_t and enum value errors. There's a systemError property
of type status_t which may provide additional information, though
(depending on the primary error type).
- Remove the errorMessage property. Due to mapping all errors to the
specific error codes this is no longer necessary. Mixing such a
message with another error description is also not very helpful when
it comes to localization (still not supported, though).
- Add several properties (paths, strings, error codes) that serve as
arguments to the primary error and are used by FullErrorMessage().
- Add issues property, a list of instances of new class
BTransactionIssue. Those describe non-critical issues (e.g. failed
update of a settings file) that occurred in the process of
committing the transaction. Those issues should be presented to the
user by the package management program.
* Exception: Adjust to transport the BCommitTransactionResult
properties.
* CommitTransactionHandler, FsTransactions, Root, Volume: Adjust to
BCommitTransactionResult/Exception changes.
* CommitTransactionHandler: Now requires a BCommitTransactionResult to
which it adds the issues it encounters. The reply BMessage is no
longer needed, though.
* Volume: Refactor common code from the three methods that use
CommitTransactionHandler into new method _CommitTransaction.
Add GetPathOrName() and PathOrName() methods which try to get some kind
of usable path or at least a file name for the entry. Useful mainly for
debugging and error reporting cases.
Add a listener interface for LoadImageDebugInfoJob that allows it to request
user assistance based on its current state. Adjust callers to pass in said
listener accordingly.
Implement the aforementioned listener interface in TeamDebugger, and use the
loading state handler roster to find the appropriate handler / handle the request.
This implements most of what's needed for #10138, the main piece still missing
is for the dwarf handler to detect whether the image in question comes from a package,
and if so, to offer to install the corresponding debug information package rather than
locating the file manually, assuming such a package exists.
Adds abstract class ImageDebugLoadingStateHandler which simply contains two
hooks, which allow one to a) ask it if it supports a handling a particular
type of loading state, and b) if so, ask it to attempt to handle that case,
given the passed in user interface object.
Also adds implementing subclass for DwarfImageDebugInfo, currently
intended primarily to handle the case of missing external debug information.
At present, this just supports prompting the user to find/install the file,
but eventually this will be extended to also support automatically installing
the corresponding debug information package, if applicable.
Finally, adds ImageDebugLoadingStateHandlerRoster, which acts as a front end
for matching up a given loading state with the appropriate handler.
In some circumstances, it may be necessary to ask the user to locate a file
from the lower layers. Adds the corresponding hook to UserInterface, and a
stub implementation for CommandLineUserInterface.
Adds full implementation for GraphicalUserInterface.
DwarfFile:
- Loading is now split into two steps, the first of which simply attempts to
verify the presence of debug information. If the latter is referenced
externally, but cannot be found on disk, the corresponding file reference is
returned.
TeamDebugInfo:
- Add state parameter to LoadImageDebugInfo(). Use it to preserve where we
are in the specific info loading loop if necessary.
SpecificTeamDebugInfo:
- Add parameter to CreateImageDebugInfo() to allow passing in a state object
and adjust implementing subclasses accordingly.
DwarfTeamDebugInfo:
- Preserve and/or pass down DwarfFile's loading state as needed.
DwarfManager:
- When attempting to load a DwarfFile, detect the case where external debug
information is referenced, but could not be located. If so, preserve the
relevant details in the loading state, so the user can be notified and
asked to find it accordingly.
LoadImageDebugInfoJob:
- Keep a state object for the progress of the current loading job. If a
particular image fails due to needing user input, suspend ourselves
until such input has been provided.
Adds a hierarchy of classes for preserving the loading state information for
a LoadImageDebugInfoJob. These include:
- ImageDebugInfoLoadingState:
Top level class that simply stores a reference for the specific info
state that we're currently attempting to load.
- SpecificImageDebugInfoLoadingState:
Abstract base class representing state information specific to a
particular kind of debug information.
- DwarfImageDebugInfoLoadingState:
Implementation of the above for the case of DWARF.
- DwarfFileLoadingState:
Encapsulates the in-progress loading state of a DWARF file for the case
where a file's debug information is referenced externally, but cannot
be found.
- In addition to waiting for one or more dependent jobs to complete,
a job can now potentially wait for user input to proceed further. Add
a corresponding job_wait_status and respective handling in Worker.
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.
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...
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.
* 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!
* 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.
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.
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
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.
* 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.
* 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.
* 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.
* 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.
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.
... 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
* 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.