Commit Graph

21472 Commits

Author SHA1 Message Date
Axel Dörfler
b21fc3c730 Added another test case to the menu trigger test that could reproduce the last
problem of BMenuItem::SetTrigger() that got fixed in r22476 (see bug #1506 for
the details).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22477 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-07 17:22:30 +00:00
Axel Dörfler
f1be468272 fTriggerIndex was still a byte index in BMenuItem::SetTrigger() - this one
fixes bug #1506 once and for all :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22476 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-07 17:20:28 +00:00
Ingo Weinhold
bf95c9aee6 * The shadow_changed() FS and partitioning system hooks take an
additional partition_data* child parameter now.
* _user_get_partitionable_spaces() doesn't need to copy the buffer into
  the kernel, since it is no input parameter. It also copies back the
  actual partitionable spaces count on error, now -- B_BUFFER_OVERFLOW
  is returned when the buffer was too small, but then the count must be
  returned too.
* Fixed several instances of syscall implementations that unloaded a disk
  system, although they didn't load it in the first place. This screwed
  up the load count with undesirable consequences.
* _user_create_child_partition() would set the size to the supplied
  offset.
* Fixed broken loop in KPhysicalPartition::CreateShadowPartition().
* KPartition::RemoveChild() notified the listeners about the wrong
  event.
* Intel partitioning module:
  - The *_get_partitionable_spaces() correctly return B_BUFFER_OVERFLOW
    now, if the supplied buffer is too small.
  - Implemented a part of pm_shadow_changed(), which creates and updates
    the PartitionMap, so that the validate_*() hooks have a chance to
    work at all.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22475 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-07 15:39:35 +00:00
Ingo Weinhold
a68ceab8df Fixed comment.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22474 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-07 15:17:38 +00:00
Ingo Weinhold
24ce374f61 The index parameter to validate_create_child_partition() is optional,
but it is mandatory to the KDiskSystem::ValidateCreateChild(), which is
invoked, so we need to use a stack variable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22473 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-07 15:14:54 +00:00
Ingo Weinhold
dbef8fc452 * Added get_physical_partition() function, which always retrieves the
physical partition, unlike get_partition() which returns the shadow
  partition, if it exists.
* Added B_PARTITION_SHADOW[_CHILD] partition pseudo operation values for
  the shadow_changed() hook, notifying a disk system, that a shadow
  partition has been created.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22472 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-07 15:11:37 +00:00
Ingo Weinhold
04adb291a6 Clear the user_partition_data::user_data fields before updating the
BPartition structure with the data retrieved from the kernel. For new
partitions the field is not set in the next step and later code would
use an initialized pointer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22471 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-07 14:56:26 +00:00
Ingo Weinhold
7ede8e4494 Added [Content]Parameters() getters.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22470 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-07 14:52:54 +00:00
Ingo Weinhold
11e9c3980c Changed semantics of GetNextSupportedType(): It expects a pointer to the
parent (not the child) partition, now. A method with the old semantics
is probably needed, too, but before creating a child partition, one
obviously doesn't have a child to pass yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22469 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-07 14:50:25 +00:00
Ingo Weinhold
2e3d6b83ca * Ask for a partition name for initialization only, if the disk system
supports names.
* Finished interface for creating partitions.
* Cosmetic changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22468 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-07 14:47:17 +00:00
Ingo Weinhold
9d337ccc01 Aesthetical changes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22467 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-07 14:41:55 +00:00
Axel Dörfler
20b232e900 Actually forgot this nail: the file cache will now reserve the pages it will
allocate with the vm_cache locked - this is necessary to be able to steal pages
from itself (large files...).
The system doesn't actually lock up anymore, but it still renders itself unusable;
obviously the page thief does not work correctly, yet. The rest of the experience
is created by our current scheduler (the page thief runs and runs, but it doesn't
free any pages anymore).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22466 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-07 13:32:13 +00:00
Axel Dörfler
0633dcc2c6 * Fixed a serious oversight that could result in trying to insert a page
twice into the same cache: cache_io() called read_into_cache() (or
  write_to_cache()), and that broke down the request into smaller parts.
  It then called read_chunk_into_cache() (or write_chunk_to_cache() resp.)
  to actually allocate pages and fulfill the request.
  However, it needed to unlock the cache for each chunk, and in the mean
  time someone else could insert pages into the remaining chunks.
* Now, cache_io() already takes care of chunking the data which makes this
  approach safe, and also simplified the code a bit - read_into_cache()/
  write_to_cache() are gone now. I've renamed read_chunk_into_cache() to
  read_into_cache() (same for the write function).
