Commit Graph

26009 Commits

Author SHA1 Message Date
Bruno G. Albuquerque bb6b4c5076 - More style updates. Thanks Axel.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27081 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-20 14:37:43 +00:00
Bruno G. Albuquerque b2807ad696 - Added the concept of a restricted attribute namespace. The attribute class
now has a IsProtectedNamespace() member.
- All CD:* attributes can not be directly edited by the user as they are
  internally maintened by the add-on itself.
- Style updates (thanks Stefano!)



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27080 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-20 13:41:31 +00:00
Bruno G. Albuquerque 84719cae24 - Add a new CD:do_lookup attribute. It will be used by userland programs (like
cddblinkd) to know if they should lookup the CD or not. It will be true
  unless:

  1 - The CD has CD-Text information.
  2 - The user (or a userland program) changed the Volume name.
  3 - The user (or a userland program) changed any track names.

- Moved (again) attribute creation to before the stored attributes are read. As
  attribute operations happen in memory in cdda, we don't need to care about
  the IO cost and this way it is more in line with all the other attributes
  created.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27079 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-20 13:10:18 +00:00
Salvatore Benedetto 6960a91cd7 * Improve debug output
* Better formatting code

No functional changes.

Right now the code fails on recognizing the descriptor sequence.
I have to figure out if I pass the wrong values to the function.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27078 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-20 12:28:16 +00:00
Ingo Weinhold aab58d8730 Implemented (a simple) WriteAsync(), i.e. swap pages are now written
asynchronously, too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27077 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-20 11:44:23 +00:00
Axel Dörfler 743b3f1527 * Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27076 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-20 08:32:44 +00:00
Stefano Ceccherini 8c3921d063 fix gcc4 warning
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27075 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-20 08:21:25 +00:00
Axel Dörfler 4bfeb6f37a * Changed the way how a cache is destructed: now, it is removed from the
global cache list before locking it. This allows to get rid of the
  block_cache::deleting field, as well as simplifies some code.
* This also fixes a possible deadlock I recently introduced (on destruction,
  the locking order was wrong).
* Now uses an anonymous condition variable instead.
* Moved the block_cache initialization code into a dedicated method that will
  now also fail in case the low resource handler couldn't be registered (as
  pointed out by Salvatore).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27074 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-20 08:09:18 +00:00
Bruno G. Albuquerque d4969c919a - Moved creation of the CD:cddbid attribute to after the saved attributes are restored.
- Only adds it if it does not exist yet.

