Commit Graph

23819 Commits

Author SHA1 Message Date
Stephan Aßmus
27000126fd Fixed the build of the registrar for the app_server test environment.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24830 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 14:39:22 +00:00
Stephan Aßmus
20eb92f20a * Fixed missing include.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24829 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 14:36:14 +00:00
Michael Lotz
8024db25a8 Change just host_controller_info to usb_host_controller_info for the sake of
clearity as suggested by Philippe Houdoin once and brought to my attention by
Slavatore. As this definition is completely private to the USB stack it would
not have caused any conflicts though.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24828 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 14:14:42 +00:00
Michael Lotz
3568352d8d When a partition was unpublished from devfs the devfs_delete_vnode() would
also free the device info which it must not do, as this info is in fact just
a pointer to the device info of the raw node. Removing a raw device that had
partitions published therefore always lead into KDL when closing the raw
device after unpublising the partition, as the close_hook pointer which sits
in the device info now was 0xdeadbeef. This should make for example unplugging
USB devices work as expected.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24827 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 12:07:45 +00:00
Axel Dörfler
a63f51dea4 * Enabled a few more chipsets that I found PCI IDs for. Only the i845G one has
actually been tested (see ticket #1969).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24826 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 09:37:14 +00:00
Michael Lotz
fc38019945 Rename vfs_stat_entry_ref() to vfs_stat_node_ref() as that's what a dev_t and
ino_t combination really is.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24825 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 09:18:27 +00:00
Ingo Weinhold
ea39c6377e Might help gcc 2.95.3 to resolve its perceived overloading of the
function.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24824 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 03:13:11 +00:00
Ingo Weinhold
6e36a49e62 * Added _kern_create_pipe() syscall, creating a pipe as an entryless
FIFO. Reimplemented pipe() to use it.
* pipefs is no longer mounted. Will remove the superfluous code soon.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24823 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 02:49:12 +00:00
Ingo Weinhold
ad3a563d43 create_special_node() supports creating a special node without entry,
now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24822 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 02:44:37 +00:00
Ingo Weinhold
3af6d6a43a Commented out some debug output. The sources will be reworked soon.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24821 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 02:42:18 +00:00
Ingo Weinhold
9583c41d8a Added TODO regarding potential deadlock.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24820 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 02:35:07 +00:00
Ingo Weinhold
d4016ffdbb * A pipe can now be inactive and active. After creation it remains
inactive until at least one reader and one writer have opened it. As
  long as it is inactive, reads from and writes to it just block. When
  active, they behave as before (if there's no counterpart writes fail:
  SIGPIPE + EPIPE, reads return 0). When both reader and writer count
  drop to zero, the pipe becomes inactive again.
* Allocate the ring buffer lazily when the pipe becomes active and
  delete it when it becomes inactive.

This makes the pipe implementation FIFO compatible. IOW, FIFOs work as
expected as far as I've tested them.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24819 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 01:40:01 +00:00
Ingo Weinhold
a8cba5904f The rootfs was calling remove_vnode() on nodes for which it might not
have had a reference.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24818 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 00:27:36 +00:00
Ingo Weinhold
717705d816 We get a reference to the node from create_special_node(), so we have to
release it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24817 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 00:26:15 +00:00
Ingo Weinhold
7ffafac8d7 * Reorganized the FS interface a little:
- Moved most file_system_module_info hooks into separate structures.
    Those that operate on mounted volumes to fs_volume_ops, those
    operating on a vnode to fs_vnode_ops.
  - Got rid of the fs_volume, fs_cookie, fs_vnode typedefs. We use void*
    again.
  - Instead of a void* volume and node cookie hooks are passed a
    fs_volume and fs_vnode structure pointer, which contain the cookie
    and an ops pointer (fs_volume a few more things).
  - The VFS {new,publish,get,...}_vnode() functions take a fs_volume*
    instead of the volume ID. So does vfs_get_fs_node_from_path().
  - Added type and flags arguments to publish_vnode() and the
    get_vnode() hook and removed the type argument from lookup() hook.
    Added vnode::type using formerly unused bits to store the node type.
    Simplified a few things in the VFS due to the now always available
    node type.
  - Added fs_volume_ops::{create,delete}_sub_vnode() and
    fs_vnode_ops::get_super_vnode() hooks. They are used to support file
    system layers, e.g. allowing to extend an FS not supporting BeOS
    attribute with attribute support. Needs some more work in the VFS.
  - Added fs_vnode_ops::create_special_node() hook for creating special
    nodes (e.g. FIFOs).
* Adjusted the built-in file systems and BFS according to the interface
  changes. Removed all other FSs from the image for the time being.
  We'll see whether further API changes are necessary before porting
  them.
* Adjusted the bfs_shell accordingly.
* Implemented create_special_node() in rootfs to support special nodes.
* Added support for FIFOs:
  - Added syscall _kern_create_fifo() (used by mkfifo()), which creates
    a special node (type S_IFIFO) in the respective file system.
  - When a special node is published the VFS creates a respective sub
    node. Currently only FIFOs are supported.
  - Added a little support for FIFO subnodes by using functionality from
    the pipefs.
  - Added mkfifo to the image. It can create FIFOs in the rootfs, but
    the FIFOs aren't really usable ATM, since they still work like
    pipes, i.e. readers and writers need to have them open at the same
    time.
* Some smaller changes in the VFS:
  - Made the *_CALL macros nicer to use (vargs).
  - Refactored FS entry lookup into new function lookup_dir_entry().
  - create_vnode() no longer just calls the FS create() hook. First it
    looks up the entry and uses open_vnode(), if it already exists. This
    is necessary for two reasons: 1) The FS might not support create()
    while still allowing to open() entries. 2) When the FS has other
    layers on to of it (or the respective node) it might not be
    responsible for opening the node.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24816 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 23:05:16 +00:00
