Commit Graph

25629 Commits

Author SHA1 Message Date
Rene Gollent
ef7fb431ed Remove extraneous put_vnode(). This would result in decrementing the vnode ref count even if an unmount operation failed, which in turn would cause other fun problems. This fixes tickets 1982 and 2538. However, there seems to be another problem remaining with unmounting: the placeholder dir in the rootfs is not removed when the volume is unmounted, or it's not reused correctly. As a consequence, on subsequent remounts of the same volume via Tracker or mountvolume, a new dir is created each time, leaving empty placeholders. (i.e. remounting the volume HaikuData results in the creation of /HaikuData1, 2, 3, 4, etc.).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26586 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-23 21:39:48 +00:00
Maurice Kalinowski
7db9e218e4 julun+mauricek:
* rc uses a global instance of BResources. On destruction it calls Unset() of the BFile member fFile. BNode::Unset then calls close_fd(), which parses the static global DescriptorMap to actually close the descriptor. However on Cygwin the DescriptorMap has been destroyed already for some reason, thus accessing it is invalid. The "fix" is to put the map on the heap and delete it as soon as it gets empty. This way the global BResources instance can be freed without a crash.
   * If someone likes to review, feel free to, it didn't cause any issues here


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26585 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-23 21:39:38 +00:00
Maurice Kalinowski
59c40b2f95 julun+mauricek:
* Cygwin needs some additional defines compared to other platforms
   * Additionally stpcpy and strcasestr are unknown on Cygwin. Thus we need to use the one from our posix library.
   * ECANCELED is not defined on Cygwin, so only add error in case it is.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26584 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-23 21:39:13 +00:00
Maurice Kalinowski
e688a433ca julun+mauricek:
* add Cygwin to the list of supported platforms

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26583 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-23 21:38:49 +00:00
Axel Dörfler
b4395038ee * Replaced the sAreaHashLock with an rw_lock.
* As this was the last user of the READ_COUNT/WRITE_COUNT definitions in
  vm_priv.h, I removed those as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26582 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-23 16:10:52 +00:00
François Revol
8881176ff3 A module that hooks into the debugger to provide it with a demangle() so at least when using C++ in the kernel stack crawls are meaningful.
It does its job by using part of libsupc++, with fake malloc and friends to make sure it won't double fault.
Works here, but cp-demangle must be extracted by hand from the lib, can't get the rule to work as I want, Ingo ?
Maybe using it directly without malloc hack would be ok with 16KB buffer, but I'm not sure of that.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26581 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-23 16:08:16 +00:00
Ingo Weinhold
4e99b4683e * Fixed kernel tracing.
* Re-added tracing for cache creation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26580 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-23 15:55:51 +00:00
Ingo Weinhold
e6bd90c58d * bfs_fsync() was the only place which could cause the
fs_vnode_ops::write_pages() to be called with fsReenter = true. Since
  this is no longer the case, the argument has become superfluous. For
  read_pages() it always was. Removed the argument from the functions
  and all functions that propagated it.
* Some whitespace at the end of lines was removed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26579 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-23 15:47:47 +00:00
Axel Dörfler
4ed05c6869 * Replaced the simplistic semaphore based R/W lock in the vm_address_space with
the new rw_lock locking primitive.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26578 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-23 15:45:40 +00:00
Axel Dörfler
190712ced9 * file_cache_sync() no longer needs the file system's lock.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26577 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-23 15:03:41 +00:00
Axel Dörfler
fe08828a3c * The identify_cookie was allocated unchecked, spotted by Stippi.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26576 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-23 14:53:15 +00:00
Axel Dörfler
5d0a5f7cac * The bfs_shell needs to include <new> as well.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26575 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-23 11:59:47 +00:00
Axel Dörfler
082bae1aa5 * bfs_fsync() no longer grabs the Inode's read lock - instead, Inode::Sync()
will take care of the locking.
* Use new(std::nothrow) over new, and malloc (only in kernel_interface.cpp);
  the kernel_cpp.h header isn't really necessary anymore, so there is no reason
  BFS should continue to use it.
