Commit Graph
100 Commits
Author SHA1 Message Date
Axel Dörfler 634feff0e9 Cut off the trailing spaces from the key dump.
* Noticed these on the keymap changes made by John, however, I have no
  idea how they did get there (the keymap command doesn't use this code).
2012-11-05 13:34:58 +01:00
Axel Dörfler 095d038578 Reverted hrev42962 - there is no right command key in US internatinal.
* This makes the keymap behave as in every other operating system.
* I don't really understand the original purpose of this change. Please
  enlighten me (see #4464).
2012-11-05 13:29:52 +01:00
Axel Dörfler 17ad59afd3 Added BLayoutBuilder::{Group|Grid}::SetExplicitAlignment(). 2012-11-05 12:50:04 +01:00
Axel Dörfler 762e4ecaff BMessage::Append() is now actually working. 2012-11-05 12:50:04 +01:00
Axel Dörfler 9e42a44cad Added BPath::IsAbsolute() method. 2012-11-05 12:50:03 +01:00
Axel Dörfler 09d87d9151 The text control is now more flexible with its layout items.
* Before, you had to have both, the text view layout item, and the label
  layout item or else nothing would ever be visible.
* Now you can only create the text view item, and it will still work.
* Also, no matter the order you added the layout items, they would always
  put the label on the left, and the control to the right.
* You can place the label and text view layout items anywhere now, although
  you should keep in mind that the view spans over their frame unions; IOW
  they should always adjacent to each other, but not necessarily horizontally
  and left to right.
* No longer uses a fixed label spacing, but utilizes
  BControlLook::DefaultLabelSpacing() instead.
* However, the spacing is always added to the right of the label, no matter
  how you place it in the layout. Maybe one wants to add a SetLabelTextViewGap()
  like method.
2012-11-05 12:50:02 +01:00
Axel Dörfler 6643ead593 Made the BRect::*Copy() methods const as they should have been. 2012-11-05 12:50:02 +01:00
Axel Dörfler 2267b7e7fb Added Grid::AddGlue(), and SetExplicit*Size() methods. 2012-11-05 12:50:01 +01:00
Axel Dörfler 4656e550b0 Added method SetExplicitSize() for convenience. 2012-11-05 12:50:00 +01:00
Axel Dörfler d2c8db267d Just ignore unknown ELF program headers instead of failing.
* This fixes loading executables with a TLS section (which we do not support
  so far, though). Still, no reason to let the runtime loader choke on it.
2012-11-05 12:18:46 +01:00
Axel Dörfler 0a361580ad Added HDA quirks for enabling snoop.
* Enabled snoop for all Intel hardware as found in the Linux driver.
* This fixes #8949.
2012-11-05 10:13:32 +01:00
Axel Dörfler de62b051e4 Disabled HDA MSI for now again.
* At least on my hardware, audio becomes a bit flaky (ie. sometimes it would
  just stop doing anything at all).
2012-11-05 10:02:13 +01:00
Axel Dörfler 6e50e79e54 Added Get*()/Set*() methods like the ones from KMessage. 2012-11-03 11:54:21 +01:00
Axel Dörfler 87e7009019 Style cleanup. 2012-11-02 23:42:31 +01:00
Axel Dörfler 009fd25715 Added BMessage::Append(), and new(std::nothrow_t).
* Append() copies all fields from the specified message.
* The nothrow operator new allows you to add BMessages to a BObjectList.
2012-11-02 23:42:29 +01:00
Axel Dörfler 5262b98eab Converted the promise_tx2 driver to the device manager.
* This is part of ticket #9087. I have not added it to the image yet, before
  it's getting tested, though.
2012-10-26 12:18:42 +02:00
Axel Dörfler adf340f0ed Style cleanup. 2012-10-08 13:59:16 +02:00
Axel Dörfler 9b9cb227c7 Consolidated and fixed device_geometry computation.
* The only implementation that would accept more than 2 TB was the one in
  scsi_disk. But even that one was limited to 63 TB.
* Now there is a new utility function devfs_compute_geometry_size() which
  does it correctly for sizes up to 2^64 which should be good enough for
  quite some time :-)
* This fixes bug #8992.
2012-10-08 13:59:16 +02:00
Axel Dörfler a8b45a3471 Added a test to compare various header parsers.
* HaikuMailFormatFilter is using the new extract_from_header() method
  to retrieve its fields, but that one is often rather slow in comparison.
* Added a test parse_fields() method that outperforms it considerably.
2012-10-01 10:20:44 +02:00
Axel Dörfler 225c8cc59a Minor cleanup, no functional change. 2012-10-01 09:12:32 +02:00
Axel Dörfler 41828f1567 Cleanup, no functional change intended. 2012-09-23 20:39:21 +02:00
Axel Dörfler 25b89454c4 MSI interrupts were not disabled on error. 2012-09-23 20:33:25 +02:00
Axel Dörfler 0e662af473 Always set a minimum size for the list view.
* Otherwise it doesn't look good when the media server is just
  being launched (so there are no nodes yet).
2012-09-23 15:50:42 +02:00
Axel Dörfler 1c0cacfbc5 Cleanup.
* Sort methods like they are declared in the header.
* Fixed a number of coding style violations and other oddities.
2012-09-23 15:44:21 +02:00
Axel Dörfler baeb048bd1 Don't start showing the hint for each solved number.
* Instead, only keep it visible when the user made it visible.
* Minor cleanup.
2012-09-23 11:23:29 +02:00
Axel Dörfler 19559d24fc Reset controller::active_codec on uninit.
* The controller structure is static, so if you closed the device,
  and the driver failed to initialize correctly (ie. finds no codec)
  on the second try, it would have crashed accessing an already freed
  codec.
* Not sure why it fails to detect any codecs on second open, yet,
  though.
2012-09-23 11:16:28 +02:00
Axel Dörfler 751c6aba1c Fixed saving the column state to a message.
* This fixes copy/pasting the column state when the "display-as"
  feature is used.
2012-09-23 08:31:37 +02:00
Axel Dörfler 45732903d0 Implemented MSI support.
* Does not seem to change anything, though (I'm also a victim of bug
  #8949)
* Minor cleanup.
2012-09-21 00:22:54 +02:00
Axel Dörfler 8c3a938fc3 cache_abort_sub_transaction() did not maintain num_blocks.
* When a block was only used in a sub-transaction, it was thrown away,
  but the transaction::num_blocks field was not decremented.
* This caused transactions never considered finished which eventually
  led to bug #8942. This does not explain the disk corruption occurring
  in #8969, though.
2012-09-19 20:06:19 +02:00
Axel Dörfler 267b646396 Run the transaction flusher in another thread.
* This fixes bug #8977.
2012-09-12 20:20:43 +02:00
Axel Dörfler 7d362bb34c The sFragmentLock was never being initialized.
* This fixes bug #8958.
2012-09-09 22:53:19 +02:00
Axel Dörfler 5c69b8405b Added fallback model string parsing for Intel CPUs.
* When we do not have a predefined model string, we now try to parse
  the reported model string into something that is at least usable,
  and should look comparable to what we have now.
* For models where the parsed type string is acceptable, we could remove
  the predefined ones.
2012-09-06 22:09:42 +02:00
Axel Dörfler f1cbaf5c8f Fixed warnings, 80 character line limit. 2012-09-06 22:09:42 +02:00
Axel Dörfler 098967cee1 Fixed the new issue in #8910 from r44585.
* The ASSERT() I introduced in r44585 was incorrect: when the sub transaction
  used block_cache_get_empty() to get the block, there is no original_data for
  a reason.
* Added a test case that reproduces this situation.
* The block must be moved to the unused list in this situation, though, or else
  it might contain invalid data. Since the block can only be allocated in the
  current transaction, this should not be a problem, though, AFAICT.
2012-09-04 01:00:33 +02:00
Axel Dörfler 713945cecb The original_data could be freed late.
* In cache_abort_sub_transaction(), the original_data can already be freed
  when the block is being removed from the transaction.
* block_cache::_GetUnusedBlock() no longer frees original/parent data - it
  now requires them to be freed already (it makes no sense to have them still
  around at this point).
* AFAICT the previous version did not have any negative consequences besides
  freeing the original data late.
2012-08-27 20:00:06 +02:00
Axel Dörfler 242e01d245 Improved member variable naming as suggested by Stippi. 2012-08-27 20:00:06 +02:00
Axel Dörfler 9089ab06bd Minor block cache refactoring.
* Extracted a write_blocks_in_previous_transaction() function out of
  cache_end_transaction(), and cache_detach_sub_transaction().
2012-08-27 12:46:22 +02:00
Axel Dörfler dd9d610500 Fixed broken block list introduced in hrev44357.
* cache_abort_sub_transaction() was setting the transaction_next pointer to
  NULL in order to remove a block from a transaction -- however, it forgot to
  actually remove it from the transaction's block list.
* Minor restructuring.
2012-08-27 12:42:48 +02:00
Axel Dörfler 153d895337 Fixed broken discard handling in cache_start_sub_transaction().
* This actually resolves a TODO.
2012-08-27 12:38:35 +02:00
Axel Dörfler 8f9dac699d Cleanup, no functional change intended. 2012-08-27 11:21:42 +02:00
Axel Dörfler c95601d728 Fixed hiding the mouse cursor after going full screen.
* This fixes a regression I introduced in hrev43648; the mouse cursor
  was only being hidden in case the controls were visible (ie. only
  after an extra mouse move in full screen).
2012-08-25 13:57:50 +02:00
Axel Dörfler c95f35ce9d Fixed 64 bit issue for the buffer descriptor base. 2012-08-23 22:01:19 +02:00
Axel Dörfler 752f5c972f cache_abort_[sub_]transaction() did not work correctly.
* cache_abort_transaction() left the block dirty which was causing bug
  #8123 as well.
* cache_abort_sub_transaction() did, in addition to not clearing the dirty
  flag, not reset the block's transaction member either if the block was
  not part of the parent transaction.
2012-07-20 00:03:38 +02:00
Axel Dörfler 0579a69564 Added a bit of documentation, minor cleanup.
* Documented the cached_block::transaction, and previous_transaction
  members.
2012-07-20 00:03:37 +02:00
Axel Dörfler ff09c7bfdf Now is transparent on the desktop as other replicants. 2012-06-26 23:48:01 +02:00
Axel Dörfler d6e44a2a3a Fixed BootLoaderTest build and debug build. 2012-06-18 21:52:30 +02:00
Axel Dörfler 90f510906d When the value hint mode is active, keep it active.
* Ie. when a different value is pressed, the hint is now being shown for
  the new value instead of turning of the value hints.
2012-06-18 21:52:29 +02:00
Axel Dörfler 7b2ba07326 The size control now actually sets the size instead of the offset.
* SizeSlider::MaxPartitionSize() also now returns the size instead of the end
  offset.
* Renamed CreateParamsPanel::_UpdateTextControl() to _UpdateSizeTextControl().
* Removed code duplication, and instead just call _UpdateSizeTextControl()
  twice.
* Minor other cleanup.
2012-06-17 20:04:39 +02:00
Axel Dörfler 2ffea8e8a3 Minor cleanup, no functional change. 2012-06-17 20:04:37 +02:00
Axel Dörfler 2996f64881 Implemented a value hint, changed colors.
* When you press on a value, that value will be shown with a
  highlighted background across the board until another value is set.
* Changed the colors to those from the Haiku logo rather than the BeOS
  logo. This makes it a bit more colorful which one might need to get
  used to -- comments welcome.
2012-06-06 00:35:51 +02:00
Axel Dörfler 0ba36860ad Added a few convenience methods. 2012-06-06 00:34:51 +02:00
Axel Dörfler bea2387b68 Made constants static, coding style cleanup. 2012-06-05 23:15:54 +02:00
Axel Dörfler 0084fa5209 Reverted the rounded buttons again.
* Following the previous discussion on the mailing list and Stippi's final mail.
* I tried to get used to it in the last couple of weeks, but I think it just
  looks out of place, and not good either.
2012-05-30 23:36:03 +02:00
Axel Dörfler 712fdb70b2 Style cleanup. 2012-05-30 23:36:02 +02:00
Axel Dörfler d6e44c9c82 If all fields for a specific value are set, mark it.
* In this case, the value is drawn a bit less intense than incomplete values.
* Make the keyboard focus background color depend on the actual background
  color.
* No longer allow to drag remove random hint values after removing a value
  from a field.
2012-05-30 23:36:02 +02:00
Axel Dörfler 3a1a1e1b82 Style cleanup. 2012-05-30 23:36:01 +02:00
Axel Dörfler 936b7fe433 Fixed a possible FD leak, CID 702009. 2012-05-25 01:40:31 +02:00
Axel Dörfler 52a5878b74 Added command line programm to rename/move attributes.
* Called mvattr, move is not yet implemented which is why it's not part of
  the image yet.
* Defaults to rename, moving attributes needs an extra option.
* Suggestions welcome :-)
2012-05-06 16:55:36 +02:00
Axel Dörfler a2e15b244f Changed the default background color to the system default. 2012-04-30 22:45:38 +02:00
Axel Dörfler 8e2140fa5e Fixed a large client side memory leak for app_server memory.
* The areas allocated for BBitmaps were never deleted, even though the
  app_server deleted its part when the memory got freed.
* This resulted in a constant memory increase if the application in question
  would operate on many changing large bitmaps, like photos.
* Since the bitmaps are reference counted, we don't actually know when to delete
  the areas, so that the app_server now notifies the client whenever that is
  possible.
* This might fix #6824.
2012-04-29 20:26:14 +02:00
Axel Dörfler 7705d517d1 Lock in ClientMemoryAllocator::Allocate(), and Free().
* Since bitmaps are reference counted, it might not be easy (and already not
  the case) that holding the ServerApp lock can be enforced.
* To be on the safe side, allocations and freeing memory now performs its own
  locking.
* Brought the documentation to the status quo.
2012-04-29 20:26:13 +02:00
Axel Dörfler 6068e43923 Optimized freeing client memory if it spans the whole area.
* If a block of client memory spans the whole chunk, there is no need to walk
  the free list for adjacent blocks to join.
* Minor cleanup.
2012-04-28 23:35:17 +02:00
Axel Dörfler 2f2f3fa042 Moved stable tool tip concept into the BToolManager class.
* This removes the fVisibleToolTip member from BView, and fixes bug #5669;
  BToolTipManager::ShowTip() now gets the owner of the tool tip as an extra
  parameter.
* Removed the work-around to hide that bug.
* Improved ToolTipTest application to include more test cases like a view that
  periodically update its tool tip via SetToolTip(const char*), and one that
  sets a new tool tip every second.
* Furthermore, added a test that shows that inner views inherit the tool tip
  of their parents.
* Fixed another bug in BToolTipManager::ShowTip() that would release an
  extra reference to the tool tip currently shown.
2012-04-28 22:14:03 +02:00
Axel Dörfler f790fa299e Added a tool tip for the detailed progress info.
* Got rid of the parentheses around the progress text.
* Automatic whitespace cleanup.
2012-04-28 22:14:02 +02:00
Axel Dörfler 254640bfcd Remove the tool tip if an empty or NULL string is set. 2012-04-28 22:14:01 +02:00
Axel Dörfler 6ea60bcdba This must be a 64 bit computation for disks larger than 4GB.
* This closes ticket #8460.
* Patch from jahaiku, thanks!
2012-04-15 13:32:19 +02:00
Axel Dörfler 8175a2c342 Fixed warning. 2012-04-01 13:06:59 +02:00
Axel Dörfler 8f7ec006cb We need to remove the tree from the transaction. Fixes #3159.
* The tree does keep a reference to the inode as well as long as it is part
  of a transaction.
* Even if it wouldn't have done it (and would not have triggered the panic),
  Haiku would likely have crashed, as the inode (and therefore its tree) was
  already deleted at the time when the transaction discarded its listeners.
2012-04-01 13:04:36 +02:00
Axel Dörfler 15f4dcd831 The inode must be write locked. Dunno how that could work before. 2012-04-01 11:30:58 +02:00
Axel Dörfler 7fef0374fe Make sure it isn't part of a transaction upon destruction. 2012-04-01 11:30:58 +02:00
Axel Dörfler 8cf89e5cd3 Minor cleanup. 2012-04-01 11:30:57 +02:00
Axel Dörfler 5868dfb989 Reverted r43922, and instead improved bfs_block_runs command.
* Calling FindBlockRun() would only work for the direct range anyway, as it
  would need to call into the block cache for anything else.
* bfs_block_runs now accepts a few more arguments that make finding an offset
  much easier.
2012-04-01 00:43:49 +02:00
Axel Dörfler b5310b1638 Fixed another bug I introduced with r43837.
* Really the same thing, just for fragment nodes this time.
2012-04-01 00:43:48 +02:00
Axel Dörfler dcfb930a98 Improved bfs_inode KDL command. 2012-03-31 23:13:05 +02:00
Axel Dörfler e109dcf97b Don't bail out just because a node couldn't be read.
* Added a new CachedNode::SetTo() variant that actually returns an error code.
* Only bail out if there was an actual I/O error, not already if the offset
  was invalid.
* This should help fixing some corruption corner cases.
2012-03-31 21:57:55 +02:00
Axel Dörfler bae8d9ab83 Reset the counter after each pass. 2012-03-31 21:57:14 +02:00
Axel Dörfler 7a085ce095 Fixed debug build of the kernel emulation. 2012-03-31 21:27:55 +02:00
Axel Dörfler cb8941c48f We must not check the node here.
* The node might not be a normal tree node, so we must not check it before
  writing.
* Also, it's always a good idea to check if the function you called didn't
  succeed.
* This fixes a crashing bug when running checkfs in some rare circumstances.
2012-03-31 17:00:02 +02:00
Axel Dörfler e0927e2c44 Improved debug output. 2012-03-31 16:46:07 +02:00
Axel Dörfler 624b5ef3e6 Minor cleanup. 2012-03-31 15:49:02 +02:00
Axel Dörfler 657e62d222 Fixed the invalid duplicate left over nodes.
* Accidently introduced that bug in r43837; the arrayCount variable was not
  being updated after the value got removed.
2012-03-31 15:45:21 +02:00
Axel Dörfler 55e5a42d73 Fixed misuse of Transaction::Split().
* This would cause "transaction too large" messages, and repairing the index
  would actually be thrown away.
* We now properly finish/restart transactions instead which is actually
  working.
* Removed the misleading Split() method altogether, as it's not even used
  anywhere (not very surprising given that it doesn't do what its name
  suggests).
2012-03-31 15:14:46 +02:00
Axel Dörfler 0f94d73aaa Make PrepareIndices() fail if there isn't anything left to do. 2012-03-31 15:14:09 +02:00
Axel Dörfler 97b80db250 Fixed a possible KDL; the inode might be NULL.
* This happens in case the inode could not be opened in the first place.
2012-03-31 14:25:43 +02:00
Axel Dörfler 439495d8d4 Inode was leaking its small data lock.
* This should not have harmed normal operation (as an Inode is only destroyed
  when it is no longer being used), but the fs_shell could run out of
  semaphores easily.
2012-03-31 14:25:42 +02:00
Axel Dörfler 09ec0ad9c3 Also report errors when the free list is broken.
* This will cause the whole B+tree to be rewritten in that case, too.
* Added a TODO comment that describes an alternative solution for this.
2012-03-31 14:25:42 +02:00
Axel Dörfler a300055ed7 Minor cleanup. 2012-03-31 10:36:36 +02:00
Axel Dörfler ce17af69dc Implemented repairing index b+trees.
* There are now two passes in case a corrupted index tree has been found.
* The second pass will clear the affected indices at first, and will then walk
  over all inodes again to fill them.
* As a side effect, this will also defragment the indices; ie. the same
  mechanism could be used for this some day.
2012-03-31 10:36:35 +02:00
Axel Dörfler 1674a53a45 Added recursive_lock_transfer_lock() to the fs_shell. 2012-03-31 00:09:47 +02:00
Axel Dörfler 225e1b1190 Minor cleanup. 2012-03-31 00:09:46 +02:00
Axel Dörfler aed54a9a46 Use ID() instead of BlockNumber() for the debug output. 2012-03-31 00:09:46 +02:00
Axel Dörfler b81ce43017 Made fLock a recursive lock instead of a mutex.
* This should fix bug #8069.
2012-03-31 00:09:45 +02:00
Axel Dörfler fd8b9d4326 Added a recursive_lock_transfer() function. 2012-03-31 00:09:45 +02:00
Axel Dörfler 17f695029a No need for 'else' after return. 2012-03-31 00:09:45 +02:00
Axel Dörfler 647cff2e59 Imported BFS-Tools (without docs), added bfsinfo to the image.
* The sources are unchanged, and most of it doesn't follow Haiku's coding
  style -- stuff that I updated over the years might also have seen a coding
  style update.
* This was also the basis on which Haiku's BFS has been written.
* In the long run, the stuff in 'lib' that is already part of BFS should
  be removed, and used directly from BFS itself.
* I haven't yet added any other of the tools to the image. Not sure if they
  are ready for inclusion yet; 'recover' could also be renamed to reflect that
  it is BFS specific.
2012-03-26 22:48:07 +02:00
Axel Dörfler 87d5beae86 Made the duplicate_array endian safe. Cleanup.
* Renamed the sorted_array to duplicate_array (which was only a typedef
  before), and moved it into the BPlusTree.cpp file, as its specific to
  that one.
* Utilities.cpp is no longer needed.
* Introduced endian safe getters/setters so that little endian BFS volumes
  should now work fine on a big endian architecture.
2012-03-09 21:18:35 +01:00
Axel Dörfler 6307c1ebb1 Minor whitespace cleanup. 2012-03-09 21:18:34 +01:00
Axel Dörfler 08601a8488 Added support for reporting invalid B+trees.
* Fixed the inode progress not being overwritten by the final stats.
* Minor cleanup.
2012-03-07 01:55:02 +01:00
Axel Dörfler 49a2067a17 When running checkfs, BPlusTree::Validate() is now called. 2012-03-07 01:55:02 +01:00
Axel Dörfler 82e06fff68 Implemented BPlusTree::Validate().
* Walks the complete B+tree and checks all nodes for validity
  (duplicate/fragment as well), ie. if no key is larger than those of its
  parent, and that the left/right links are valid.
* This does not yet support repairing of broken trees, though.
2012-03-07 01:55:01 +01:00