* Also got rid of that goto in that function while I was on it.
* Disabled cache_prefetch_vnode() for now (it's similar to cache_io(), but
  since it's currently not used [since no cache module is installed yet],
  I didn't want to go through updating it now, too).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22465 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-07 12:21:18 +00:00
Jérôme Duval
94302e2f82 dprintf_no_syslog is needed for openfirmware platform
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22464 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-06 18:40:32 +00:00
Jérôme Duval
428a7df2f9 fix ppc kernel build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22463 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-06 18:20:05 +00:00
Axel Dörfler
c950f17a51 * Added a acquire_unreferenced_ref() to vm_store
* his has to be used by the page writer to make sure the vnode is still valid.
* This should have been the final nail on the Luposian bug - I haven't tested
  it yet, but we'll certainly see :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22462 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-06 15:35:38 +00:00
Axel Dörfler
80f5469291 * struct vnode is an opaque type now, removed void* where it was used incorrectly.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22461 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-06 15:33:12 +00:00
Jérôme Duval
2caa43976d switch from COMPILE_FOR_R5 to HAIKU_TARGET_PLATFORM_HAIKU
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22460 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-06 14:11:25 +00:00
Jérôme Duval
082c9eb03a clean up
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22459 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-06 14:04:09 +00:00
Jérôme Duval
4689d4f1ab added ice1712 driver on behalf of Jérôme Leveque. Thanks!
Current status : playback only.
Support for M-Audio Delta 1010, Delta 1010 LT, Delta DIO 2496, Delta 66, Delta 44, Audiophile 2496 and Delta 410 VX 442.
Tested on M-Audio Audiophile2496.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22458 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-06 13:45:16 +00:00
Axel Dörfler
5c7dbe881d Applied François' patch to be able to free large allocations. Even though the
heap is going away soon, it doesn't hurt to have it in the repository.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22457 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-06 13:14:11 +00:00
Axel Dörfler
1211351476 The page thief can now also steal active pages under pressure.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22456 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-06 11:38:03 +00:00
Axel Dörfler
0e18334057 * Mapping a page might actually need memory - since we usually have locks that
interfere with the page thief, we always need to have reserved a page for
  this upfront. I introduced a function to the vm_translation_map layer that
  estimates how much pages a mapping might need at maximum. All functions that
  map a page now call this and reserve the needed pages upfront.
  It might not be a nice solution, but it works.
* The page thief could run into a panic when trying to call vm_cache_release_ref()
  on a non-existing (NULL) cache.
* Also, it will now ignore wired active pages.
* There is still a race condition between the page writer and the vnode
  destruction - writing a page back needs a valid vnode, but that might just
  have been deleted.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22455 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-06 11:18:21 +00:00
Ingo Weinhold
aa4d8ee6ee * Allow NULL name argument on initialization.
* Some code beautification on the way.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22454 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-05 23:25:58 +00:00
Ingo Weinhold
d6e565c76b * Fixed gcc 4 warnings.
* Style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22453 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-05 22:39:52 +00:00
Ingo Weinhold
7ca40195ba Don't overwrite the last read byte with the null-terminator. Fixes bug
#1536.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22452 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-05 19:01:18 +00:00
Ingo Weinhold
570263197e * Reviewed checking of empty paths and fixed some occurrences. Thanks to
mjw for the hint. Fixes bug #1516.
* Changed _{kern,user}_create_symlink() to no longer check the supplied
  link string. BeOS seems to do that, but this is not standard
  conforming. The previous implementation even used the path processed
  by check_path(), which would potentially have appended a ".".
* Some style cleanup.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22451 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-05 18:42:50 +00:00
Ingo Weinhold
0cf4ed1de6 MoveFrom() was broken. Fixes bug #1534.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22450 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-05 16:56:48 +00:00
Axel Dörfler
7ce5ca3222 The page scanner must not turn pages inactive that are actually wired
(currently, wired pages don't always have the PAGE_STATE_WIRED, but a
wired_count).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22449 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-05 16:54:50 +00:00
Ingo Weinhold
7c8a352db7 * Cleanup.
* Corrected checking of parameters (name).
* Gracefully deals with disk systems that rescan after initialization,
  now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22448 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 23:52:21 +00:00
Ingo Weinhold
db5c68ca46 * Added the partition size as parameter to the file and partitioning
system initialize() hooks. It's often the only info about the
  partition one needs and thus locking the partition just to get it is
  no longer necessary.
* intel partitioning system:
  - Removed passing around block sizes. We require 512 byte sectors
    anyway. In fact using the parent partition's block size was even
    wrong.
  - Simplified writing the partition map sector.
  - Simplified and corrected the partition map initialization.
  - We don't fail identifying a partition anymore, if the partition map
    contains no partitions. We would never identify a freshly
    initialized partition map before.
  - Made pm_identify() more intelligent: It determines the priority to
    return depending on whether the partition is the device itself and
    whether we have recognized child partitions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22447 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 23:48:18 +00:00
Ingo Weinhold
6748659272 Added an identify_file_system() hook to the FS modules. The boot loader
does no longer give partitioning systems precedence over file systems.
The one with the greater identification priority wins. ATM, if a file
system wins, we still mount the first file system that recognized the
partition at all, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22446 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 23:16:31 +00:00
Jérôme Duval
ff386118f4 removed former haiku_book and headersampler tool
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22445 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 22:15:58 +00:00
Stefano Ceccherini
6fc1a5d0ea Mail's inherited InsertText() calls CancelInputMethod()
indirectly, and since InsertText() is called inside 
BTextView::HandleInputMethodChanged(), this method would see fInline 
slip away from under its feet.. Now we call the BTextView version 
explicitly. Fixes bug #1022, although I'm not sure if this is completely 
correct.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22444 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 19:57:27 +00:00
Ingo Weinhold
bcc2eb0c72 Moved the write support code into a separate source file.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22443 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 18:27:25 +00:00
Ingo Weinhold
33e38cdad2 * Implemented bfs_validate_initialize(). It should probably do more
checks (e.g. if the partition is big enough), though.
* bfs_initialize():
  - Report job progress.
  - Rescan the partition after it has been initialized, so that all
    partition_data fields are properly initialized.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22442 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 18:11:00 +00:00
Ingo Weinhold
8c8f8c8420 Added scan_partition() function which can be used by disk systems (e.g.
in *_initialize()) to save some work.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22441 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 18:03:24 +00:00
Ingo Weinhold
088136f66b gcc 4 warned unnecessarily.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22440 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 17:59:29 +00:00
Axel Dörfler
edf668344a * Added some docs.
* Removed dead code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22439 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 16:53:02 +00:00
Axel Dörfler
9d8c209014 * vm_remove_all_page_mappings() now returns an accumulation of the flags of
the unmapped page.
* This is needed by everyone who calls this to make sure modifications to a
  page aren't ignored. Namely, the page scanner and the page thief were
  affected.
* Cleaned up locking the page's cache a bit in page_thief(); there is now
  a helper class that takes care of everything.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22438 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 16:36:35 +00:00
Axel Dörfler
06cd40f399 Forgot to replace the error code with the new "mayBlock" logic, thanks Ingo!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22437 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 15:11:48 +00:00
Ingo Weinhold
6f05787478 * rootfs.c -> rootfs.cpp
* Made the kernel rootfs reusable by the FS Shell and removed the
  copy in the FS Shell sources.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22436 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 14:30:50 +00:00
Axel Dörfler
417f276c05 Forgot to commit the fs_shell with r22434, thanks for the note, Stefano!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22435 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 13:23:00 +00:00
Axel Dörfler
3e9513aa4a * fs_{write|read}_pages() now has an additional argument "mayBlock".
* the page writer don't allow to block, while all other writers do. This fixes
  bug #1509. The reason the page writer needs this is because it marks several
  pages from different caches as busy.
* Fixed a warning about ASSERT being defined already in BFS, since
  util/DoublyLinkedList.h now includes debug.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22434 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 12:45:15 +00:00
Stefano Ceccherini
94b9294f48 oops! Somehow I managed to commit a version with some extra debug code
enabled.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22433 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 11:37:04 +00:00
Stefano Ceccherini
f2476bcc9c Patch by Rene Gollent: TextViews now can scroll even if they aren't
attached to a BScrollView.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22432 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 11:32:06 +00:00
Ingo Weinhold
39c99f8644 The toggledView variable was assigned twice. The last assignment should
win. Interestingly with gcc 4 and optimizations enabled the same value
was passed twice to Add().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22431 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-03 22:53:19 +00:00
Ingo Weinhold
45f9d60c9f Some KDEBUG enabled sanity checks.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22430 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-03 22:22:21 +00:00
Ingo Weinhold
d45ce8b1dc Move the job control entries of a dying team's children to the kernel
team as well. Otherwise the children would later try to remove them from
a list they weren't in.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22429 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-03 22:20:30 +00:00
Ingo Weinhold
76ab7bdcf8 Added function dprintf_no_syslog(). It is basically equivalent to
dprintf() with the exception that it doesn't write anything to the
syslog. The reason is that syslog_write() releases a semaphore and can
therefore not be invoked when the thread spinlock is held.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22428 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-03 22:14:53 +00:00