* Removed superfluous NULL checks.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26574 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-23 11:56:08 +00:00
Ingo Weinhold
7c27db095e Typo spotted by Axel.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26573 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-22 20:58:23 +00:00
Ingo Weinhold
5c99d63970 Merged branch haiku/branches/developer/bonefish/vm into trunk. This
introduces the following relevant changes:
* VMCache:
  - Renamed vm_cache to VMCache, merged it with vm_store and made it a
    C++ class with virtual methods (replacing the store operations).
    Turned the different store implementations into subclasses.
  - Introduced MergeStore() callback, changed semantics of Commit().
  - Changed locking and referencing semantics. A reference can only be
    acquired/released with the cache locked. An unreferenced cache is
    deleted and a mergeable cache merged when it is unlocked. This
    removes the "busy" state of a cache and simplifies the page fault
    code.
* Added VMAnonymousCache, which will implement swap support (work by
  Zhao Shuai). It is not integrated and used yet, though.
* Enabled the mutex/recursive lock holder asserts.
* Fixed DoublyLinkedList::Swap().
* Generalized the low memory handler to a low resource handler. And made
  semaphores and reserved memory handled resources. Made
  vm_try_resource_memory() optionally wait (with timeout), and used that
  feature to reserve memory for areas.
...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26572 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-22 20:36:32 +00:00
Karsten Heimrich
61a2483a53 * missed that one
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26571 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-22 20:35:28 +00:00
Karsten Heimrich
12fd6cc2e7 * move libprint sources into libs, as it is a 3rdparty lib
* move libprint headers into libs headers folder accordingly
* merge all shared folders sources into kits print, we might build later on a
  real print kit, propably also to access cups from an nicely API, atm static
* move all shared headers into private print, also pr_server.h from interface
* adjust build to work with the changed folder layout



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26570 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-22 20:30:14 +00:00
Axel Dörfler
467acc16f5 * Cleanup, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26568 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-22 17:57:00 +00:00
Axel Dörfler
33f9067b36 * Started using the I/O scheduler -- disabled it for now, though, as it doesn't
really work yet (there are some bits missing in the IORequest and IOScheduler
  to able to use them this way).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26565 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-22 16:31:35 +00:00
Axel Dörfler
6835a76dfe * Now supports formatting file devices as well as partitions.
* Fixed crash when it couldn't find the device.
* Added a "-l|--list-types" option that list all file systems that support
  initializing (currently only BFS).
* Added a "-q|--dont-ask" option that prevents mkfs from questioning your
  command :-)
* Fixed return value - would return failure to the shell when it actually
  succeeded and vice versa.
* Improved/clarified some output and fixed spelling errors.
* Errors now have the command name as prefix, as that's how it is usually
  done (and very useful for batch processing).
* Cleanup, though I kept the FsCreator class which is kinda superfluous.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26564 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-22 14:11:54 +00:00
Axel Dörfler
6cc43bfbb0 * _user_find_partition() did not work for partitions (only for devices), as it
did not set the "devicesOnly" flag to false when calling RegisterDevice().
* ddm_userland_interface.cpp incorrectly wrote to userland memory when it
  assigned "neededSize" in several places.
