This actually reflects the only usage of this function anyway, and thus,
fixes the resize_area() function.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9265 a95241bf-73f2-0310-859d-f6bbb57e9c96
vm_page no longer keeps a pointer to the vm_cache_ref but to the vm_cache.
This cleans the page handling when having to make an area copy-on-write;
regions belong to vm_cache_ref, pages to vm_cache.
Fixed some return types.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9264 a95241bf-73f2-0310-859d-f6bbb57e9c96
It currently checks for temporary caches, but it should really only be used
with regions for anonymous memory.
Fixed some return types.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9259 a95241bf-73f2-0310-859d-f6bbb57e9c96
Changed the way a vm_address_space is deleted: instead of having to explicitly
call vm_delete_aspace(), the last vm_put_aspace() will remove it.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9255 a95241bf-73f2-0310-859d-f6bbb57e9c96
Changed the way a vm_address_space is deleted: instead of having to explicitly
call vm_delete_aspace(), the last vm_put_aspace() will remove it.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9254 a95241bf-73f2-0310-859d-f6bbb57e9c96
Should be tested and verified more intensively, though.
Moved the creation, initialization, and deletion of the team_arg structure out of
team_create_team(); it's now also used by exec_team().
Renamed kfree_strings_array() to free_strings_array().
Renamed the fields of the team_arg structure to be more in sync with the names used
at other places.
Fixed the routine that copied the environment/arguments into the userland space.
Improved and fixed the user_copy_strings_array() function.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9250 a95241bf-73f2-0310-859d-f6bbb57e9c96
of vm_delete_aspace() (which now calls it).
Fixed some return types.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9248 a95241bf-73f2-0310-859d-f6bbb57e9c96
file descriptors that have O_CLOEXEC set.
Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9242 a95241bf-73f2-0310-859d-f6bbb57e9c96
in dir_vnode_to_path() which does now continue until hitting "/".
* Refactored common volume root to mount point resolution code into a
separate function.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9210 a95241bf-73f2-0310-859d-f6bbb57e9c96
via B_SET_(NON)BLOCKING_IO to notify the device about any access mode changes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9199 a95241bf-73f2-0310-859d-f6bbb57e9c96
and will check against those. This fixes the rare case an interrupt frame
could cause before.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9191 a95241bf-73f2-0310-859d-f6bbb57e9c96
potential bug if MAIN_STACK_SIZE and STACK_SIZE would have been different.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9190 a95241bf-73f2-0310-859d-f6bbb57e9c96
read over two blocks, some memory behind that memory could be trashed.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9188 a95241bf-73f2-0310-859d-f6bbb57e9c96
waiting on the write semaphore).
The write functions didn't change the buffer address on a partial write
which could lead to corruption in the pipe data.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9111 a95241bf-73f2-0310-859d-f6bbb57e9c96
Fixed a warning that popped up if TRACE_VM was defined.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9110 a95241bf-73f2-0310-859d-f6bbb57e9c96
It now prints a warning if the device driver doesn't handle iovecs correctly.
Again, this could lead to very strange behaviour.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9092 a95241bf-73f2-0310-859d-f6bbb57e9c96
name of the node.
devfs_read_stat() now (presumably temporary) sets the size of the device
for partitions and reports a block device rather than a character device
if the size unequals zero.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9085 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Turned sMountOpMutex into a recursive lock.
* Re-inserted sMountOpLock locking in vnode_path_to_vnode(). It doesn't
deadlock on mounting anymore. :-P
* Added a check in fs_mount(), whether the mount point is a directory. If
it wasn't, in general it wouldn't be possible to get its parent
directory.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8993 a95241bf-73f2-0310-859d-f6bbb57e9c96
why that was there before. Thanks to Ingo for pointing this out.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8981 a95241bf-73f2-0310-859d-f6bbb57e9c96
Now maintains uid/gid/mode, modification and creation time for all nodes.
Implemented rootfs_write_stat() completely. rootfs_read_stat() now fills
in all required values.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8962 a95241bf-73f2-0310-859d-f6bbb57e9c96
time in st_mtime.
rootfs_write_stat() now properly locks the node access.
Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8960 a95241bf-73f2-0310-859d-f6bbb57e9c96
permissions are not tested, though.
Removed the STREAM_TYPE_ constants.
Now maintains a modification and creation time for all nodes.
Implemented rootfs_write_stat() completely. rootfs_read_stat() now fills
in all required values.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8959 a95241bf-73f2-0310-859d-f6bbb57e9c96
IDE drivers :-)) don't respect the total amount of bytes to be read in the
former readv() (now read_pages()) call. This can potentially fix all sorts
of strange errors in userland :)
Fixed the debug build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8938 a95241bf-73f2-0310-859d-f6bbb57e9c96
recreates a race condition, having it here breaks the kernel as fs_mount()
calls this function and already holds the mutex.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8936 a95241bf-73f2-0310-859d-f6bbb57e9c96
unmounted.
* Clarified a comment in fs_mount().
* Added a bit of documentation regarding the mutexes and the basic vnode
functions.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8930 a95241bf-73f2-0310-859d-f6bbb57e9c96
Userland. It must always set the d_pdev and d_pino fields and, if the
Entry refers to a mount point even replace d_dev and d_ino.
* Added a TODO comment to entry_ref_to_vnode(). It should take care of
mount points, as vnode_path_to_vnode() does, I believe. Will verify
and fix that next.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8921 a95241bf-73f2-0310-859d-f6bbb57e9c96
this is the one thing most likely to fail - it now also handles this case
gracefully instead of dying.
Small cleanup, cleared some other ToDos: some user functions now delete
the area when they could not copy the target address.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8911 a95241bf-73f2-0310-859d-f6bbb57e9c96
leaving the tags Qt style though. That's a bit weird, but that's the
way Axel likes it, and we want to keep him happy, don't we? ;-P
* The common_[path_]read_stat() now fills in st_dev and st_ino in the
result stat structure after the FS had its go. The information is
readily available in the VFS, so why bother the FSs. In fact devfs
didn't (and still doesn't) fill in st_dev which gave dev_for_path()
some head ache.
* Modified _user_open_parent_dir() to accept a NULL buffer for the
entry name and added a doxygen comment for it.
df now works properly on Haiku (save that printf() doesn't support
floating point numbers at the moment).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8898 a95241bf-73f2-0310-859d-f6bbb57e9c96
always also access it through the devfs_vnode. This also solves an issue
in devfs_read() where an access of a cookie->stream would crash the
kernel, since cookie->stream was not set in devfs_open().
* devfs_open() now doesn't fail for directories and symlinks anymore.
That prevented BNode to work for devfs dirs and symlinks.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8897 a95241bf-73f2-0310-859d-f6bbb57e9c96
`.'. This fixes the _kern_open_parent_dir() syscall for the root directory.
I realized, that rootfs_read_dir() doesn't return the entries `.' and `..',
unlike Be's rootfs. Shall I add those, Axel?
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8895 a95241bf-73f2-0310-859d-f6bbb57e9c96
This has the advantage that the device can now be access in the right context.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8876 a95241bf-73f2-0310-859d-f6bbb57e9c96
Fixed the calculation of the amount of bytes read in bootfs_read_pages().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8874 a95241bf-73f2-0310-859d-f6bbb57e9c96