Commit Graph

1300 Commits

Author SHA1 Message Date
Axel Dörfler
de0807a907 Now uses the file name to build the area name, and not the full path anymore.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9707 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-01 15:24:39 +00:00
Axel Dörfler
e4211d820c Fixed another bad bug in the file cache: when one iovec would have to be
divided into several parts, it could happen that overwrite the whole data
portion with data beyond the part that should have been read.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9706 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-01 15:20:27 +00:00
Axel Dörfler
eef883acab Semaphores created in the kernel always belong to the kernel; there is
absolutely no reason to move them to B_SYSTEM_TEAM (additionally, during
startup, set_sem_owner() may crash).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9693 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-01 00:52:27 +00:00
Axel Dörfler
efdc9c95d0 Replaced SYS_MAX_PATH_LEN with B_PATH_NAME_LENGTH.
Changed the last argument of _kern_mount() to be a string rather than a void pointer.
Greatly reduced the stack usage of _user_mount(); it now uses KPath instead
of on stack paths. It now also copies the parameter argument on the heap.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9692 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-01 00:35:27 +00:00
Axel Dörfler
6f5f688cde Thanks to Ingo, symbolic links are now correctly read all the time.
devfs_read_link() and rootfs_read_link() could write beyond the buffer
size passed in (off by one).
The comment for _kern_read_link() didn't fit to what the function really
did.
common_read_link() no longer null terminates the link - it's the file
system's responsibility to do that.
fs_read_link() is not supposed to return the length of the link anymore,
but only B_OK for success.

Note, we deviate slightly from POSIX here, where even a buffer too small
would be filled, and no terminating null byte has to be written at all.
We always return an error in case the buffer is too small, and the link
is not partially copied into the buffer.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9652 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-29 13:11:46 +00:00
Axel Dörfler
eeb4323204 Implemented devfs_unpublish_partition() and devfs_unpublish_file_device().
Made the FS internal API a bit more consistent.
Removed devfs_unlink(), and devfs_rename() (which was just returning EROFS
anyway) - the devfs now appears completely read-only to the user. All
changes are triggered by kernel internal APIs (most usually through either
the devfs itself (old style drivers), the disk_device_manager, or the
standard device_manager).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9645 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-29 02:24:30 +00:00
Axel Dörfler
e876e8c516 Implemented devfs_publish_file_device(); it should actually work, but I haven't tested it yet.
Also implemented the now needed devfs_read_link() function.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9644 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-29 01:58:08 +00:00
Axel Dörfler
433c716b82 Removed the empty function stubs from this file (and basically moved there
where they belong). Lazy Ingo ;-)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9642 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-29 01:43:15 +00:00
Axel Dörfler
554e58f0d4 Added new functions devfs_[un]publish_file_device() - they're not implemented
yet, though, and just return B_ERROR.
devfs_unpublish_partition() now also returns B_ERROR since it's not yet
implemented.
Refactored the device publishing code, so that implementing devfs_publish_file_device()
will become easy.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9639 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-29 01:41:16 +00:00
Ingo Weinhold
de278b48c4 Now implements the _user_*() functions for the DDM syscalls.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9636 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-29 01:38:17 +00:00
Ingo Weinhold
7146639259 DDM syscalls added.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9635 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-29 01:37:37 +00:00
Ingo Weinhold
7fb2963ae4 * Added vfs_normalize_path() service call.
* Added resolve_mount_point_to_volume_root() which does what
  resolve_volume_root_to_mount_point() did. IOW the latter one didn't
  do what it advertised.
* Fixed dir_vnode_to_path(). Basically broken due to the broken
  resolve_volume_root_to_mount_point(), but also compared potentially
  unrelated vnode IDs (belonging to different volumes).
* Fixed get_dir_path_and_leaf(). It didn't deal correctly with paths
  ending in '/' (including the root dir).
* fs_mount() does now accept a NULL fsName, getting the FS name from
  the DDM in this case.
* fs_mount() now also supports mounting file images; it lets the DDM
  create a file device for them.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9629 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-28 22:31:43 +00:00