* Replaced on-stack path with the UserStringParameter class where appropriate.
* Made the UserStringParameter class castable to char*.
* Minor cleanup in KDiskDeviceManager.cpp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26563 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-22 14:05:47 +00:00
Stephan Aßmus
ebdb1a612b Just small white space cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26562 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-22 11:03:03 +00:00
Stephan Aßmus
ea021c679f Clicking on a menu item that already has an open submenu will close the
sub menu and quit menu tracking. This closes #1826. I tested a bit with
various different menu situations and there seem to be no negative side
effects.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26561 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-22 10:50:34 +00:00
François Revol
dcd20e9d16 forgotten -fno-pic makes arch_elf.cpp give the correct pointers to dprintf instead of garbage.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26560 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-22 01:56:33 +00:00
François Revol
9a486099e8 better english, tell about rela relocs.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26559 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-22 01:11:45 +00:00
François Revol
9f8e918d80 The .dynamic section should be both part of the data and dynamic segments!
This makes the kernel loadable by the bootloader, which does load it, and all the modules \o/


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26558 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-22 00:46:07 +00:00
Axel Dörfler
86cea5c5f1 * Renamed IOOperation::SetRequest() to Prepare().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26557 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-22 00:45:25 +00:00
Axel Dörfler
8faff60c7f * Enabled all DMA tests, wrote some more.
* Moved data buffer creation to a TestSuiteContext class.
* Added checks if the I/O operation does the correct thing, ie. reads/writes
  the data to the right offset.
* Rearranged DMA translation: we now handle the partial write case correctly
  (bounce buffer must always span over the whole block), and are able to join
  adjacent bounce buffers together.
* The new _AddBounceBuffer() method also respects boundary and segment size
  restrictions for bounce buffers.
* IOOperation now prepares the outgoing vecs/offset/length to contain the
  right data for the current phase (partial read begin/end/do-all); it will
  also make sure that the lengths of the vecs are of the same size than the
  whole request.
* All tests are now passed, the I/O request implementation seems to be ready
  for integration now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26556 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-22 00:43:01 +00:00
Stephan Aßmus
bee04bfed9 mmlr + stippi:
Hide USB errors better from the upper layers: Only try the "clear feature"
command if the error is B_DEV_STALLED. On other errors, the clear feature
was likely to fail, as it should only be used on stalled devices. Errors
intended to be ignored were thus not ignored because of the "clear feature"
failure.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26555 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-22 00:27:01 +00:00
Ingo Weinhold
f974514476 BString::Append(, int32) methods have been broken in r26378. A local
variable "length" shadowed the "length" parameter.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26554 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-21 23:21:47 +00:00
Stephan Aßmus
6df047777a * Cleanup for 80 char per line limit.
* Don't spam the syslog when the device was not a Wacom.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26553 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-21 23:16:48 +00:00
Michael Lotz
a524312842 * Fix off-by-one error in port number which caused full- or lowspeed devices
behind highspeed hubs with multiple transaction translators not to work.
* The parent hub isn't necessarily the one providing the transaction translator
  for a full- or lowspeed device. Therefore we need to inherit the hub/port
  addresses to lower devices unless we are a highspeed hub that might be the
  actual provider of the transaction translator. This logic error caused full-
  and lowspeed devices not to work if they were behind a fullspeed hub that
  itself was behind a highspeed hub.

This fixes bugs #1889 and #2501.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26552 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-21 22:46:16 +00:00
Rene Gollent
e36b6d3e2c Update Vision package to version 0.9.7-H-21072008. This fixes incorrect BBitmap colorspace usage which resulted in transparent pixels being painted green on recent versions of Haiku, most notably on the arrows in the network setup window.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26551 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-21 22:45:45 +00:00
Ingo Weinhold
5b1d60c80e r26509 broke char codes (e.g. Ctrl-K and Ctrl-D) matching one of the
checked B_* char codes. Fixes bug #2533.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26550 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-21 22:14:25 +00:00
Stephan Aßmus
a86d99e0da Opening previously open windows on non-boot partitions obviously only worked if the
automounter already mounted these partitions. Since this happens asynchronously,
it sometimes worked and sometimes not. The very simply and non-hacky fix for this
problem is to send a message from the automounter to the application looper to
have it open the previous windows after the initial mount scan is done.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26549 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-21 16:01:51 +00:00
Stephan Aßmus
499c81036f * Fixed automounting all BFS disk when Tracker starts.
* Fixed mounting previously mounted partitions. fSettings was never initialized when restoring
  the settings. The code I removed earlier didn't do that either.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26548 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-21 15:44:45 +00:00