Michael Lotz
5d7ee5e84a * Replace the path based lstat in the device watcher with the new device/node
based one. The path based version could not have worked for entry removed
  notifications at all as the node is removed from the directory at this point
  already
* Forgot to delete the device watcher instance after removing all monitors
* The PartitionRegistrar in DeleteDevice() was set to already locked which is
  not the case
* Someone probably forgot to add a PartitionRegistrar to the media checker - it
  did register the device on each run but never actually unregistered it, which
  obviously messed up the reference counting a bit

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24815 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 22:08:47 +00:00
Ingo Weinhold
3b9651f3fc Pass "--no-undefined" to the linker when building a shared library for
Haiku. Support for undefined symbols is nice in principle, but not
really needed for building Haiku itself, and can get little annoying, if
one really just forgot to link in a symbol or has a typo in a function
name in C code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24814 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 22:04:28 +00:00
Michael Lotz
efb965d559 Introduce vfs_stat_entry_ref() that allows to stat a vnode based on a dev_t
and ino_t instead of a path. Supposed to work with node monitoring messages.
Took the name from vfs_entry_ref_to_path() that takes the same arguments, but
suggestions for a better name are welcome.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24813 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 22:01:05 +00:00
Stephan Aßmus
d0fc7c65c6 Patch by Philippe Saint-Pierre:
* Implemented RLE compression for the boot splash images, resulting in
  smaller kernel and boot loader.
* Only the boot loader contains the RLE compressed images, the decompressed
  buffer for the icons is passed to  the kernel via kernel args.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24812 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 21:15:43 +00:00
Michael Lotz
86dd3875cd * Updating device->removed must be protected by the device lock
* Also updating device->open_count must be protected by the device list lock

This fixes the (unlikely) case where a device was removed from usb_disk
standpoint while it still had an open read/write/ioctl operation.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24811 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 16:42:34 +00:00
Michael Lotz
b6b5de0741 Use a more reasonable timeout of 1 second for synchronous USB requests.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24810 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 15:14:30 +00:00
Axel Dörfler
0e4edbeafa * Added checks to (hopefully) all write/create functions to bail out early
if the volume is read-only. This should help with #2028.
* Removed unused bfs_[de]select() functions.
* Removed most paranoia checks - now that we control both sides of code,
  this would just hide eventual problems in the VFS code.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24809 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 12:24:11 +00:00
