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
- 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
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
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
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
* 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
* 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
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
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
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
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
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
* 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
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
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
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
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
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
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
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
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
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
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
* Added {Create|Delete}Device() analogous to {Create|Delete}FileDevice
* Added a small DeviceWatcher class that reacts to entry creation/removal
* Implemented a way to start/stop node monitoring
* Start watching for devices after the boot volume has been mounted and the
the second initial scan was run
The disk device manager now creates and scans a device when a "raw" node is
published and deletes the device on removal. This makes hot-plugging of disk
devices (for example memory sticks using usb_disk) work. Their partitions will
be scanned and published so they can be mounted. Somehow the removal of the
partitions does not yet work however, any insights are welcome.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24777 a95241bf-73f2-0310-859d-f6bbb57e9c96
the icons are centered.
* The boot loader and kernel now use the placement info that
generate_boot_screen now generates.
* Made the code that draws the images handle the case where any of the images
is larger than the frame buffer.
* All drawing functions need to know the image width (analogous for bytes per
row).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24773 a95241bf-73f2-0310-859d-f6bbb57e9c96
of r24768 (block cache notification mechanism rewrite).
Thanks for the note, Vasilis!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24772 a95241bf-73f2-0310-859d-f6bbb57e9c96
PackageInstaller, ZipOMatic, and the Expander now all have the same
icon (instead of none, resp. a BeOS bitmap icon).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24771 a95241bf-73f2-0310-859d-f6bbb57e9c96