This does not change anything but makes more sense anyway.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27073 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-20 01:51:23 +00:00
Bruno G. Albuquerque 7c1b58f2bb - The wrong version of Inode::Attribute(0 was being called. Now setting the
attribute type works.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27072 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-20 01:34:43 +00:00
Ingo Weinhold c9b064de56 * Added "swap" debugger command printing some info on the swap space.
* Fixed lock leak in Write().
* Fixed bug in _Commit(): swap_space_reserve() was fed with the wrong
  value (could even be negative).
* swap_free_page_swap_space(): Removed incrementing of sAvailSwapSpace.
  The function is only supposed to deallocate swap space, not to
  unreserve it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27071 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-19 23:43:41 +00:00
Ingo Weinhold 5c8d420b7c * Added "bool wait" parameter to _GetOperation(). If false and no unused
operation is available ATM, it will return NULL.
* _Finisher() does now re-schedule a request, if all of its operations
  finished successfully, but there are still remaining bytes.
* _Scheduler() does now operate in two passes. First it creates as many
  operations for a given request as possible, then it executes the
  operations. This fixes bug #2644. The problem was that by creating and
  executing the operations in a single loop, an operation could be
  finished before the next one was added. The request would thus be
  considered finished and the request owner be notified. This would
  usually lead to the destruction of the request while it was still in
  use.
* _Scheduler(): In case we don't have a DMA resource also advance the
  request.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27070 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-19 21:37:16 +00:00
Ingo Weinhold 16d07755e4 * IOBuffer does now track whether its memory is locked.
* Moved memory unlocking from IORequest::OperationFinished() to
  IORequest::NotifyFinished(). This way we can reschedule a request,
  e.g. if we didn't have enough unused IOOperations at hand the first
  time.
* Added some more debug output and asserts.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27069 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-19 21:17:36 +00:00
Marcus Overhagen 1d19f96fff Removed my Copyright notice, assign future copyright to Haiku Inc, in contribution to ticket #2191
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27068 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-19 19:28:41 +00:00
Axel Dörfler 60642f8781 * The EDID info is now only dumped if TRACE_VIDEO is defined (currently the
default).
* Enlarged the serial buffer that is handed over to the kernel to 8192 bytes.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27067 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-19 18:37:30 +00:00
Alexandre Deckner 5aa001b423 - Switch BListView selection modifiers as was done for Tracker in my previous commit. It now
even conforms to the bebook! BOutlineListView needs no special change. 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27066 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-19 16:42:13 +00:00
Stephan Aßmus 53200f8efa Icon-O-Matic will now fall back to trying to open the icon attribute of any
node it is requested to open. That this would happen was an assumption of
the FileTypes preflet. Adding an icon to a node from the FileTypes add-on
will now work. Previously, Icon-O-Matic thought this was supposed to be an
icon file. Perhaps it would be better if Icon-O-Matic would ask the user if
adding an icon was the intention. FileTypes could put a flag into the message
to supress this alert. On the other hand, if adding an icon was not the
intention, the user may as well simply close Icon-O-Matic.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27065 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-19 15:53:37 +00:00
Stephan Aßmus 0470025008 Small cleanup for 80 char/line limit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27064 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-19 15:49:57 +00:00
Alexandre Deckner 7f1535c0d2 - BPictureButton didn't account for the disabled state. Fixes #2410
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27063 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-19 13:54:42 +00:00
Stefano Ceccherini 1b6b5b83ab other part of the patch from andreasf (fixes bug #2637)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27062 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-19 13:51:37 +00:00
Stefano Ceccherini f9eba888ca patch from andreasf which fixes build for gcc4 (part of bug #2637
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27061 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-19 13:50:02 +00:00
Axel Dörfler a1f34e7e89 * Only remove the block cache from the list, and its low resource handler when
this is actually needed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27060 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-19 11:30:14 +00:00
Alexandre Deckner c56a21ed62 - Made multi-selection modifier semantics consistent with most OS's out there. See #1255,
please shout if you've got anything against that :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27059 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-19 10:59:10 +00:00
Axel Dörfler 1d136d5a76 * Fixed bug #2631 based on a patch by Salvatore: the block cache was put into
a global list before it was fully initialized.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27058 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-19 08:40:55 +00:00
Ingo Weinhold 7fd3b44794 Patch by Zhao Shuai with small changes by myself:
* Some renaming: A location in a swap file where a page can be stored is
  now called "slot" instead of "page" or "swap page".
* swap_slot_alloc(): Update the hint more correctly after allocating
  slots at the hint.
* swap_space_reserve(): When less than the requested space could be
  reserved, it always returned 0 and leaked the remaining pages.
* swap_file_delete(): sSwapFileListLock wasn't unlocked in error cases.
  Use MutexLocker now.
* swap_free_page_swap_space(): sAvailSwapSpace wasn't updated.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27057 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-19 00:32:54 +00:00
Ingo Weinhold 2a79a7686f * VMCache::Write(): Added "uint32 flags" argument which is supposed to
be passed on to the IORequest. Most relevantly physical pages can now
  be written directly by passing B_PHYSICAL_IO_REQUEST.
* Added VMCache::WriteAsync() which is supposed to write pages
  asynchronously. The base class version version falls back to the
  synchronous Write(). Only VMVnodeCache implements WriteAsync() ATM,
  VMAnonymousCache (swap support) still has to be adjusted accordingly.
* write_page() doesn't need to map the page anymore as it can write the
  physical page directly.
* Modified the page writer to write pages asynchronously. This shouldn't
  have any noticeable effect yet. It will though as soon as the I/O
  scheduler reorders I/O operations.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27056 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-18 23:28:34 +00:00
Ingo Weinhold 663948966c Added method vfs_asynchronous_write_pages(), which, unsurprisingly,
writes the given page iovecs asynchronously. The new class
AsyncIOCallback is used to inform the caller when the request has been
finished.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27055 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-18 23:09:10 +00:00
Ingo Weinhold 80048d7de3 * Added B_DELETE_IO_REQUEST flag, which causes the IORequest to be
deleted automatically when it's finished.
* Added IORequest::Create() for creating a IORequest on the heap
  (respectively the VIP heap).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27054 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-18 22:59:56 +00:00
Stephan Aßmus 1dfa5a7d2a size is actually icon_size, not data size, thanks Axel for pointing out!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27053 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-18 22:55:03 +00:00
Salvatore Benedetto d6b39cd1a2 * Fix potential deadlock in file system
see http://www.freelists.org/archives/haiku-gsoc/08-2008/msg00024.html
for more details.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27052 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-18 21:48:21 +00:00
Jérôme Duval 5d6a2a65da * improved error and cancellation handling
* only enable Begin button when a menu item has been chosen


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27051 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-18 21:48:02 +00:00
Jérôme Duval e210364f75 * Applied patch http://www.gzip.org/gzip-1.2.4b.patch
* Cleaned up Jamfile


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27050 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-18 21:16:33 +00:00
Jérôme Duval 8139985d99 fCornerRunner could be NULL when reloading settings.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27049 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-18 21:06:38 +00:00
Axel Dörfler cef3610a76 * Fixed typo that prevented udf from being picked up: it's "modules", not
"module" - hope that helps, Salvatore :-)
* Fixed warnings.
* Fixed udf_identify_partition() not to crash the system when a UDF partition
  is available, and also fixed it to actually not claim non-UDF partitions.
* Moved partition naming (that shouldn't be done in identify!) to
  udf_scan_partition(), and corrected it (ie. use strdup(), don't copy into
  a NULL pointer...), but also disabled it for now, as it needs some more
  work to pass a cookie from identify now.
* Whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27048 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-18 20:58:51 +00:00
Jérôme Duval 13b2ca0205 updated mesa to 7.0.4
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27047 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-18 20:19:01 +00:00
Stephan Aßmus 986677575d * Puh, there was quite a confusion with variable names here, Axel.
Don't we have this "blah shadows a parameter" warning enabled?
* data was leaked in the error code path when allocating the bitmaps
  failed.
* I've added a check if the provided buffer even has the right
  size before copying the B_CMAP8 bitmap data into it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27044 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-18 18:53:29 +00:00
Axel Dörfler 5bfb703b6f * Try to create unknown devices before failing in RegisterDevice(), and
RegisterPartition().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27043 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-18 17:57:03 +00:00
Ingo Weinhold ff388d5189 DMAResource::TranslateNext(): Fixed several bugs that could cause too
many bytes to be read/written, which, among other things, could trigger
an assert in the IORequest code:
* In case of a partial (i.e. non-block-aligned) begin, transferLeft was
  not adjusted correctly.
* The main loop was lacking a transferLeft check.
* Main loop: When finally using a bounce buffer, the unrestricted vec
  length was used as base length for the bounce buffer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27042 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-18 15:32:11 +00:00
Ingo Weinhold 27a11ab8b0 Tests exposing several problems with partial writes shorter than the
vector size, and partial writes of less than one block.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27041 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-18 15:16:27 +00:00
Ingo Weinhold 9d4ec2ee7f The return value of the identify_partition() hook is not error code
compatible. Small floats have to be returned.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27040 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-18 15:10:47 +00:00
Ingo Weinhold af8fa701f8 Removed the description for obsolete
HAIKU_ADD_POSIX_TEST_SUITE_TO_IMAGE. There's a PosixTestSuite optional
package instead.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27039 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-18 14:44:35 +00:00
Axel Dörfler f15da085fb * Greatly simplified republish_driver(); it doesn't need to use the path_entry
stuff at all, anymore.
* Removed now unused get_device_for_path().
* unpublish_driver() now only deletes the device if unpublishing actually
  worked out okay.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27038 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-18 12:36:27 +00:00
Axel Dörfler 8ec35e364a * Forgot to set the BaseDevice inode ID; devfs_unpublish_device() now works
as intended.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27037 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-18 12:34:47 +00:00
Axel Dörfler 0d37df6412 * The old Be version of get_device_icon() now also supports retrieving the
vector icon in case B_GET_ICON is not supported by the device anymore.
  (This makes B_GET_ICON deprecated API.)
* Use B_BITMAP_NO_SERVER_LINK flag, as our bitmap is only used internally.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27036 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-18 11:50:08 +00:00
Axel Dörfler 6e006912aa * Added ConvertToCMAP8() bitmap variant.
* Put header guards in the system namespace.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27035 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-18 11:40:01 +00:00
Axel Dörfler d9b93b821a * The bitmap variant of get_device_icon() should now support getting all sizes
even if the icon is not available in that size (ie. is not a vector icon).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27034 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-18 11:38:53 +00:00
Axel Dörfler c35ab0c38d * Added new devfs_unpublish_device() that gets a BaseDevice instead of a path.
* Added inode ID member to BaseDevice to make this possible.
* Removed unused and unmaintained legacy_driver::devices_published field.
* Implemented legacy driver's unpublish_driver().
* Reenabled legacy driver reloading on changes.
* Renamed devfs_driver_{added|removed}() to driver_{added|removed}(), and
  made them private.
* Simplified deletion of device_node lists (no need to use an iterator here),
  added device unpublishing.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27033 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-18 11:07:47 +00:00
Stephan Aßmus aac7507616 * r27001 left some parameter checks which need to be ommited
for vector icons. Simplified the checks and moved them to
  where the old B_CMAP8 icon is retrieved. The bitmap is allowed
  to have another color space, in which case the icon data is
  converted (code was already in place).
* Added a NOTE comment to how the new B_GET_VECTOR_ICON ioctl
  knows about the correct buffer size for the icon data.
I've tested setting the desktop icon size to something else than
16x16 or 32x32 and it works fine now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27032 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-18 11:05:15 +00:00
Axel Dörfler 320bd2bd5a * More specific error message when relocating fails.
* Whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27031 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-18 11:03:50 +00:00
Axel Dörfler a3901de208 * Build fix: this should have been part of the last commit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27030 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-18 11:03:03 +00:00