Stephan Aßmus
85f0201086 Rene left tracing turned on in his last commit to this file.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24808 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 12:07:10 +00:00
Michael Pfeiffer
e664c41006 Restored the copyright notice before r24684, as pointed out by Marcus Overhagen on the Haiku-commits mailing list, r24684 is a copyright violation.
Also reverted some meaningful comments.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24807 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 11:55:14 +00:00
Axel Dörfler
98b7d71b7c The wait_for_notifications() function now detects if it has been run from
within the notifier/writer thread, and will then flush the notifications
directly. This should fix #2008 again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24806 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 10:23:11 +00:00
Axel Dörfler
355914a2cd * Enlarged maximum kernel size to 2 MB - this is the code the boot loader's
MMU code reserves for the kernel, and we hit that limit recently with the
  addition of the boot splash code.
* This fixes the boot crash as triggered by Stippi's recent changes to the
  splash image.
* Cleanup (doxygen comments, line length).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24805 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 10:16:49 +00:00
Michael Lotz
b04afa2413 * Another tiny cut in stack load time: do not delay after setting the current
configuration of a root hub
* Cut down on number of retries to set the initial device address

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24804 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 00:38:38 +00:00
Michael Lotz
f1a9c3c214 Implement a downcounter for the synchronize cache command. There are devices
that do not support it (probably because they do not have a cache at all like
in flash media) and this should at least avoid spamming the syslog when this is
the case. It will try 5 times and then disable syncing for that device. Untested
as of yet though.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24803 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 23:46:14 +00:00
Rene Gollent
0ee109102b Forgot about this static function.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24802 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 23:41:01 +00:00
Rene Gollent
45219b61ea Modify ProcessController's System Resources and Caches item: it
now shows cache and total committed mem respectively.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24801 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 23:40:09 +00:00
Rene Gollent
4e103cc0e7 Remove cache mem indicator from this app.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24800 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 23:39:30 +00:00
Michael Lotz
a380bc2513 * Add support for devices with multiple LUNs
* A device now has one or more LUNs which are used for LUN specific functions
* Adapted these LUN specific functions to the new design and also change the
  (un-)publishing accordingly
* Handle "no media" cases more correctly
* Output some interesting device infos also with tracing disabled
* Add some more helpful debug output here and there

