Commit Graph

1848 Commits

Author SHA1 Message Date
Axel Dörfler
3db167c4d2 %ebp was not saved which resulted in a crash on longjmp().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9196 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-05 13:15:41 +00:00
Axel Dörfler
a4611f9d2b The BSD setjmp() implementation was not at all BeOS compatible. This one
is now.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9195 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-05 13:08:03 +00:00
Philippe Houdoin
a889bb181d Add thread-safe strtok_r() function.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9192 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-04 23:44:15 +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
Ingo Weinhold
93d412b087 Refactored the intel partitioning module.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9159 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-02 15:35:25 +00:00
Axel Dörfler
7740b91858 Ported over consoled from NewOS. It's a very simple replacement for the
Terminal application that uses our TTY driver.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9153 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-01 17:33:29 +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
8b2f07b69e Removed sleep(), it now uses spin() from cpu.cpp - which is the exact same thing anyway.
This fixes the build as unistd.h defined sleep() as well.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9108 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-29 12:51:34 +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
410c1c159f Calmed down the soon to be removed driver loader (to be replaced by a better
version in devfs directly).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9086 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-28 03:42:07 +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
Axel Dörfler
af069b1a47 isatty() and ctermid() now actually work correctly.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9084 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-28 01:51:01 +00:00
Axel Dörfler
14d1496a7f sysconf(), pathconf(), and fpathconf() now at least do marginally useful things.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9053 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-24 00:16:51 +00:00
Axel Dörfler
2f524aed3a Reworked some TTY support functions. Added tcgetattr() function.
tcsendbreak() now ignores the "duration" parameter.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9052 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-23 23:52:36 +00:00
Axel Dörfler
98ac7a9709 Removed the termios subdirectory; it's replaced by posix/termios.c.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9051 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-23 23:49:53 +00:00
Axel Dörfler
cf46507317 The termios support is now part of the posix_main.o object file.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9050 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-23 23:48:50 +00:00
Axel Dörfler
2627eeff81 Joined the former termios/termios.c and termios/tcsetattr.c together to termios.c.
Added it to the build.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9048 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-23 23:45:03 +00:00
Axel Dörfler
a78a421de8 Renamed sleep() to spin() as that's what it does, and sleep() also doesn't
like unistd.h.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9040 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-23 13:43:57 +00:00
Axel Dörfler
fe29b8929a Some cosmetics for booting with qemu.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9020 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-21 12:09:36 +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
fbb0ac2170 fork() now at least calls _kern_fork(), but would not even be complete
if that one worked.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8975 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-15 15:48:28 +00:00
Axel Dörfler
f845dd4e4f Implemented userland part of execve().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8974 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-15 15:46:56 +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
25258635f7 Implemented waitpid() a bit more; it now calls the _kern_wait_for_child() syscall.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8972 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-15 15:44:06 +00:00
Axel Dörfler
cd4e4d3383 Added wcsmbs to libroot.so, replaced posix_gnu_getopt.o with posix_gnu_ext.o
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8970 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-15 12:28:34 +00:00
Axel Dörfler
ac50932dae Moved the getopt() functionality from the getopt/ subdir to the new
extensions/ directory - which will contain glibc specific additions
to the POSIX standard (getopt() is here because of getopt_long() etc.).
Also added obstack functions.
Added wcsmbs to the build.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8969 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-15 12:23:08 +00:00
Axel Dörfler
0dffa6c281 It's now allowed to use wchar_t - it doesn't hurt anymore :)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8968 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-15 12:21:19 +00:00
Axel Dörfler
5e4171c975 Made a minimum subset build - mbrtowc() is currently a hack to make it work...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8967 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-15 12:20:03 +00:00
Axel Dörfler
1b41fce458 Added some rudimentary AMD CPU identification, courtesy of Brennan Cleveland.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8964 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-15 01:54:50 +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
f8cbad7b3e Implemented readdir_r().
Added note to dirfd() that it should be excluded from the kernel build
once the build system allows this.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8958 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-14 23:10:29 +00:00
Axel Dörfler
ad21930ee8 Now exports the fflush_unlocked() symbol as well.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8956 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-14 23:02:44 +00:00
Axel Dörfler
316c0c3139 Added the dirent functions to the kernel as well.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8955 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-14 22:46:42 +00:00
Axel Dörfler
3901fa14bf Moved dirent.h functions from unistd/directory.c to new dirent.c file.
Added dirfd() call for BeOS compatibility.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8951 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-14 22:10:43 +00:00
Axel Dörfler
8141b62d5e Removed our old getopt.c - we're now using the one from glibc.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8947 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-14 20:44:59 +00:00
Axel Dörfler
7e24c69719 Added glibc's getopt() to the libroot.so build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8946 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-14 20:42:50 +00:00
Axel Dörfler
05cd7f3a98 Make it build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8945 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-14 20:41:46 +00:00
Axel Dörfler
ee3f1543b0 Added glibc's getopt() implementation for better compatibility with BeOS.
This normally resides in the posix/ directory in the glibc source repository.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8944 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-14 20:39:26 +00:00
Axel Dörfler
8bc22ef101 Error messages are now directed to stderr rather than stdout.
Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8943 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-14 20:19:50 +00:00
Axel Dörfler
30a0c00ded Some more debug output when tracing is enabled.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8940 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-14 17:43:53 +00:00
Axel Dörfler
81f2f81c21 If the kernel_args::cons_line field is not maintained (ie. is zero), the
console driver now clears the screen when it's initialized.
This improves the first impression of the standard boot process when
booting in text mode (which currently happens when you press "escape"
in the early boot stage).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8939 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-14 17:40:23 +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
Axel Dörfler
82b76be31e Cleaned up the page alignment macros, incorporated NewOS fix #2022
(but with the correct semantics).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8934 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-13 18:59:25 +00:00
Axel Dörfler
04a280790e Added some debug output that's going through the kernel debug output.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8933 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-13 18:17:47 +00:00
Axel Dörfler
a0f707f29e Fixed tab-output; usually, all characters after a "\t" would be ignored in the output.
Now panics if devfs_publish_device() fails.
Tracing can now be turned on and off (it's now completely silent in normal operation).
Some cleanups.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8932 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-13 16:25:47 +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
Axel Dörfler
5a0da774a5 Fixed compilation.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8927 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-13 11:44:58 +00:00
Ingo Weinhold
4ccf7da8d5 Added provisional implementation of system(). Requires a shell to be
available at /bin/sh (a symlink will do). Unfortunately there's some
problem with our shell that causes it to crash in most cases. :-(


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8925 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-12 17:41:34 +00:00
Ingo Weinhold
9516afb70a Added `-c' option to execute a command line. Should work, but doesn't
always do. More often than not one gets page faults. As it happens
sometimes even before anything meaty has been done at all
(e.g. in main()->init_statements()->shell_var_set_text()->
shell_value_init_text()->malloc()), I believe that's a problem not caused
by me. And I wasn't able to track it down.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8924 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-12 17:37:42 +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
837e295821 Added the kernel_cache.o object to the kernel.
Added arch dependent POSIX stuff to libroot.so.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8822 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-03 15:38:05 +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
f8db8b97a8 No longer uses syscalls instead of POSIX calls.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8811 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-03 11:43:53 +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
39536410a6 Added dumb group functions - they only know one group: "users" (should be pretty similar to R5).
Implemented and added functions from inttypes.h (not everything is working correctly, though).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8787 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-02 01:03:01 +00:00
Axel Dörfler
929525b836 Implemented wait() using waitpid() following the POSIX spec.
Added some more debug output for waitpid().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8786 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-02 01:01:02 +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
a52018b53b dev_for_path() should resolve symlinks.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8776 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-01 14:41:20 +00:00
Axel Dörfler
d3fe452749 A Jamfile for posix/arch.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8775 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-01 14:40:06 +00:00
Axel Dörfler
9d91354201 Added empty setlocale() call, just to export it.
Removed unnecessary grist from source files.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8774 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-01 14:39:01 +00:00
Axel Dörfler
f283d6c99e Added dummy strcoll() function.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8773 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-01 14:37:38 +00:00
Axel Dörfler
1676c18192 Added BSD style bcopy/bzero() functions to the build again - BeOS bash
uses them, too, and maybe others as well.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8772 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-01 14:35:20 +00:00
Axel Dörfler
7800e87a5a Added kill() implementation, user part of sigprocmask() now works.
Renamed syscalls.
Cleaned up files.
Removed unnecessary grist from source files.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8771 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-01 14:06:27 +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
532544a9a1 Added mktemp() and friends from FreeBSD - calls not part of the POSIX specs
are currently disabled.
Removed unnecessary grist from source files.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8769 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-01 12:04:21 +00:00
Axel Dörfler
5be3370fe7 Added implementations of alarm() and ualarm() based on setitimer() (which doesn't
work yet correctly).
Added empty sbrk() for now - not sure what to do with this. Maybe we should remove
it completely (but BeOS bash needs it).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8767 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-01 12:00:00 +00:00
Axel Dörfler
d21f25079b Added missing function tzset() - doesn't do a lot yet, though. The source
file also contains the tzname symbol.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8763 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-01 10:28:25 +00:00
Axel Dörfler
f84671c1ca Added empty PPC jamfile - there are no arch dependent things yet for PPC.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8762 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-01 10:23:08 +00:00
Axel Dörfler
7be5564a86 Added setjmp(), sigsetjmp(), and friends from FreeBSD.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8761 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-01 10:21:54 +00:00
Axel Dörfler
6914fa8c77 Removed rlimit.c - we now have one in sys/ where it belongs to.
Added new "arch" subdirectory to the build.
Removed unnecessary grist from source files.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8760 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-01 10:18:36 +00:00
Axel Dörfler
866a87e2b5 Added several missing functions - some of them work, some of them don't.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8759 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-01 10:14:12 +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
b1cd9d2d94 Changed the resolution of the boot loader to a maximal width of 800 pixels to
have a smaller window in Bochs :)
Debugging output only if TRACE_VIDEO was defined.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8733 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-31 01:04:24 +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
d668899063 On success readlink() returns the number of bytes read, not 0.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8706 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-29 11:59:07 +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
c46de31dea Renamed fs_query.c to fs_query.cpp and implemented the function. They don't work yet as the kernel part is not implemented yet.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8700 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-28 20:36:53 +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
7fdfbc9850 No longer disables the floppy motor if it was booted from a floppy - that
somehow doesn't seem to work right with Bochs; after a reboot, the floppy
is not accessible (we might just need to turn the motor on again).
Not checked if this also happens on a real machine.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8655 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-25 15:40:51 +00:00
Axel Dörfler
d3a947b004 Now uses a macro to export global symbols.
Added the reboot() function from our kernel.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8654 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-25 15:38:26 +00:00
Axel Dörfler
30f0f48a33 Added platform_exit() function.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8653 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-25 15:29:10 +00:00
Axel Dörfler
90b9284ea3 Fixed a warning when compiled with GCC 3.
Added currently non-working version of platform_exit().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8652 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-25 15:27:40 +00:00
Axel Dörfler
31f29a6f7e Added support for disabled menu items.
The target function of an item is now called upon every action, not only
if that item had a sub menu...


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8651 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-25 15:26:40 +00:00
Axel Dörfler
f191528003 Added an InitCheck() method; if something goes wrong, the device won't be
added to the boot device list anymore. This is currently used to remove
devices that don't support the LBA access mechanism (since CHS support has
still not been implemented).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8650 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-25 15:25:08 +00:00
Axel Dörfler
b430068a23 Implemented the enabling/disabling of menu items.
"Continue boot" will now be disabled if there are no boot volumes.
Also, there will be an additional menu item "Reboot" in that case.
The boot device menu will now show a disabled "No boot devices found" label
then, and will be selected upon entry. Added a help text to "Rescan volumes"
which will also be selected upon entry if there is no boot device.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8649 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-25 15:23:28 +00:00
Axel Dörfler
a084c3cd69 No longer panics when it could find any boot volumes, but enters the
user menu in that case, too (to give the user the opportunity to rescan
the available devices).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8648 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-25 15:20:09 +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
Oliver Tappe
c7000cc7b3 - fixed some issues when compiling with gcc-2.95.3. At least three more
problems remain, though.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8615 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-21 08:55:12 +00:00
Axel Dörfler
1085f3ae4e Implemented floppy start: the boot loader shell is now able to load the
whole loader from a floppy or CD-ROM and execute it as usual - and it
even seem to work, yaay :)
For now, the length of the boot loader is hard-coded, but it is compatible
with the "makeflop" command, i.e. it stores the length in bytes 3 & 4 in
the file.
Also, the maximum head number is currently hard-coded to floppies - ToDo
comments are in the text which insist on fixing this.
This makes testing the boot loader under Linux much easier, as it isn't
able to write to BFS volumes directly (and the copy_to_bfs_image command
doesn't build under Linux).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8606 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-19 06:22:32 +00:00
Axel Dörfler
7312c22b60 Now makes sure that the stack is set up correctly.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8605 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-19 06:10:58 +00:00
Axel Dörfler
de28175b45 We need the whole 32 bit of the boot partition offset, not just the lower 16...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8604 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-19 06:05:55 +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
a468da6449 Fixed compilation error with GCC 2.95.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8595 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-16 16:18:48 +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
4db8c66409 Added empty platform_boot_options() function.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8592 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-16 15:38:38 +00:00
Axel Dörfler
8dd184dc16 Added (empty) missing video and menu functions to make the boot loader build again.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8591 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-16 15:21:23 +00:00
Axel Dörfler
5a2358d4ea Clarified output, so that you don't have to wait forever.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8562 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-13 19:29:08 +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
f947748c74 Fixed wrong function export that made every app crash on exit...
Renamed static variables to have the 's' prefix.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8560 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-13 18:36:54 +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
8093fd8e2b Removed possible name collisions for temporary kernel test apps.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8558 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-13 17:37:15 +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
a97726f081 Registered userland images now contain a bit more information: the text/data
addresses and their sizes are now set correctly in image_info as well, as
well as the device/node fields.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8556 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-13 16:27:29 +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
9050d1ee48 Changed the way the kernel libroot objects are built; we are no longer
reusing the standard libroot objects, but build them all again to make
sure they are compiled with the proper flags (i.e. -fno-pic).
That saves a lot of headaches: as a side effect, the kernel runs fine
again, and even the node monitor test works nicely now. Go figure.
Only the string functions remain separate, but that should be changed
as well one day (it's not problematic, right now).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8545 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-10 12:46:19 +00:00
Axel Dörfler
b42cb57bba Added some casts and removed the static *_internal variables.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8544 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-10 12:19:23 +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
87da2cf3fe Since the conversion factor calculation is now in place, there is no reason
to overwrite this value anymore.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8351 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-07 17:03: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
899141ba19 Added syscall for _kern_next_device().
fs_stat_dev() and next_dev() should now work.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8347 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-07 16:10:25 +00:00
Axel Dörfler
3ed05ce147 Added empty __printf_fp() to the build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8345 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-07 12:54:48 +00:00
Axel Dörfler
34fa6b663f Added empty stub implementations of wait(), waitpid(), and waitid().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8341 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-07 12:44:43 +00:00
Axel Dörfler
d871284db8 Added iopopen.c to the build and make it compile properly.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8340 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-07 12:31:02 +00:00
Axel Dörfler
aa1ea490d0 Implemented _exit().
Added empty implementations of fork() and all the exec*() variants; the
latter currently all call execve() and may pass the correct parameters
(not tested).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8339 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-07 12:28:22 +00:00
Axel Dörfler
007a64beef Added empty implementation of sigprocmask() to the build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8338 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-07 12:22:50 +00:00
Axel Dörfler
ead2658b25 Implemented BeOS compatible ctype functions.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8332 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-06 00:30:37 +00:00
Axel Dörfler
21f50dd07d Added non-working version of strftime().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8329 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-05 23:09:59 +00:00
Axel Dörfler
c1b52847e2 Added a difftime() implementation (for 32 bit time_t).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8328 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-05 22:52:25 +00:00
Axel Dörfler
0718113e06 Added gmtime() and exported the timezone variable for now.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8327 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-05 22:45:56 +00:00
Axel Dörfler
efcd87fced Added parsedate() to the build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8326 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-05 22:44:55 +00:00
Axel Dörfler
41b2bdc260 Added working ctime() to the build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8325 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-05 22:43:39 +00:00
Axel Dörfler
f5a134ac42 Added empty and non-working versions of mktime() and localtime(). BSD code
is not in a good shape, Linux code is pretty ugly - we'll see which one
we'll choose :)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8324 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-05 22:23:25 +00:00
Axel Dörfler
590013dad4 Now initializes some global variable defined in libroot_init.c.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8315 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-05 18:50:20 +00:00
Axel Dörfler
bc8ea5f145 Removed empty stubs already exported by libgcc.a (was needed to link properly before).
Added more global variables that are maintained by the BeOS startup code.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8314 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-05 18:47:54 +00:00
Axel Dörfler
f46a8b5376 Now includes libgcc.a and exports its symbols (needed for BeOS compatibility).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8313 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-05 18:45:50 +00:00
Axel Dörfler
9acf941f15 Added syscalls for write/read fs info.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8308 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-05 18:28:31 +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
27cbcfb000 Added missing load_image() call - does not work yet, though.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8305 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-05 18:01:24 +00:00
Axel Dörfler
c17a1f18a5 Added working sync() and fsync() calls.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8304 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-05 17:55:13 +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
fa310b3a35 Added _kern_dir_node_ref_to_path().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8279 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-02 18:47:11 +00:00
Axel Dörfler
056f3c62e3 Now exports the __strtoXX_internal() functions from glibc, too - some
apps are using those.
Their implementation is currently not complete; they just call the
public functions, the group argument is ignored.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8277 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-02 17:54:40 +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
9835b64792 Now use kernel exported POSIX functions instead of their internal counterparts.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8268 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-02 02:54:52 +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
f88314cbfc syscalls.h includes a little less than before...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8265 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-02 02:36:09 +00:00
Axel Dörfler
20e40af982 syscalls.h now includes less than before.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8264 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-02 02:34:36 +00:00
Axel Dörfler
477bb27551 Renamed node monitor syscalls to the new scheme.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8263 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-02 02:32:00 +00:00
Axel Dörfler
5ace7ebc02 Now uses the B_PATH_NAME_LENGTH constant.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8262 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-02 02:30:36 +00:00
Axel Dörfler
5f6aed4937 syscalls.h now includes a little less than before.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8261 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-02 02:29:11 +00:00
Axel Dörfler
26afb01fec Renamed image syscalls.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8260 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-02 02:27:53 +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
806586a704 Fixed compilation due to recent header changes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8258 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-02 01:55:04 +00:00
Axel Dörfler
1084b3fc17 It's now _kern_null(), not sys_null() anymore.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8257 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-02 01:53:36 +00:00
Axel Dörfler
e54c578346 Made the debugger() call a bit more useful - this is still no real implementation, of course.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8243 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-30 02:59:44 +00:00
Axel Dörfler
176a4ebc28 Added a proper assert() implementation, removed the old one.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8242 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-30 02:39:29 +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
f004b0c15e Renamed image and node monitor syscalls to the new scheme.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8236 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-29 20:19:48 +00:00
Axel Dörfler
92726d601a Added the "other" stdio stuff to the build (stuff that's not from glibc).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8228 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-29 00:05:08 +00:00
Axel Dörfler
5ab2a9e4b4 Added missing functions from fs_query.h and fs_info.h, both not yet implemented.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8217 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-28 12:36:13 +00:00
Axel Dörfler
e5948ee29a Resurrected posix_stdio.o: it now contains additional stdio functions not
covered by glibc's libio/stdio.
Added rename() and remove().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8216 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-28 12:27:39 +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
a5fb7d4954 call_bios() can now also be called without having paging enabled (it now
recognizes this and doesn't enable paging after entering the protected
mode again).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8135 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-22 23:40:50 +00:00
Axel Dörfler
407c481dd1 Added strchr() to the boot loader.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8120 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-22 04:13:27 +00:00
Axel Dörfler
a7aea4b86d Now shows the help text of a menu item while it's selected (up to two lines of
text, automatically wrapped correctly).
Added print_centered() function.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8119 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-22 02:55:51 +00:00
Axel Dörfler
447564cfea Added some help texts.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8118 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-22 02:53:34 +00:00
Axel Dörfler
649f65cc3a Added help text functionality.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8117 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-22 02:52:38 +00:00
Axel Dörfler
a104674fdf Fixed typo, corrected video mode menu usage.
run_menu() now supports menu_item_hook for CHOICE_MENU submenu items.
Now selects the video mode chosen in the menu - it's broken right now
if you enter the boot menu without asking for it (i.e. when there is
no boot volume found).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8116 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-22 01:19:53 +00:00
Axel Dörfler
bc8add5da8 Now the menu items that can't be chosen are of type MENU_ITEM_NO_CHOICE.
Fixed a typo.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8114 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-22 01:14:45 +00:00
Axel Dörfler
c668dff52c A MenuItem now maintains a "user data" pointer.
Menu::Run() now calls platform_run_menu().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8113 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-22 00:39:40 +00:00
Axel Dörfler
81f569510c Now only switches to the boot logo if no boot menu was requested.
Calls platform_init_video() directly after the heap initialization - the
logo will now be shown before the VFS is initialized.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8112 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-22 00:37:46 +00:00
Axel Dörfler
f42302bcc8 Now maintains a list of possible video modes, and creates a real video
mode menu that even works.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8111 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-22 00:35:19 +00:00
Axel Dörfler
3be048bd11 Support for menus with more items than fit on screen; there will be a
scroll bar at the right side that shows you where you are.
"Page Up/Down" now jump one visible page up and down.
Support for MENU_ITEM_NO_CHOICE type.
Constants are now real constants :)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8110 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-22 00:32:48 +00:00
Axel Dörfler
0ac3f5399f No longer initializes video - it will now be done by the platform independent
part of the boot loader (because then the heap is already working).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8107 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-22 00:26:33 +00:00
Axel Dörfler
ef9cf5ac1b platform_add_block_devices() no returns B_OK, but still does nothing.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8106 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-22 00:23:15 +00:00
Axel Dörfler
3cdfe493ba What a great idea to remove the boot partition from the partition list...
It's fixed now; mount_file_systems() will just ignore the boot partition.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8105 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-21 22:11:32 +00:00
Axel Dörfler
c54d49c275 Work in progress of the boot loader menu.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8095 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-21 15:57:56 +00:00
Axel Dörfler
689c94c815 Work in progress of the boot loader menu.
You can already use the menu, but your options currently don't have any effect.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8094 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-21 15:57:03 +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
Philippe Houdoin
ac9005b4bb s/OpenBeOS/Haiku/
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8073 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-20 15:47:22 +00:00
Axel Dörfler
d31902e857 The new logo for the boot loader.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8072 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-20 00:49:23 +00:00
Axel Dörfler
5b82deb912 Now checks for boot options; if you press space, it will enter the boot menu
(when there is one), if you press escape, it will boot in console mode.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8052 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-18 15:32:49 +00:00
Axel Dörfler
c89be553a6 Added keyboard.cpp to the build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8051 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-18 15:30:39 +00:00
Axel Dörfler
d0c5d9f9a8 Removed some debug output, no longer panics to be able to read the output :)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8050 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-18 15:29:31 +00:00
Axel Dörfler
c28f7b9932 Removed platform_user_menu_requested() call.
Replaced its functionality by a new platform_boot_options() call.
The switch to the logo screen now comes a little later.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8049 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-18 15:26:53 +00:00
Axel Dörfler
2ac69a4d66 Activated CPU speed conversion factor calculation again.
Added a spin() function.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8046 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-18 15:23:18 +00:00