Ingo Weinhold
c06238cbd6 * Reworked publishing/unpublishing of the device. This is now basically
done by (currently not existing) devfs functions.
* Overridden GetMediaStatus() and GetGeometry() to return useful data.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9627 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-28 22:22:04 +00:00
Ingo Weinhold
1e2e4b3c71 Re-added support for file devices.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9626 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-28 22:18:20 +00:00
Ingo Weinhold
cba3b01fdf Added support for path normalization.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9625 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-28 22:16:41 +00:00
Ingo Weinhold
da87ac8c9a Added KFileDiskDevice to the build again. Fixed compile errors. It won't work yet, though.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9566 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-28 16:05:22 +00:00
Ingo Weinhold
6a6164e712 Renamed RecursiveLockAutoLocker to RecursiveLocker. Don't mount the standard file systems read-only anymore -- they either aren't or know better anyway.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9563 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-28 15:57:04 +00:00
Ingo Weinhold
e5452be634 Cleaned up GetPath(). In the kernel we no longer prefix the partition path names with "obos_" or "haiku_".
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9561 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-28 15:13:08 +00:00
Ingo Weinhold
0402530222 Extended Append() to also allow adding parts of path components. Added leaf component manipulation. Now always chop trailing slashes off the path.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9560 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-28 15:09:48 +00:00
Axel Dörfler
9902467dac Fixed the build in case debug output was enabled.
Moved the debug macros into the program flow, so that they don't look so
temporary :)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9557 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-28 00:32:10 +00:00
Ingo Weinhold
480742bd7a KPath added to the build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9556 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-27 22:15:11 +00:00
Ingo Weinhold
f3604f65e7 * Added missing `flags' parameter for the mount functions.
* fs_mount() and fs_unmount() are now aware of partitions. A device to
  be mounted is looked up by the DDM and the mount state and mount
  cookie of the corresponding KPartition are updated accordingly.
  Still missing is support for mounting files. Moreover the device path
  needs to be normalized.
* Added RecursiveLockAutoLocker class to ease the `goto errN' pain a bit.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9555 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-27 22:11:57 +00:00
Ingo Weinhold
5de8542789 Since the kernel links against libgcc.a and we use some C++ features that cause functions of libgcc.a to be included that use a couple of formerly undefined symbols (stderr, fprintf, abort, debugger) those had to be added to kernel_cpp.cpp. We don't build the kernel utils as static library anymore, since libgcc.a is listed at the end of the link command line and trying to change that would be a bit ugly. For C++ in the boot loader nothing changes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9554 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-27 22:07:00 +00:00
Ingo Weinhold
2cee54a863 Use KPath now.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9553 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-27 21:59:54 +00:00
Ingo Weinhold
8ece359269 Uses KPath now, which significantly reduces the stack footprint.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9552 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-27 21:59:05 +00:00
Ingo Weinhold
1766c66484 Added header directories needed now.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9551 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-27 21:57:23 +00:00
Ingo Weinhold
92eb857652 Used KPath where possible.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9550 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-27 21:56:38 +00:00
Ingo Weinhold
92221d2425 KPath is used now where possible.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9549 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-27 21:56:05 +00:00
Ingo Weinhold
1b5f626633 * Changes to use KPath where possible now.
* Made GetMediaStatus() a bit more robust. If the ioctl fails (e.g. if it
  is not implemented as in Thomas' drivers), it gets the device geometry
  and does not fail, if the device is not removable.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9546 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-27 21:52:33 +00:00
Ingo Weinhold
0707c10377 KPartition::GetPath() now uses the new KPath class, which makes it more convenient to use.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9545 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-27 21:48:47 +00:00
Ingo Weinhold
d68a188e6d Added class KPath. Convenient wrapper for a fixed-sized path buffer.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9541 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-27 21:41:16 +00:00
Ingo Weinhold
42b568aeb5 Moved to headers/private/kernel/disk_device_manager, since it is included by KDiskDevice.h.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9540 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-27 21:38:01 +00:00
Axel Dörfler
0ec71451f5 Added a more or less clean implementation of devfs_publish_partition(); might
be changed later.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9532 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-27 15:21:11 +00:00
Axel Dörfler
b81068c0c8 Turns out that the interrupts were temporarily turned on during startup,
and that main2() cannot therefore just wait until interrupts become
enabled.
Now, the main2() thread is resumed after interrupts are turned on.
I am not yet sure if this is really necessary, but I have the feeling that it is.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9531 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-27 14:00:40 +00:00
Axel Dörfler
4002d2d272 Improved state_to_text() output to match the states in get_thread_info().
Improved the threads list: despite looking much better, it now also prints
out the semaphore number a thread is waiting on.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9530 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-27 12:50:48 +00:00
Axel Dörfler
b229567a92 Now puts out a message if the kernel doesn't fit to the boot loader.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9519 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-26 23:31:48 +00:00
Axel Dörfler
c32cb87156 Moved arch_dbg_con_init() to the end of the file.
Added the new arch_dbg_con_early_boot_message() function.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9518 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-26 23:30:51 +00:00
Axel Dörfler
8083619cf7 Since the additional 512 bytes of dprintf() on the stack can potentially
change the flow of things, it now has its own buffer, and fills it with
interrupts disabled (everything comes at a price).
Now uses the safe vsnprintf() instead of vsprintf() which could crash
the kernel.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9510 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-25 22:53:37 +00:00
Axel Dörfler
e88a0f0885 thread_init() now calls the new arch_thread_init() function.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9509 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-25 22:30:44 +00:00
Axel Dörfler
f9fea8ac78 A clean FPU state is now saved during init, and copied into every fresh
thread. That also allows kernel threads to use the FPU as well.
arch_thread_enter_uspace() no longer needs to initialize the FPU.
i386_stack_init() is now only called once, in arch_thread_init(), as
thought.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9508 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-25 22:29:00 +00:00
Axel Dörfler
ad2a2999a9 In early boot mode, open_module_list() is not able to find everything we
want it to find; therefore, we're now using get_next_loaded_module_name().
Added a temporary suffix to the FS DDM modules (disk_device/v1) - they
might get merged with the standard FS interface modules.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9503 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-25 13:53:52 +00:00
Axel Dörfler
06eec38c23 Added a table with the names of the standard interrupts on x86: they are
now printed out when an unhandled exception is taken.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9483 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-24 14:42:43 +00:00
Axel Dörfler
3ae4fa637a Now also prints the size of every stack frame, as well as the kernel and
eventual user stack regions of the thread.
The registers are no longer jumping around depending on the length of their values.
Removed some unused or doubly included headers.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9479 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-24 14:02:51 +00:00
Axel Dörfler
ddccb72483 Improved the kernel debugger's "thread" command: it will now dump the current
thread if no arguments were given.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9462 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-23 17:09:51 +00:00
Axel Dörfler
8c3666d980 Renamed heap_init_postsem() to _post_sem(), added new heap_init_post_thread().
We now have a working periodic wall checker, enabled by USE_CHECKING_WALL.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9459 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-23 13:59:27 +00:00
Axel Dörfler
842b03d549 Now calls vm_free_kernel_args().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9458 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-23 13:53:13 +00:00
Axel Dörfler
25c4f39f68 Implemented vm_free_kernel_args() which frees all arguments from the kernel_args arguments
list (but not the structure itself).
Now calls heap_init_post_thread(), heap_init_post_sem() was called ..._postsem() before.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9457 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-23 13:52:42 +00:00
Axel Dörfler
4a3a8d94e5 Add a different approach to calm down page fault handling when debug output is enabled.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9443 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-21 02:44:07 +00:00
Axel Dörfler
8a37c740eb Renamed some init2() functions to init_post_vm() to make clearer when and why
they are called.
Fixed some return types (mostly from int to status_t).
Some minor other cleanup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9440 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-21 01:50:09 +00:00
Axel Dörfler
d330cc09e2 Renamed some init2() functions to init_post_vm() to make clearer when and why
they are called.
Introduced a cpu_init_post_vm() that will now call arch_init_post_vm() instead
of letting main() doing it.
Fixed some return types (mostly from int to status_t).
Some minor other cleanup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9439 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-21 01:45:43 +00:00
Axel Dörfler
93048e141e The decision to put reserved regions along real ones proves problematic: fixed
three code locations that didn't handle them properly (when iterating over all
areas).
That and the fact that unmap_and_free_physical_pages() is no longer broken now
leads to the boot region being unmapped and freed properly as intended before.
That revealed another bug: the boot loader region was disposed too early, we
need a few other components pick up boot loader resources first; it now happens
in vm_init_post_sem().
allocate_kernel_args() was also broken, and actually didn't try to allocate
kernel args areas, but tried to reallocate all the virtual allocated ranges
of the boot loader...


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9437 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-21 01:38:37 +00:00
Axel Dörfler
3433f318e0 Disabled the USE_WALL checking by default.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9435 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-20 10:53:03 +00:00
Axel Dörfler
7605ddddf0 Replaced all remaining PAGE_SIZE with B_PAGE_SIZE and "addr" with addr_t.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9430 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-20 00:19:38 +00:00
Axel Dörfler
64807a40c3 As Thomas and I found out in a late debugging session, the VM handled the
boot loaders passed in memory completely wrong (for example, the premapped
graphics buffer could be mapped to the same region as some thread stacks,
just because the VM did not use its knowledge about that mapping): the boot
loader regions are now reserved so that they cannot be overwritten
with other regions anymore. The kernel_args arguments are now tracked, and
areas are created for them (they are not yet freed, though). arch_vm_init_end()
must now call the new vm_free_unused_boot_loader_range() to free any remaining
parts of the memory not yet mapped in by any areas.
Renamed a lot of init functions (ie. postsem to post_sem, init2 to post_area),
also updated because of the vm_translation_map*() arch_vm_translation_map*() move.
B_ALREADY_WIRED can now only be used during kernel startup (it's a private flag).
Replaced PAGE_SIZE with B_PAGE_SIZE.
Some minor cleanups.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9429 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-19 23:51:42 +00:00
Axel Dörfler
be84cd391c Renamed vm_alloc_from_ka_struct() to vm_alloc_from_kernel_args().
Replaced PAGE_SIZE with B_PAGE_SIZE.
Changed some return types to status_t.
Added proper debugging macro instead of dprintf() usage - disabled
debugging output.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9428 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-19 23:41:48 +00:00
Axel Dörfler
952d67454e Now make sure that the kernel address space translation map is initialized
correctly by calling arch_vm_translation_map_init_kernel_map_post_sem().
dump_aspace() now behaves like all debugging functions should behave: it
now accepts decimal numbers as well as hexadecimal numbers as IDs.
vm_translation_map_create() was renamed to arch_translation_map_init_map().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9427 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-19 23:38:05 +00:00
Axel Dörfler
189a0b84e6 Renamed all externally available functions to have the arch_ prefix.
Moved some functions around, so that the public functions come last.
Renamed the internal vm_translation_map_quick_query() to early_query(),
renamed vm_translation_map_quick_map() to arch_vm_translation_map_early_map().
Removed the _module part of the initialization functions.
Added a function that completes the initialization of the kernel map (it
creates the map's lock, which was just not done before).
arch_vm_translation_map_init_map() will now fail with an appropriate
error code if the map's lock couldn't be created for anything that
is not the kernel map.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9426 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-19 23:35:30 +00:00
Axel Dörfler
10abe59096 Since only the arch dependent code may know how much memory the boot
loader preallocated, arch_vm_init_end() (formerly called _endvm())
now calls the new vm_free_unused_boot_loader_range() with the correct
parameters.
Moved the creation of the DMA area from 0-0xa0000 into arch_vm_init_post_area().
Changed return types to status_t rather than just having "int" stand
for a status code.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9425 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-19 23:25:32 +00:00
Axel Dörfler
8d7e89291f The VM init calls were renamed.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9424 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-19 23:21:07 +00:00
Axel Dörfler
8df71f7876 Fixed compilation with debug output enabled.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9407 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-19 00:31:54 +00:00
Axel Dörfler
db01e67532 Added a comment about what vm_alloc_from_ka_struct() is used for.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9400 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-18 15:56:08 +00:00
Axel Dörfler
0d2dca3b56 That requirement hasn't changed with the name :)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9399 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-18 15:43:16 +00:00
Axel Dörfler
2fdc57b522 BeGeistert checkin: fixed broken allocation length as found by the USE_WALL
feature.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9398 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-18 15:39:21 +00:00
Axel Dörfler
cc0c987a28 No longer relies on certain allocation aligments of malloc(), and instead
uses the new memalign() call.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9397 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-18 15:36:31 +00:00
Axel Dörfler
09ff55a821 BeGeistert checkin: we now have memalign() - and because of that, the
USE_WALL feature can now be used.
Started implementing a USE_CHECKING_WALLS feature, that has a kernel
daemon running that periodically checks the walls of *all* memory
allocations - does not work yet (because of some initialization order
problems).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9396 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-18 15:29:17 +00:00
Axel Dörfler
e1e5a66bc2 BeGeistert checkin: wait_for_child() does now work as expected for any
team and process group IDs as well.
Added a ToDo item that process groups do only work well as long as
their group leader is still active.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9394 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-18 15:16:00 +00:00
Axel Dörfler
b767f41204 BeGeistert checkin: if B_RELEASE_ALL is used, the "count" argument should be
ignored completely (so that zero and below become valid).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9393 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-18 15:14:03 +00:00
Axel Dörfler
2b6c3301f7 Forgot to put the forked team into its parent group in fork_team() - which
resulted in a nice crash on exit.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9371 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-15 16:14:51 +00:00
Axel Dörfler
8cab02c5ce Removed the TRACEPFAULT macro, as it's not really that useful.
Fixed some warnings with debug output enabled.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9370 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-15 16:06:14 +00:00
Axel Dörfler
8593dcc214 Being on a kernel stack doesn't mean we didn't come from userland: we now
no longer pop %fs from the iframe in that case, too.
When we restore a custom stack, however, we'll now pop %fs from the iframe
as such strange threads may even do their own business with it.
Added some comments.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9369 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-15 15:50:41 +00:00
Axel Dörfler
d296d770a3 %fs won't be adopted from the iframe anymore, we don't need to change it there.
We also should disable interrupts in arch_restore_fork_frame().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9368 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-15 15:47:34 +00:00
Axel Dörfler
ba9c55b555 Sure, that bug waited *that* long to pop up.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9367 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-15 14:20:51 +00:00
Axel Dörfler
a7fa05a54b Since arguments may on the stack even in the kernel, load_image() now
always copies the arguments and environment arrays.
No need for the "owns_arrays" in team_arg anymore - it now always owns
them.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9363 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-15 01:52:07 +00:00
Axel Dörfler
4578da13a4 main() now waits until interrupts are available before bringing the device drivers up.
Switched to load_image() instad of using the old team_create_team() to start "init".


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9361 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-14 18:18:22 +00:00
Axel Dörfler
bd4b903e57 Switched from the old team_create_team() to a load_image() compatible mechanism.
The path name is now always taken from the provided argument list (except for
_user_exec() which now replaces args[0] with the path argument).
The team_arg structure know nows if it must delete its arguments or not - this
also fixes a memory leak in case team_create_team() failed when invoked from
userland.
load_image() is now also exported for the kernel.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9360 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-14 18:07:04 +00:00
Axel Dörfler
4711148ca9 wait_for_child() can now also wait on children in the current or any other
process ID (in the current session).
get_death_entry() could call free() with interrupts disabled; now follows
the same mechanism as chosen with the groups (ie. it returns a pointer
to a death_entry to be freed by the calling function).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9354 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-14 15:42:56 +00:00
Axel Dörfler
38cd9a7521 send_signal_etc() is now capable of broadcasting a signal to all teams in
the specified process group (by passing in a negative pid, as in BeOS).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9351 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-14 14:48:40 +00:00
Axel Dörfler
6a70123a9d Big update, but everything is related:
- we now have a working process group/session model. Implemented related syscalls
  and the kernel backend, some POSIX process functions are now available in the
  kernel as well.
- dying teams now monitor their exitus by leaving death_entry structures in
  their parent team.
- Implemented wait_for_child() for pid == -1 and pid > 0; IOW waiting for process
  groups is missing yet. Hasn't yet been tested intensively.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9350 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-14 14:46:12 +00:00
Axel Dörfler
f197107a3d B_RELEASE_ALL is now a bit faster if it has nothing to do.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9349 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-14 14:37:39 +00:00
Axel Dörfler
b51a65027b Fixed a warning.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9343 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-14 14:24:42 +00:00
Axel Dörfler
48e64cd7c8 Added two experimental release_sem_etc() flags (both should stay, but they
may be renamed):
- B_RELEASE_ALL: the semaphore count is set to 0, all waiting threads are released
  (the "count" argument of release_etc_sem() is ignored then)
- B_RELEASE_IF_WAITING_ONLY: the semaphore count is only decreased if there
  are any waiting threads; ie. the semaphore is signaled
Together, they will make the pthread_cond_*() functions easy to implement, and
they come in handy at other places, too.
Removed release_threads variable in release_sem_etc(), as it was useless.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9330 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-13 15:55:30 +00:00
Axel Dörfler
1956e69d13 Moved the thread::sem fields into their own sub-structure for clarity.
Some minor cleanups.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9328 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-13 15:19:08 +00:00
Axel Dörfler
386977d795 Removed delete_sem_etc(), there is no thread::sem_deleted_retcode anymore.
Also removed syscall for that function (shouldn't have been there in the
first place, anyway).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9325 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-13 14:56:44 +00:00
Axel Dörfler
c8e662b19c Changed some thread exit related fields.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9324 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-13 14:54:51 +00:00
Axel Dörfler
c2289a8876 Changed the way a dying thread propagates its exit status and reason: we
no longer abuse the semaphore mechanism to carry an extra status value,
instead, wait_for_thread() registers a death_entry with the thread that
will be filled upon exit.
Removed delete_sem_etc() as it's no longer of use or available.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9323 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-13 14:52:52 +00:00
Axel Dörfler
822e4e0b41 suspend_thread() and resume_thread() no longer have the B_DO_NOT_RESCHEDULE
flag set.
Fixes _user_wait_for_thread() which returned an invalid return code in case
of error.
Some minor cosmetics.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9321 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-13 13:10:27 +00:00
Axel Dörfler
4609c64d48 The %fs register is used by user space TLS - it is CPU dependent, and must
not be restored from the iframe; it will be set by the scheduling code.
This is only of concern on SMP machines and could prevent TLS from working.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9310 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-12 22:42:22 +00:00
Axel Dörfler
fdbd1b5d7b fork_team() is working now! It might not be 100% complete (signal handling),
but the kernel part seems to work good enough for now.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9296 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-12 04:03:52 +00:00
Axel Dörfler
a52cce2963 Moved thread_kthread_{entry|exit}() to where they are found easier.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9294 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-12 03:55:46 +00:00
Axel Dörfler
adf29fcdda Removed the broken arch_thread::current_iframe field and switched to the
same mechanism as NewOS, ie. using the iframe "stack" pointer (using the
new i386_get_current_iframe() function).
Implemented fork() support functions arch_{store|restore}_fork_frame().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9292 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-12 03:52:53 +00:00
Axel Dörfler
21942ca92a The arch_thread::current_iframe was not only redundant, but also incorrectly
maintained. Removed it completely.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9291 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-12 03:48:51 +00:00
Axel Dörfler
27d0a0aaff Implemented new i386_restore_frame_from_syscall() function needed by fork().
Added some comments.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9290 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-12 03:47:09 +00:00
Axel Dörfler
8bf77a7332 _get_next_area_info() skipped every second area if they were adjacent.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9289 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-12 02:50:30 +00:00
Axel Dörfler
d3ddbef95c vm_copy_on_write_area() did not correctly set the upper cache_ref - vm_cache's
pointer to the ref was not set (resulting in a crash).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9282 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-11 12:23:02 +00:00
Axel Dörfler
41dbd5191c Fixed vm_copy_area() when B_CLONE_ADDRESS was specified (insert_area() does not
know about this specifier, it has to be replaced by B_EXACT_ADDRESS).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9281 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-11 12:02:20 +00:00
Axel Dörfler
71eeb427c3 Implemented team_get_address_space() which gets you a pointer to the
team's address space - for internal use, anyway.
Added a ToDo: item to exec_team() to remind me of alarms and signals.
Started implementing fork_team() based on team_create_team() - it's not
completed (or even works), though.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9279 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-10 17:30:42 +00:00
Axel Dörfler
7bb329730d vm_delete_areas() didn't do any locking, but the address space region list
must not be accessed without it.
Implemented _get_next_area_info() and _user_get_next_area_info().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9277 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-10 17:23:54 +00:00
Axel Dörfler
b9d74a6b88 Added vm_delete_aspace() again - unlike before, it now also puts the last
reference to the address space, so that the calling team deletion function
doesn't have to do this.
delete_address_space() doesn't have to delete any areas anymore, since
at the point it's called, there is no area anymore, anyway: each area
holds a reference to the address space.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9276 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-10 17:21:38 +00:00
Axel Dörfler
b492de88e3 I've already switched the page pointer to vm_cache, so this comment was
not necessary anymore.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9268 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-08 23:27:04 +00:00
Axel Dörfler
adf3b19660 resize_area() must unmap the area beyond the new size, if the area has shrinked.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9267 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-08 23:19:33 +00:00
Axel Dörfler
ed3d2e92e8 Added tests for vm_copy_area() and resize_area().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9266 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-08 23:12:55 +00:00
Axel Dörfler
ad07c81011 vm_cache_resize() now requires you to have the vm_cache_ref lock held.
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
2004-10-08 23:11:50 +00:00
Axel Dörfler
f774bf16ea Implemented vm_copy_area(), mainly a support function for fork().
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
2004-10-08 22:56:51 +00:00
Axel Dörfler
c77c1efff5 Removed the broken vm_resize_region() and implemented it properly in resize_area(),
some ToDo-items are left.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9260 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-08 15:16:29 +00:00
Axel Dörfler
d0f673c8e2 Implemented vm_cache_resize(): it removes all pages outside the current bounds.
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
2004-10-08 15:10:50 +00:00
Axel Dörfler
6978315d3a B_EXACT_KERNEL_ADDRESS doesn't really make a lot of sense.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9256 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-08 01:16:54 +00:00
Axel Dörfler
da504d877d Removed team::_aspace_id since it already has a direct pointer to it.
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
2004-10-07 17:17:04 +00:00
Axel Dörfler
1a705b91b7 Removed team::_aspace_id since it already has a direct pointer to it.
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
2004-10-07 17:11:54 +00:00
Axel Dörfler
894e120a01 Moved everything from vm.c belonging to vm_address_space into a separate file.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9253 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-07 16:15:49 +00:00
Axel Dörfler
acfca1a3f5 We now have a working exec_team() function (the backend of the exec() function family)!
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
2004-10-07 15:34:17 +00:00
Axel Dörfler
5ad2b8edae Added exec() support function vm_delete_areas(); factored that code out
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
2004-10-07 15:15:08 +00:00
Axel Dörfler
5c41c39314 Implemented exec() support function vfs_exec_io_context() which closes all
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
2004-10-07 14:47:58 +00:00
Ingo Weinhold
5741bcb5d8 * Eliminated fs_mount::mount_point. It wasn't really used anyway, only
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
2004-10-05 16:08:31 +00:00
Axel Dörfler
d6571884c7 Added basic fcntl() functions and syscalls.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9201 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-05 13:36:44 +00:00
Axel Dörfler
c7a0c0f9e1 Added set_flags() support where needed. devfs now uses the ioctl() mechanism
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
2004-10-05 13:24:12 +00:00
Axel Dörfler
40cc0ebde2 Added an endless loop detection; it will now store up to 16 stack positions
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
2004-10-04 22:52:56 +00:00
Axel Dörfler
0f5095f9f9 Now uses thread::user_stack_size instead of STACK_SIZE. This also fixes a
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
2004-10-04 22:41:34 +00:00
Axel Dörfler
57bf060563 Fixed another stupid bug in the file cache: when the first read was a partial
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
2004-10-04 21:03:31 +00:00
Axel Dörfler
2c8b3014ef Moved select events to Select.h. Now includes that header, too.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9142 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-01 00:31:20 +00:00
Ingo Weinhold
b4c1459318 Make use of the newly introduced generated syscall numbers header.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9135 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-30 23:30:29 +00:00
Ingo Weinhold
89e53cea26 It is now understood where the _kern_restore_signal_frame() is used.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9132 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-30 23:25:55 +00:00
Axel Dörfler
8b41e11557 Fixed a possible deadlock (the requests benaphore is now unlocked before
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
2004-09-29 14:30:53 +00:00
Axel Dörfler
a83d9efacf Some changes to debug output.
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
2004-09-29 14:24:44 +00:00
Axel Dörfler
f3df760478 Fixed the return type of user_memcpy() and friends.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9105 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-29 10:47:46 +00:00
Axel Dörfler
f7bc46254a readwrite() was broken when it had to load more than one missing page at once.
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
2004-09-28 16:30:25 +00:00
Axel Dörfler
da63fa920a device_open() gets the relative path from devfs mount point, not just the
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
2004-09-28 03:22:56 +00:00
Ingo Weinhold
3b554981d3 * Corrected sMountMutex comment.
* 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
2004-09-17 12:29:27 +00:00
Axel Dörfler
452ba3abd1 Just like any other mount point, "/" should not be remounted - dunno
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
2004-09-16 15:34:26 +00:00
Axel Dörfler
41f37da0fd Added empty and non-working syscalls for _user_fork(), _user_wait_for_child(),
and _user_exec().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8973 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-15 15:45:37 +00:00
Axel Dörfler
75e4b8694c Removed the STREAM_TYPE_ constants.
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
2004-09-15 00:44:57 +00:00
Axel Dörfler
31a726883b Now maintains uid/gid/mode/mtime/crtime, added pipefs_write_stat().
Access permissions are not verified.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8961 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-15 00:15:52 +00:00
Axel Dörfler
e4a0232cc7 Small bugfix: rootfs_read_stat() returned creation time instead of modification
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
2004-09-15 00:02:55 +00:00
Axel Dörfler
a837c705f5 Now has a basic understanding of uid/gid/mode values and maintains it -
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
2004-09-14 23:42:14 +00:00
Axel Dörfler
2ef444519e Work-around for buggy device drivers: some drivers (including our current
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
2004-09-14 17:37:43 +00:00
Axel Dörfler
aad5dc5b3d Removed holding the sMountOpMutex added by the last commit; although this
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
2004-09-14 15:46:02 +00:00
Ingo Weinhold
79c795cc5d * create_new_vnode() now also fails, if the volume is about to be
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
2004-09-13 14:53:09 +00:00
Ingo Weinhold
2c731698a2 Verified incorrect behavior of entry_ref_to_vnode() when hitting a mount point or the parent of a mount point.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8923 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-12 10:58:29 +00:00
Ingo Weinhold
1f8bfacc76 *_read_dir() now also returns "." and ".." Entries.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8922 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-12 00:06:37 +00:00
Ingo Weinhold
4f9e4fc932 * The VFS cannot just pass the result of fs_read_dir() calls back to
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
2004-09-12 00:05:51 +00:00
Ingo Weinhold
119e5eeef8 *_read_dir() now also returns "." and ".." Entries.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8920 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-12 00:00:29 +00:00
Axel Dörfler
eab2037630 When a B_CONTIGUOUS area is created, its pages are now reserved upfront, as
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
2004-09-11 00:38:54 +00:00
Axel Dörfler
76faade4e7 Cleanup, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8910 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-10 23:43:15 +00:00
Axel Dörfler
d79751261c Added write support for the cache - it only writes internally right now,
it never writes back dirty pages. Code is not tested!


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8905 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-10 19:49:46 +00:00
Axel Dörfler
327981c3d8 Now includes arch_config.h instead of arch_cpu.h (because the info contained therein has moved).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8901 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-10 15:20:37 +00:00
Ingo Weinhold
61b83cc210 * Changed my doxygen comment markers from Qt to javadoc style, still
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
2004-09-09 23:21:09 +00:00
Ingo Weinhold
86170a3cd5 * Got rid of devfs_cookie::stream. It was superfluous since one can
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
2004-09-09 23:06:04 +00:00
Ingo Weinhold
1dae20235b If the /..' is /' then the name of the root node should consequently be
`.'. 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
2004-09-08 21:31:18 +00:00
Axel Dörfler
bd80f1c775 Now handles NULL cookies for the VM fs calls gracefully (in case someone
would want to mmap() a device directly).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8884 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-07 15:39:03 +00:00
Axel Dörfler
dc3089f8ff Added a "cookie" parameter to the fs_read|write|has_page[s]().
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
2004-09-06 22:48:58 +00:00
Axel Dörfler
dd6cb90eac Added a "cookie" parameter to the fs_read|write|has_page[s]().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8875 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-06 22:34:08 +00:00
Axel Dörfler
68085f7cec Added a "cookie" parameter to the fs_read|write|has_page[s]().
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
2004-09-06 22:32:00 +00:00
Axel Dörfler
2829b349c6 Added a "cookie" parameter to the vfs_read|write|has_page[s]().
Added an vfs_get_cookie_from_fd() call to at least temporarily support the
cookie as in the original devfs (not sure yet how this changes).
Implemented vfs_get_file_map() which calls the corresponding FS function.
Moved vfs_get_vnode_cache() around.
vfs_get_vnode() temporarily does its job unlocked - its only to be used (safely)
from within the file cache, but this should definitely be done better.
Fixed a bug in get_vnode_name() - it did not support getting the name of
a root directory; it didn't pass the call through to the parent file system.
Fixed a bug in _user_entry_ref_to_path() which would add another "/" for
files immediately under the root (ie. "df" showed "//boot" as mount point
for the boot partition).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8873 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-06 22:29:20 +00:00
Axel Dörfler
55efd37df7 Added the file_cache.cpp file to the build.
_KERNEL_MODE is already defined when using kernel build rules, no need
to do it here manually.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8872 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-06 22:05:46 +00:00
Axel Dörfler
e02c12f0b3 Added a "cookie" parameter to the vfs_read|write|has_page[s]().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8871 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-06 22:03:47 +00:00
Axel Dörfler
f72376a8dd The beginnings of a file cache. Read-only is already working fine; very
basic and with a temporary API.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8859 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-06 01:23:57 +00:00
Axel Dörfler
7f2ba8be02 Now clears out any remainders of the pages in the iovecs if the request
couldn't be satisfied completely (ie. because the file size is not a
multiple of the page size).
It's no longer necessary to implement this functionality in the file systems.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8858 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-05 14:57:54 +00:00
Axel Dörfler
14d725bb50 The VM fs interface has changed to better match the one of the device interface.
Added a new fs call for the file cache.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8851 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-04 17:48:11 +00:00
Axel Dörfler
33657fc8ac No longer gets the old device_hooks but a pnp_devfs_driver_hooks structure
to be able to call device functions.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8850 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-04 17:47:08 +00:00
Axel Dörfler
f363b7231f Eliminated the internal device_info structure - the devfs will now store the
node and its interface directly. It will also convert the old interface into
the new one to simplify the implementation.
devfs_open() now contains the former pnp_devfs_open() as well.
devfs_publish_device() no longer passes the "ident" parameter to its lower
layers - it will be removed.
The VM fs interface has changed to better match the one of the device interface.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8849 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-04 17:46:10 +00:00
Axel Dörfler
26de720c84 The VM store interface has changed to better match the one of the device interface.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8848 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-04 17:41:42 +00:00
Axel Dörfler
c66a5d50b7 "Improved" a commentary.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8847 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-04 17:36:50 +00:00
Axel Dörfler
b8d0a6779d pnp_node_info is now a little bit more public and can now be found in kdevice_manager.h.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8846 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-04 17:35:15 +00:00
Axel Dörfler
f6d0f5ea94 Accidently activated debug output with the last change.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8835 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-03 19:27:20 +00:00
Axel Dörfler
f3165b2826 Removed the vm_store::data field. Cleaned up the files a bit, removed
unused headers.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8834 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-03 19:08:47 +00:00
Axel Dörfler
80249479d4 No longer needed, we're now using the vnode store in ../cache/vnode_store.cpp.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8831 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-03 17:06:47 +00:00
Axel Dörfler
5ad8418606 Now uses the new vnode store.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8830 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-03 17:05:21 +00:00
Axel Dörfler
447a16653a Added a basic vnode store, more or less the same as the old one.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8829 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-03 17:04:09 +00:00
Axel Dörfler
21c6ae44d3 vfs_get_vnode_cache() was pretty broken, and didn't returned the correct
cache pointer in most cases.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8825 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-03 15:55:41 +00:00
Axel Dörfler
103d0293a9 Moved this file to ../cache/block_cache.cpp.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8824 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-03 15:40:10 +00:00
Axel Dörfler
35df9fef55 Removed cache.cpp from the build.
Removed unnecessary grist from source files.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8823 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-03 15:39:14 +00:00
Axel Dörfler
e521a22974 Added the "cache" subdirectory to the build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8821 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-03 15:36:35 +00:00
Axel Dörfler
3a976c2844 Adds block_cache.cpp to the build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8820 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-03 15:35:32 +00:00
Axel Dörfler
125f4d5101 Implemented a "block map" that can efficiently map contiguous blocks to
addresses.
Not yet used - might be used instead of the vm_cache page caching for the file cache.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8819 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-03 15:34:24 +00:00
Axel Dörfler
6a3016d2ab Moved the block cache to this file (from ../vm/cache.cpp).
It still contains a very dump version of a BeOS compatible block cache.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8818 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-03 15:32:20 +00:00
Axel Dörfler
4872592920 Changed the way the vnode cache is set - it's now cleaner and can no longer
allocate a cache twice.
The VFS is now responsible for allocating the cache object - it will call
the VM to do that if necessary.
Added another accessor call to a pointer to the VFS private vnode object.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8817 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-03 14:11:04 +00:00
Axel Dörfler
2f1cbcf862 Changed the way the vnode cache is set - it's now cleaner and can no longer
allocate a cache twice. Now handles resource shortages gracefully.
Added small description to _vm_map_file().
Minor other cleanup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8816 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-03 14:09:26 +00:00
Axel Dörfler
74cbf93e61 Added and improved lots of comments in vm_soft_fault().
Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8800 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-02 15:13:15 +00:00
Axel Dörfler
05835518ae Added a function prototype and description on how the userland waitpid()
functionality could be supported.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8790 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-02 01:41:06 +00:00
Axel Dörfler
d5b3917b25 Introduced new thread_entry_func type.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8778 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-01 15:48:36 +00:00
Axel Dörfler
d32f5c2e8b Added probably broken implementation of sigprocmask().
Renamed syscalls to the new scheme.
Some minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8770 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-01 12:05:09 +00:00
Axel Dörfler
7ac08f006f The user image ELF loader is now silent when compiled without TRACE_ELF defined as long as no serious error occurs.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8737 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-31 04:56:15 +00:00
Axel Dörfler
1980b54a21 Fixed a stupid bug in list_move_to_list(): it did not work for empty lists.
The kernel no longer trashes memory when you delete a port without any
messages in its queue (i.e. you can now safely link against libbe.so :)).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8736 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-31 04:45:02 +00:00
Axel Dörfler
0ebb4701b9 fs_read_info() will now also succeed if the file system in question does
not support the read_fs_info() function - only the values that the VFS
does know about are filled in, then.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8735 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-31 03:41:29 +00:00
Axel Dörfler
d885b0a17c Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8732 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-30 23:34:22 +00:00
Ingo Weinhold
48d046ac05 * Fixed usage of user_strlcpy() in several places.
* null-terminated the result of common_read_link().
* Fixed return value of _user_read_link().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8705 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-29 11:58:04 +00:00
Ingo Weinhold
f57dcf3200 Several follow-up changes required by the changes either to the VFS
syscalls or to the syscall mechanism (which exposed naming and parameter
inconsistencies).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8704 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-28 20:51:47 +00:00
Ingo Weinhold
383cdedbd2 Several follow-up changes required by the changes either to the VFS
syscalls or to the syscall mechanism (which exposed naming and parameter
inconsistencies).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8703 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-28 20:45:00 +00:00
Ingo Weinhold
9955b99a86 Several VFS related syscalls have been changed, added or removed.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8701 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-28 20:38:39 +00:00
Ingo Weinhold
6fec58934a We automatically generate what information are available from syscalls.h,
which from now on relieves us from the duty to maintain syscalls.S and
syscalls.c manually. Either includes a generated file.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8699 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-28 20:34:43 +00:00
Axel Dörfler
a48a5ab889 devfs now supports the I/O scheduler mechanism and automatically uses it
for all raw disk devices.
Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8685 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-28 13:33:31 +00:00
Axel Dörfler
6e3462b57e Added I/O scheduler to the build.
Removed unnecessary grist from source files.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8684 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-28 13:31:42 +00:00
Axel Dörfler
d3efd9a6ef Implemented the basic I/O scheduler architecture - doesn't schedule anything
yet, though (instead, it directly performs all requests, so there is no
functional difference to the previous mechanism).
devfs and the file cache will directly access the I/O scheduler. There is
one scheduler per raw disk device; devfs detects that automatically, and
all I/O will go through the scheduler, then.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8683 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-28 13:28:29 +00:00
Axel Dörfler
c96488c21d Now compiles fine as C++ file (fixed min() usage).
Added our license.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8681 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-27 17:57:43 +00:00
Axel Dörfler
ba74984309 Renamed devfs.c to devfs.cpp - it's now compiled as C++ file to allow usage
of kernel internal C++ API.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8680 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-27 17:46:48 +00:00
Axel Dörfler
ded78bc1ef Made changes to let this file be compiled as C++ file as well without warnings.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8679 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-27 17:44:08 +00:00
Axel Dörfler
96a34bfa35 Improved debug output - you know get the exact address of a page fault, not
rounded to the page offset.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8633 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-24 21:47:11 +00:00
Axel Dörfler
e2d2417f0c Fixed missing header (malloc.h was including this for us before).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8599 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-18 00:25:28 +00:00
Axel Dörfler
6cd4801539 Just to be on the safe side: no longer tries to load non-loadable segments.
Improved error output in case something goes wrong.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8598 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-18 00:22:57 +00:00
Axel Dörfler
d51a69a420 Removed some unneeded debug output.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8594 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-16 15:51:08 +00:00
Axel Dörfler
9e8be53690 Fixed a GCC 3 warning.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8593 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-16 15:49:53 +00:00
Axel Dörfler
c06b6654f3 _user_wait_for_team() no longer tries to copy the return code if its storage location is NULL.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8561 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-13 19:08:35 +00:00
Axel Dörfler
7d1a7f96ff _kern_debug_output() no longer accidently accesses unsafe user memory.
It now accepts strings of any size, reduced the stack consumption.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8559 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-13 17:45:54 +00:00
Axel Dörfler
93ad6cdf73 When DEBUG is defined, it adds a debugger command to list all images from
the current team.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8557 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-13 16:31:02 +00:00
Axel Dörfler
670f23dab5 The kernel now maintains device and file system names as well in order to
be able to fill the fs_info structure.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8553 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-13 04:20:06 +00:00
Axel Dörfler
3419b1d553 Fixes possible compiler warning, thanks to Bryan Duff for pointing this out.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8493 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-28 09:54:52 +00:00
Axel Dörfler
323fe5330d Fixed read/write return types.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8492 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-28 09:49:29 +00:00
Axel Dörfler
c13f87c4ef Implemented functionality needed for the next_dev() call.
Device IDs now start at 1, and not zero anymore.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8349 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-07 16:12:46 +00:00
Axel Dörfler
475708d278 Connected the _kern_next_device() syscall.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8348 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-07 16:10:43 +00:00
Axel Dörfler
e423368fa3 Connected syscalls for write/read fs info.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8307 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-05 18:27:55 +00:00
Axel Dörfler
58131f940d Implemented syscall to get the path for a directory node_ref and made it available to userland.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8280 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-02 18:48:58 +00:00
Axel Dörfler
8503a60446 Fixed typo that prevented compilation.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8271 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-02 02:57:29 +00:00
Axel Dörfler
be874324a3 VFS syscall prototypes have been moved to syscalls.h.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8270 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-02 02:56:06 +00:00
Axel Dörfler
7b89ff958c Now uses kernel exported POSIX functions instead of their internal counterparts.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8269 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-02 02:55:24 +00:00
Axel Dörfler
54f1ea35c7 Moved VFS syscall prototypes from vfs.h to syscalls.h.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8267 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-02 02:47:43 +00:00
Axel Dörfler
cfa218268b Moved VFS syscall prototypes from vfs.h to syscalls.h.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8266 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-02 02:38:03 +00:00
Axel Dörfler
0f579f8c6d Improved debug output when tracing is enabled.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8259 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-02 01:57:52 +00:00
Axel Dörfler
50dbc6bcbd Renamed node monitor syscalls to the new scheme.
Added comments from storage/NodeMonitor.cpp to the syscalls here (they
will be removed from NodeMonitor.cpp), and adapted them where necessary.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8237 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-29 20:25:21 +00:00
Axel Dörfler
e4901b9f4b "ls" now also prints the offset to the function.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8174 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-26 03:08:36 +00:00
Axel Dörfler
5a23dcc80b find_image_at_address() now also takes the data section into account, so
that you can now also look up symbols in there.
load_kernel_add_on() now sets the text section read-only & execute after
having loaded the area - note, it currently doesn't have any effect anyway :)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8173 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-26 02:15:48 +00:00
Axel Dörfler
a8441c4fd2 During early boot, put_module_image() will no longer unload anything when
there is no boot device available - this will prevent modules from getting
lost.
Added a comment to open_module_list() about its limitations while booting.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8170 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-26 01:40:46 +00:00
Axel Dörfler
00641fbdd8 Now maintains and exports a variable that points to the boot device.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8169 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-26 01:38:20 +00:00
Axel Dörfler
24e8f2c929 Fixed debugger command "dw" address translation, added better help output.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8150 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-25 00:44:54 +00:00
Axel Dörfler
8ed11b38dc Fixed a stupid bug; malloc() was called with the wrong size - always use the "struct"
keyword in sizeof().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8148 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-24 23:48:44 +00:00
Axel Dörfler
b045bd49f4 Kernel add-ons were not correctly registered (image_info was initialized
after the registration...).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8087 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-21 00:10:55 +00:00
Axel Dörfler
80180472db This fixes the PPC kernel build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8031 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-17 13:33:36 +00:00
Axel Dörfler
5829c4a2db Fixed warnings due to the changes in vm_translation_map.h.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8030 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-17 13:27:53 +00:00
Axel Dörfler
ae4a9c5f25 Fixed warnings due to the type changes in vm_translation_map.h.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8029 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-17 13:23:30 +00:00
Axel Dörfler
d001f09162 Removed the directory contents dump in vfs_mount_boot_file_system().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8004 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-16 13:26:39 +00:00
Axel Dörfler
578257f77e Fixed read/write fd functions return type.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8002 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-16 10:32:26 +00:00
Axel Dörfler
f24066f694 Now checks the kernel args structure size and version, and bails out if
it's not known (it currently only support the current version, of course :-).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7989 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 16:57:13 +00:00
Axel Dörfler
b8599dec8e Added needed header when tracing is enabled.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7975 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 15:40:21 +00:00
Axel Dörfler
5d5716e614 Now calls the new devfs partition (un)publishing calls.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7974 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 15:38:55 +00:00
Axel Dörfler
0d961b9fbc The KPartition base class does not know anything about publishing.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7973 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 15:37:46 +00:00
Axel Dörfler
affbc7ade7 Renamed VFS syscalls to the new style.
Improved returned types.
Added and initializes Disk Device Manager.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7972 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 15:35:10 +00:00
Axel Dörfler
bd2d09ddc3 Added empty implementations of the new partition publish/unpublish calls.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7970 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 15:32:22 +00:00
Axel Dörfler
9a0de43e56 Added private storage headers to be able to use disk device manager headers.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7969 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 15:30:59 +00:00
Axel Dörfler
c8a8e52f79 Renamed VFS syscalls to the new style.
Improved returned types.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7968 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 15:29:37 +00:00
Axel Dörfler
244272ccb4 Renamed VFS syscalls to the new style.
Fixed read/write calls to use and update the descriptor position.
Removed the CHECK_USER_ADDR() macro; it's now using the usual (more readable) check.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7967 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 15:28:33 +00:00
Axel Dörfler
32dc7b6393 Renamed VFS syscalls to the new style.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7966 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 15:26:22 +00:00
Axel Dörfler
e878738efd Fixed compilation with tracing turned on.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7965 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 15:25:25 +00:00
Stefano Ceccherini
6ed18b369b Fixes the build with gcc 3.2.2 (still has many warnings, though)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7950 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-14 08:46:38 +00:00
Axel Dörfler
e44da8eb5c Build was broken due to missing -fno-pic (have I mentioned that we need
a new build system? :-))


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7933 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-12 20:58:30 +00:00
Axel Dörfler
f6fed308e3 Rewrote KDiskDeviceManager::CreateDefault() to be easier to read and actually
return the correct error code in case there is one.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7932 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-12 20:57:11 +00:00
Axel Dörfler
c9690ffdd8 Changed the build so that all symbols are exported.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7916 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-11 21:25:23 +00:00
Axel Dörfler
499b29e3ea Made all necessary changes to build the DiskDeviceManager as part of the kernel.
Removed KFileDiskDevice functionality for now (since it would have required more changes).
Also disabled actual partition publishing/unpublishing, because this will
be done differently.
This change will temporarily break the DiskDeviceManagerTest build.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7914 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-11 21:03:31 +00:00
Axel Dörfler
e27f9449fe Now uses spawn_kernel_thread() instead of spawn_thread().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7911 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-11 15:47:19 +00:00
Axel Dörfler
4a847f30c5 Added exit_thread().
Changed thread_atkernel_exit() to look less broken - the way and when it's
called should still be investigated: NewOS looks a lot cleaner here.
create_thread() now creates the kernel stack upfront, so that it can easily
bail out of that fails. The user stack creation now makes use of B_BASE_ADDRESS
and is therefore a lot better and simpler. In case user stack creation failed,
it should now be able to handle that a lot more gracefully - but that hasn't
been tested yet...
Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7897 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-11 01:45:33 +00:00
Axel Dörfler
6e0526544a Now cuts off the path when it gives a team's main thread its name.
Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7896 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-11 01:36:29 +00:00
Axel Dörfler
7bdd1a7874 user_vm_map_file() was broken after recent changes; it didn't allow the
kernel to write to read-only userland areas.
Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7893 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-11 00:39:40 +00:00
Axel Dörfler
fab1cad1b8 Now other code accounts for reserved regions in the standard region_list as well.
Introduced RESERVED_REGION_ID definition.
Some minor cleanups.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7886 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-10 02:03:55 +00:00
Axel Dörfler
edfcb58323 Tuned message in case debug command "ls" fails.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7884 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-10 01:47:44 +00:00
Axel Dörfler
6f09e38dea team_create_team2() no longer panics if it couldn't create the userland
stack - it just fails now (since create_area() currently panics when it
fails, this is a cosmetic change anyway :-)).
Now correctly cleans up in case elf_load_user_image() fails.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7883 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-10 01:43:16 +00:00
Axel Dörfler
abd212c06a Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7882 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-10 01:39:17 +00:00
Axel Dörfler
6ee4a2f161 Removed B_EXACT_KERNEL_ADDRESS again.
Replaced "addr" with "addr_t".
Header cleanups.
There is no need to call set_tls_context() in arch_thread_init_tls().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7880 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-09 18:10:45 +00:00
Axel Dörfler
577402ea7e We now have text_region and data_region instead of the unclear array.
load_kernel_add_on() now protects the text area read-only (theoretically,
as set_area_protection() has not yet been implemented).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7879 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-09 02:55:54 +00:00
Axel Dörfler
9d256ebb6e We now have text_region and data_region instead of the unclear array.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7878 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-09 02:52:17 +00:00
Axel Dörfler
c9a96524d2 Modified load_kernel_add_on() to use the new address range reservation functions.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7876 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-09 02:24:51 +00:00
Axel Dörfler
500e879b20 Implemented vm_unreserve_address_range().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7875 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-09 02:18:18 +00:00
Axel Dörfler
76377cf3f5 - Removed B_EXACT_KERNEL_ADDRESS - doesn't make that much sense (it was a private
and (very) temporary extension, anyway).
- Fixed _user_create_area() - it will now also recognize B_ANY_KERNEL_BLOCK_AREA,
  and it will not access a kernel address for B_EXACT_ADDRESS.
- create_area() will now handle B_EXACT_ADDRESS correctly as well.
- get_memory_map() will now silently ignore the missing final entry if the map
  contains only one entry.
- The check for user memory was wrong in get_memory_map(); it worked, but it
  was not necessarily portable.
- vm_reserve_address_range() was not correctly initializing the region.
- find_and_insert_region_slot() will now search for reserved regions when
  B_EXACT_ADDRESS is used - not yet tested, though.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7871 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-09 01:04:51 +00:00
Axel Dörfler
98b3dfb3e1 Extracted the address specification stuff out of map_backing_store() and
created a call around find_and_insert_region_slot() that takes care of
everything. Fixed B_BASE_ADDRESS support (it now really works).
First shot at a new VM function vm_reserve_address_range() that will be
used to fix our ELF loader issues (which needs to create adjacent regions
which the VM cannot guaranty at this point).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7870 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-09 00:05:02 +00:00
Axel Dörfler
e243c52503 Now correctly handles B_BASE_ADDRESS, and probably B_ANY_KERNEL_BLOCK_ADDRESS,
too.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7866 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-08 22:55:39 +00:00
Axel Dörfler
706d99ca73 This patch from Jack Burton should finally fix the interrupt problems on
thread exit - get_death_stack() now returns the interrupt state so that
it can be restored correctly later.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7865 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-08 22:07:08 +00:00
Axel Dörfler
9c642b6454 Adjusted paths.
The stack of the main thread is now called "{team name}_main_stack" instead
of primary stack.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7863 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-08 21:35:14 +00:00
Stefano Ceccherini
f59a054710 Should always count to 10 before committing. Another comment
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7856 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-08 14:26:22 +00:00
Stefano Ceccherini
741f96a162 Added a comment
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7855 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-08 14:03:38 +00:00
Axel Dörfler
e2df52b7da The symlink traversion didn't balance the ref_count of the starting vnode
correctly when it entered the next recursion of vnode_path_to_vnode().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7854 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-08 11:34:49 +00:00
Axel Dörfler
c26e46469e Fixed warning I just introduced.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7853 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-08 10:17:32 +00:00
Axel Dörfler
3c20ebe8d7 Unified kernel loader area names (they now use "_text", and "_data" suffixes
only).
Userland segments are now called _seg0rw/_seg0ro.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7851 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-08 09:56:51 +00:00
Axel Dörfler
dc991aec9e Removed REGION_WIRING_* and REGION_ADDR_* and replaced them by their
BeOS counterparts.
Improved output of dump_region_list().
Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7850 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-08 09:45:50 +00:00
Axel Dörfler
ee7e4109ad Removed REGION_WIRING_* and REGION_ADDR_* and replaced them by their
BeOS counterparts.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7849 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-08 09:33:51 +00:00
Axel Dörfler
3c9e531071 Removed NewOS LOCK_KERNEL and LOCK_RW - replaced by B_READ_AREA, and friends.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7846 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-08 08:24:53 +00:00
Axel Dörfler
1adfa388af Hardcoded vfs_mount_boot_file_system() to try to mount the first raw SCSI
device with BFS - if it succeeds, it will print out the contents of the
volume's root directory.
fs_mount() now makes the mount structure available when mount() from the
FS is called - so that new_vnode() and get_vnode() can work.
fs_mount() did not correctly clean up when something went wrong; it also
didn't notice if the mount's recursive lock couldn't be created.
Some minor debug output improvements.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7845 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-08 06:43:46 +00:00
Axel Dörfler
e08f7c4e6f Added stupid version of parse_expression() for the kernel debugger.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7839 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-08 06:24:35 +00:00
Axel Dörfler
bd383ca361 Added simple and dumb BeOS compatible cache implementation - at this point
it's (almost) read only.
Added it to the build - libvm.a is now build as merged object file, since
the cache functions didn't get exported else.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7831 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-08 06:02:43 +00:00
Axel Dörfler
69debf9e84 get_module() didn't correctly maintain the module ref_count (in case
something went wrong) - this would have hidden circular dependencies
as well.
Recursive directory scan was broken, it didn't filter "." and ".." out.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7829 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-08 05:58:23 +00:00
Axel Dörfler
baae156b90 Added built-in file system modules.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7812 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-07 17:33:18 +00:00
Axel Dörfler
6fdd106e9a File systems are modules now, so the module initialization must come before
bootstrapping the initial file systems.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7811 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-07 17:32:16 +00:00
Axel Dörfler
730f5a50cc No longer needed.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7810 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-07 17:29:43 +00:00
Axel Dörfler
f8edd5ecee File systems are modules now; removed all those no longer file system add-on
things.
Added unremove_vnode().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7808 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-07 17:25:55 +00:00
Axel Dörfler
bc1f913e8b File systems are modules now.
Renamed gDeviceFileSystem to sDeviceFileSystem.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7807 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-07 17:22:32 +00:00
Axel Dörfler
093015033f File systems are modules now.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7806 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-07 17:20:59 +00:00
Axel Dörfler
287704526b Don't panic for now if the PnP-root node cannot be registered; it doesn't
harm in case bootfs is used for now.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7804 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-07 15:17:02 +00:00
Axel Dörfler
a0c7420724 Changes due to renaming the public fs functions.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7803 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-07 14:30:56 +00:00
Axel Dörfler
a540a3f904 Renamed the public fs functions (removed the vfs_ prefix), and separated
them from other functions.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7802 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-07 14:25:22 +00:00
Axel Dörfler
47197929ca Temporarily disabled bus manager iteration - this might be done differently
anyway when it's all done.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7788 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-07 01:45:16 +00:00
Axel Dörfler
12373950ab Added header guards, cleanup.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7787 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-07 01:40:08 +00:00
Axel Dörfler
a6426a42d7 Better debug output.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7786 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-07 01:35:53 +00:00
Axel Dörfler
8a0d571192 That word might even exist, who knows?
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7785 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-07 01:33:39 +00:00
Axel Dörfler
c8d5cf78c9 Improved debug output.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7784 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-07 01:28:51 +00:00
Axel Dörfler
d9918aa7e8 Added temporary hack to load the ISA bus manager.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7783 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-07 01:25:45 +00:00
Axel Dörfler
97dfc072d7 Added devfs module to the built-in modules.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7782 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-07 01:21:08 +00:00
Axel Dörfler
c920230fed Added device manager support - work in progress.
Updated debugging macros.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7781 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-07 01:18:56 +00:00
Axel Dörfler
2fa2a91f08 Fixed build conflict with new ISA bus manager.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7780 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-07 01:13:49 +00:00
Axel Dörfler
7c3d0ba1f5 get_memory_map() didn't take page offsets into account (i.e. didn't work correctly).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7762 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-06 16:39:03 +00:00
Axel Dörfler
2195a2522a Implemented get_memory_map().
lock_memory() and unlock_memory() will now silently fail and return success -
that's only to get things working.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7754 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-06 01:14:18 +00:00
Axel Dörfler
755b059fc1 Doh, Elf32_Word is unsigned, so st_size cannot go below zero.
Also made elf_lookup_symbol_address() less restrictive with respect to the
ELF symbol found (it now accepts all types, not only functions).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7714 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-01 00:35:55 +00:00
Axel Dörfler
6444e8f7bf Copied boot loader code to load symbol table into kernel as well - not yet
tested, though.
No longer copies the elf_header in insert_preloaded_image(); it's not used
at runtime (should be superfluous to keep in other kernel images, too).
dump_symbols() now ignores entries with invalid values - don't know exactly
what makes a good entry, but that should look okay.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7713 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-01 00:27:15 +00:00
Axel Dörfler
bc6ab31951 (Almost) removed special handling of the kernel image, as it's now
maintained in a preloaded_image as well.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7706 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-31 22:51:01 +00:00
Axel Dörfler
38e937ca8e Removed superfluous htons()/htonl() functions (we already have the
standard byte order functions in the kernel).
Small cleanup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7705 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-31 22:49:06 +00:00
Axel Dörfler
5cc177f4d6 Replaced all "addr" with "addr_t".
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7702 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-31 21:58:18 +00:00
Axel Dörfler
52823d0c3d Added debugger command for dumping all symbols of the specified kernel image.
Fixed warnings when compiled with TRACE_ELF.
Changed elf_lookup_symbol_address() to returning more useful information.
It now also scans the extended debug symbol table if present - for now, this
only works with preloaded images except the kernel.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7701 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-31 21:47:34 +00:00
Axel Dörfler
73e40f2d6e Small hack to get create_area() to create valid r/w areas in the kernel
(in BeOS, all kernel areas are r/w).
If you use B_READ_AREA/B_WRITE_AREA flags, you make the area readable
or even writeable from userland!


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7700 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-31 21:43:57 +00:00
Axel Dörfler
9d9a07acd8 Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7699 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-31 21:41:39 +00:00
Axel Dörfler
4a88dcb2cd Changed the "sc" output to be more useful.
Now uses the extended possibilities of the elf_lookup_symbol_address() call.
Fixed a bug in dbg_stack_trace(); it could crash at the top most stack frame.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7698 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-31 21:40:43 +00:00
Stefano Ceccherini
0bedbce52c Fixes the build when TRACE_SCHEDULER is defined
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7663 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-27 14:46:10 +00:00
Axel Dörfler
6d7ccae449 Separated exported from private functions.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7654 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-26 15:11:39 +00:00
Axel Dörfler
5aacd7f134 Fixed the PPC kernel build; now in sync again with the changes made
to arch/thread.h and arch/smp.h.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7641 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-25 16:33:47 +00:00
Axel Dörfler
0865e4b204 Added syscall for rename_thread(), courtesy of Jack Burton.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7631 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-24 12:12:58 +00:00
Stefano Ceccherini
9b167d37f1 Added a TODO item
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7630 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-24 09:06:20 +00:00
Stefano Ceccherini
389b7216d6 Fixed "team" debugger command (should be the last one)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7625 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-21 10:17:08 +00:00
Axel Dörfler
adbaa7817e It's now B_MAX_CPU_COUNT rather than SMP_MAX_CPUS.
Removed unused headers.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7608 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-18 09:42:13 +00:00
Axel Dörfler
f9ba8a1b61 Last patch was broken, thanks to Jack Burton for notifying me.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7606 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-17 10:01:17 +00:00
Axel Dörfler
70cdc7af60 If you call get_fd_and_vnode() you need to free it with put_fd(), not
put_vnode() - thanks to Ingo for pointing this out.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7597 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-16 11:55:42 +00:00
Axel Dörfler
0b8a2c94ce Introduced sUsedPorts/sUsedSems variables that can make it more efficient
to deny further port/sem allocation (and also simplifies port/sem stats).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7570 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-13 19:35:49 +00:00
Axel Dörfler
78ab9987c3 Modules out of preloaded images will now be registered and can be used
like any other module (yeeha!).
You can even unload preloaded images later on (to replace them with a
more up-to-date on disk version).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7532 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-11 23:44:58 +00:00
Axel Dörfler
8590e919fc Now maintains the new preloaded_image::id field.
If an image cannot be created out of a preloaded_image, its resources
are freed now.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7531 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-11 23:43:30 +00:00
Axel Dörfler
b918b5035f Bye, bye elf_lookup_symbol(), hello get_image_symbol().
Also renamed elf_load_kspace() to load_kernel_add_on(), and friends.
The new unload_kernel_add_on() now has an image_id as parameter, no longer
a path (like the former elf_unload_kspace()).
Fixed missign file system unload.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7527 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-11 19:52:38 +00:00
Axel Dörfler
81c323a767 unregister_elf_image() didn't call unregister_image(), so images never got
unregistered.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7526 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-11 17:30:18 +00:00
Axel Dörfler
d14f9aac93 Cleanup to better match our coding style guide; renamed variables, etc..
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7525 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-11 17:29:19 +00:00
Axel Dörfler
7e323e80d6 Kernel images are now registered, so the ToDo item is fulfilled.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7524 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-11 17:27:59 +00:00
Axel Dörfler
a364fba7d4 Is now using a hash for the images instead of a singly linked list.
Now registers its images as it should do (so you can use commands like
listimage in userland).
Added new debugger command "image".


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7522 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-11 17:18:02 +00:00
Axel Dörfler
11a5baaf67 Updated the private kernel image API to be more efficient (no longer needs
to acquire the team spinlock).
Renamed the user syscalls to the new style.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7521 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-11 15:04:36 +00:00
Axel Dörfler
fd1f6b7f01 Fixed a bug in elf_load_kspace(): the image structure and the pheaders were
freed in the wrong order in case of an error (could have crashed the kernel).
Implemented insert_preloaded_images() which prepares the preloaded images
for later use in the kernel.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7520 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-11 14:22:00 +00:00
Axel Dörfler
797647691a elf_region already had a field to store an area_id; we now use this one.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7518 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-11 13:54:13 +00:00
Axel Dörfler
1f4fa35b00 Now creates text/data areas for all preloaded images.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7507 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-10 19:02:41 +00:00
Axel Dörfler
c396c39fc5 Changed the "stat" related syscalls to have an additional parameter that specified
the size of the stat structure to allow extensions of that structure.
Renamed those syscalls to the new naming scheme.
Updated the syscalls to support stat extensions.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7494 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-10 14:33:17 +00:00
Axel Dörfler
7a7c7d9c2f Added current device manager built-in modules - the device manager itself will
probably be available as public kernel API as well (or rather, only).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7492 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-10 13:29:47 +00:00
Axel Dörfler
9bd10a87c7 The device manager is now initialized as well.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7491 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-10 13:28:21 +00:00
Axel Dörfler
8d1b721ad5 Added device_manager to the build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7490 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-10 13:27:20 +00:00
Axel Dörfler
6aed83b39c Removed all references of pnp_bus.h (its contents are now temporarily included
in device_manager.h).
Fixed some comments.
Removed realpath() from probe.c for now - mechanism will be changed, and that
prevented it from being built as part of the kernel; it's currently not functional.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7489 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-10 13:26:42 +00:00
Axel Dörfler
38fdd0ca47 node_lock variable was replaced by gNodeLock (in nodes.c).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7485 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-10 00:25:43 +00:00
Axel Dörfler
b36321870c Renamed some global static variables to match our style guide.
Changed some comments.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7484 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-10 00:09:21 +00:00
Axel Dörfler
1792829685 Fixed prefix handling; previous version was broken. It now allows the prefix to
be any size, not just full path names (even without the file name...). Optimized
it to only traverse paths that match the prefix.
The built-in modules now honor the prefix as well.
Renamed module_iterator::path_stack to stack.
The system add-on path was even wrong (but that didn't matter yet, as we're
still do a recursive search for modules).
The user add-on path now matches the real one - but that should probably be
retrieved from calling find_directory(), anyway...


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7483 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-10 00:02:20 +00:00
Axel Dörfler
0a4a7dee30 open_module_list()/read_next_module_name() now take built-in modules into account as well.
The prefix will obviously ignored currently!
Fixed get_next_loaded_module_name(); it will now work correctly (doesn't check, though,
if the module is currently loaded...).
Removed the module_test() function - doesn't belong here.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7465 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-09 00:41:19 +00:00
Axel Dörfler
3ad71e9d7e Rearranged the device_manager init/module stuff; it's now initialized from
main, not by getting the module any longer.
It now also creates the root node directly.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7438 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-07 00:34:00 +00:00
Axel Dörfler
637f662399 The node lock was missing in action.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7437 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-07 00:32:45 +00:00
Axel Dörfler
e5d9d14f90 Added the root node of the device tree to the build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7436 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-07 00:16:46 +00:00
Axel Dörfler
df0dd8a5dd Removed test code.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7426 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-06 01:44:14 +00:00
Axel Dörfler
f7e706a409 Separated initialization of standard file systems from boot file system.
team_create_team() now uses the B_NORMAL_PRIORITY constant instead of the number directly.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7425 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-06 01:27:34 +00:00
Axel Dörfler
7f79432203 Separated the bootstrapping of the standard file systems from the boot file
system - it's now mounted a bit later.
Renamed vfs_register_filesystem() to vfs_register_file_system().
Changed return codes to status_t where appropriate.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7424 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-06 01:25:36 +00:00
Axel Dörfler
b14f8b5746 Removed some debug output (it's not only dumped if TRACE_ROOTFS is defined).
Updated the debug stuff a bit, fixed debug build.
Renamed vfs_register_filesystem() to vfs_register_file_system().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7423 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-06 01:23:58 +00:00
Axel Dörfler
c947b674ee Renamed vfs_register_filesystem() to vfs_register_file_system().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7422 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-06 01:22:33 +00:00
Axel Dörfler
91d62d9f6a Removed stuff that's no longer necessary due to the stdio.h switch.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7418 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-05 16:38:32 +00:00
Axel Dörfler
1bf27bb166 Removed no longer needed files from the Jamfile (they've never been part of the repository anyway).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7352 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-02 17:05:51 +00:00
Axel Dörfler
b80d229ec2 Managed to compile all other needed files from the main device manager.
Added all of them - module_loader.c and boot_hack.c won't be needed anymore.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7351 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-02 17:04:25 +00:00
Axel Dörfler
fe01b8fa14 Start of the integration of Thomas' pnp_manager (which is now called device_manager).
Nothing is tested right now, and it's not yet complete, but it's changed so that
it does compile in our tree (and looks a bit more like the other files, too).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7345 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-30 16:42:58 +00:00
Axel Dörfler
a44e28cc02 Fixed a possible buffer overflow condition in vfs_get_module_path().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7342 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-28 11:20:19 +00:00
Axel Dörfler
caa910df64 Changed some function return codes to return a status_t where appropriate.
Removed all old NewOS error codes.
Cleaned up the includes a bit.
Now prints out a list of preloaded images.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7331 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-27 11:55:31 +00:00
Axel Dörfler
ef44862bfd Now creates the usual links /bin, /tmp, /var, /system, ...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7321 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-26 21:46:01 +00:00
Axel Dörfler
52b6744e8d bootfs now implements the read_fs_info() hook - it mostly reports a volume
name ("OpenBeOS").


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7320 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-26 21:43:12 +00:00