Devices that provide multiple logical units (like those n in 1 card readers)
should now be usable with usb_disk too. Also we don't fail when a device is
attached which currently does not contain a media. Instead handle media changes
correctly so inserting a media works as expected. Note that hot-unplugging and
media removal still does not quite work right at the devfs or disk device
manager level and easily crashes the system.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24799 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 22:51:29 +00:00
Jérôme Duval
f27659f55e * GRAY8 is 8 bits
* typo


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24798 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 19:45:11 +00:00
Axel Dörfler
d6e60839e9 * Resolved a TODO: determine the log size depending on the size of the volume.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24797 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 19:32:39 +00:00
Stephan Aßmus
75ab36bd50 Refined again the boot splash artwork. Everything is now centered as a whole.
The dividing line is back although with a little more spacing. Also the icon
spacing is a little increased and I added a subtle outline as well as a little
brighter background for the active icon look. The placement logic is now not
independant of each other anymore, otherwise I couldn't center both images
as a unit. But only the vertical placement is affected.
Comments as always on the commit mailing list... :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24796 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 19:13:00 +00:00
Axel Dörfler
64b7ef1d0f * As briefly discussed in ticket #2024, I've changed BFS to allow to mount
volumes with a broken log. It will only allow the volume read-only then,
  though (unlike Be's BFS), as your disk could be corrupt.
* Added InitCheck() method to the RecursiveLock class, and now only check
  this one in Journal::InitCheck() instead of also replaying the log there;
  this is now done directly in Volume::Mount().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24795 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 18:59:17 +00:00
Rene Gollent
0d69c8378f On my system's BIOS / monitor there seems to be a race condition between grabbing the EDID info
and setting the video mode. The result of this is a garbage display every other boot. By 
introducing a small wait before doing the mode set, it works every time. Will see if I can
reduce the spin timer though with some more tests.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24794 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 15:12:11 +00:00
Axel Dörfler
7686d00c6f * This should fix a deadlock as reported by bga.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24793 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 15:11:37 +00:00
Axel Dörfler
807d3aa8e3 * If BFS's Journal::_WriteTransactionToLog() noticed there wasn't enough free
space left for the new log entry, it did call cache_sync_transaction(), and
  then just assumed the space would be ready. But since the transaction could
  have been written before that call by the block writer, and since the
  _TransactionWritten() hook is now called asynchronously,
  cache_sync_transaction() actually has to flush all pending TRANSACTION_WRITTEN
  notifications before returning to the caller.
* To implement this, block_cache now publishs a condition variable, and
  wait_for_notifications() adds a fake notification that signals that one.
  Since the notifications are handled in FIFO order, this guarantees that
  the previous TRANSACTION_WRITTEN hook is done.
* notify_transaction_listeners() could accidently delete notifications that
  still had pending signals. Now, it will defer the deletion to the notification
  thread instead in that case. This should fix bug #2008.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24792 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 14:02:30 +00:00
Axel Dörfler
0bb7a9c0ca * Journal::_TransactionWritten() updated Volume::LogStart() before it actually
wrote the super block, so there was a race condition with what
  _WriteTransactionToLog() assumed was already written there (if it managed to
  write the log entry before the super block was written by
  _TransactionWritten(), and a reboot happened just then, the log start could
  point to an invalid log entry). Not very likely, but it could happen.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24791 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 13:54:18 +00:00
Axel Dörfler
5ebf78f405 * More or less reverted r24782; most ifdef's are NOT needed when running
Haiku code, they work around buggy BeOS code not present on Haiku.
* If this code turns out to be problematic under Haiku (Bruno, did your changes
  make any difference at all?), then please fix the problems in the Storage
  Kit, don't enable work-arounds for BeOS.
* Simplified the macro check as suggested by Ingo.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24790 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 11:06:33 +00:00
Ingo Weinhold
9181e9cbcf * Used the original size for vmdk Extent Description, not the
sector-aligned one.
* Truncated the image a little too short.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24789 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 01:24:26 +00:00
Rene Gollent
ddd25e757b * AboutSystem now shows cache usage together with total/available mem.
* Small cleanups.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24788 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 00:40:42 +00:00
Bruno G. Albuquerque
6b0feadc93 - Added Brazilian(ABNT2) keymap originally included in the International
Keymap Pack by ITO, Takayuki and licensed as public domain.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24787 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 00:34:11 +00:00
Bruno G. Albuquerque
f040ef9a84 Removed bison and flex as both are now part of the development package.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24786 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 00:15:41 +00:00
Ingo Weinhold
702421fa41 Fixed incorrect getopt() specification: -c and -H don't have arguments.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24785 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-03 23:54:55 +00:00
Ingo Weinhold
7c529c2415 * Renamed vmdkheader to vmdkimage and changed it to create a full image
by default (new option "-H" will create the header only). Option "-c"
  will clear the image.
* Adjusted build_haiku_image accordingly. vmdkimage is way faster and
  more portable than the former vmdkheader+dd combo.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24784 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-03 21:18:18 +00:00
Jérôme Duval
2608583e58 merging acpica-20080321 in trunk
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24783 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-03 20:49:28 +00:00
Bruno G. Albuquerque
381016e1e0 While tracking a mimeset bug when building under Haiku, I found these. Not sure
if these changes are correct byt they seem to make sense. Ingo?

- Haiku uses the same code that BeOS/Dano/Zeta uses for mime related stuff
  during the build process. Added checking for HAIKU_HOST_PLATFORM_HAIKU where
  relevant.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24782 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-03 20:09:36 +00:00
Ingo Weinhold
5b420b6d10 Replaced "echo -n >" by "touch" as it's more portable.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24781 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-03 19:52:43 +00:00