Stephan Aßmus
df7697df96 Do not shoot ourselves in the foot and remove the previously mounted partitions
from the settings message just after having restored it. This should fix
restoring the previously mounted partitions, but I have not tested it yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26547 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-21 13:18:17 +00:00
Michael Lotz
508dd5f91d Output some more debug output in case of port reset failure.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26546 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-21 13:11:53 +00:00
Stephan Aßmus
1f855f9696 Implemented a double buffered mode for the case that the screen is 32 bit.
It works by adjusting the display_mode to have twice the virtual height to
cause the graphics driver to allocate enough frame buffer. Since hardware
acceleration calls are based on geometry locations instead of memory locations,
accelerated calls can work in the offscreen buffer with this method.
Similarily, the new CopyBackToFront() method copies the back buffer into the
front buffer with hardware acceleration. The code is currently disabled, since
not all graphics drivers handle the virtual versus display size correctly,
for example the intel_extreme driver. It works for example with the radeon
driver, but another problem prevents me to judge the benefit of this method.
Most types of screen redraws are flicker free, though, which is the whole point
of the excercise. :-)
Another problem with the current code is the initial mode switch. It does
not try again to double the frame buffer in the fall back code paths. It could
also check the frame buffer memory at all, before even trying to save some
cycles.
To see it in action, uncomment the code at line 508.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26545 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-21 12:50:32 +00:00
Stephan Aßmus
576305a5d8 * Adopt the code to handle the case that even a HWInterface instance with
hardware accelerated functions could be double buffered.
* Align the rectangle used for arc drawing like those for ellipsis.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26544 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-21 12:40:46 +00:00
Stephan Aßmus
328699e5f6 * Coding style cleanup
* Added a flag "fIsOffscreenBuffer", which is used to shift the frame buffer
  pointer to the position after the visible frame buffer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26543 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-21 12:33:06 +00:00
Stephan Aßmus
c5ac899aac * Refactor the method that actually copies rectangles from the back buffer to
the front buffer so that derived classes could override it.
* Minor coding style changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26542 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-21 12:31:27 +00:00
Michael Lotz
22e1bd0701 DiskProbe also used B_RGB32 instead of B_RGBA32 and would therefore display a black background on the icon.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26541 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-21 12:28:14 +00:00
Stephan Aßmus
167caf601e When switching ports, the code forgot to also switch the detected flatpanel
parameters. This caused ticket #1732 for me. At another place in the code,
the native resolution is added to the supported mode list and there it is
hardcoded to the first flatpanel info.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26540 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-21 12:25:33 +00:00
Stephan Aßmus
d0dc969483 Added two resolutions for certain wide screen TVs that have VGA or DVI inputs.
Either of the two should work when the native resolution is 1368x768.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26539 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-21 12:16:42 +00:00
Stefano Ceccherini
85f2668898 Patch by Dustin Howett (GSOC): Move ACPI probing out of the
bootloader's smp init and into its own unit.
ACPI tables can now generally be found with acpi_find_table(signature).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26538 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-21 07:13:51 +00:00
François Revol
3ef0397bc5 - cleanups
- disable tracing mmu
- make scratch buffer 8k as it's declared as such... that makes things much better indeed :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26537 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-21 02:54:37 +00:00
François Revol
3c5029f112 Turned out the generated kernel_m68k had a single PT_LOAD segment (RWE) instead of separate text and data like every other single binary, and everything on other platforms. This works around it by forcing sections to separate headers. It's still beyong me why I have to do this here, ld should do it on its own. Anyone has a clue ?
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26536 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-21 00:36:31 +00:00
François Revol
1e5538f5e8 silently skip PT_INTERP and PT_PHDR types as we can ignore them. This should make real unhandled types more obvious.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26535 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-21 00:31:25 +00:00
Ingo Weinhold
2f14f5ee99 axeld + bonefish + mmlr:
* Added trace entry for block reads from disk.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26534 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-21 00:30:16 +00:00