Commit Graph

1834 Commits

Author SHA1 Message Date
Axel Dörfler
c89cbee2cf Added missing times() function (almost empty stub implementation).
Implemented uio.h functions: readv/writev[_pos]().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9770 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 15:05:35 +00:00
Axel Dörfler
f0dd6fc2c8 Since the status field is still not set correctly (lazy me), reset it to zero at least.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9769 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 15:03:51 +00:00
Axel Dörfler
8c390406d7 Added missing putenv() implementation. Chosed to limit env names to an arbitrary length of 64 bytes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9768 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 15:00:08 +00:00
Axel Dörfler
c1a8ebfa2d Added missing legacy bcmp() function.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9767 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 14:57:15 +00:00
Axel Dörfler
9d171dd8f9 Implemented _{user|kern}_{read|write}v() functions.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9765 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 14:54:10 +00:00
Axel Dörfler
c426897f56 Changed to make use of environment variables if present. I think we'll
later should cut down on the defaults.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9763 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 14:24:10 +00:00
Axel Dörfler
73760b2058 Moved serial interface code into separate file.
serial_init() is now called from start().
Changed the way the serial debug output is served: instead of having
the console node to dump everything to serial, too, only dprintf()
triggers serial output now.
dprintf() is now silent unless in debug mode; serial output could
be enabled separetely, though (currently only at build time).
There is no need to disable serial output while the menu is running.
Removed unnecessary grist from the Jamfile.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9756 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 03:02:34 +00:00
Axel Dörfler
5a7a832f37 Debug output now uses dprintf() rather than printf().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9755 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 02:35:56 +00:00
Axel Dörfler
1baf43ea86 Since my original color setup only looked good in Bochs (on real machines
some stuff blinked and had wrong colors), we now have a new color scheme
in the boot loader. Not perfect, but looks okay and the same on Bochs and
real machines.
Made changing the colors again easier by moving most colors to constants.
We now have 3 lines for help texts.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9754 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 02:31:41 +00:00
Axel Dörfler
cdd04333a0 Standard console height are 25 lines, not just 24.
Now clears the screen and scrolls using the current colors (which allows
for other background colors than black).
console_set_color() no longer allows to set the 8 bit of the background
color which indicates blinking.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9753 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 02:28:27 +00:00
Axel Dörfler
d70ad16601 Changed the console color names to something simpler and better fitting.
Added comments about which colors can be used for what (unlike Bochs,
real systems support blinking modes, and therefore only 7 bits for
the background color).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9752 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 02:25:28 +00:00
Axel Dörfler
92e0317c84 Disabled VESA palette changing for now; it does not seem to work correctly
or I am messing things up (it will now use good old VGA palette programming).
This fixes the strange colors on my system, should investigate on how to
properly use the VESA stuff here.
Debug output now goes through dprintf().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9751 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 02:23:42 +00:00
Axel Dörfler
d3b2cb65ad Now properly resets the system using the keyboard controller.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9750 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 02:20:59 +00:00
Axel Dörfler
74a5be2dbd No longer clobbers the lower 16 bit of the partition offset before it is saved.
The boot partition was not likely to be found before.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9749 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 02:20:06 +00:00
Axel Dörfler
8ba84a800d Partitions do now know if they actually represent a known partitioning system.
Now correctly removes the partitioning system from a device when it is no longer
needed. Also resets the parent pointer of its children.
Debug output now goes through dprintf() rather than printf().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9748 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 02:17:58 +00:00
Axel Dörfler
127b80eca2 Fixed a bug when the wanna-be boot partition could not been mounted;
the partition was deleted, but never removed from the partition list.
No longer prints out the root directory contents of all file systems.
Debug output now uses dprintf() rather than printf().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9747 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 02:15:31 +00:00
Axel Dörfler
b487348fb3 Now only use dprintf() for debug output.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9746 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 02:13:18 +00:00
Axel Dörfler
40360d8c38 Added stpcpy() implementation for the sake of compatibility (it's not a POSIX function).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9735 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-02 01:49:54 +00:00
Axel Dörfler
d7fe004a2a The kernel string functions are now part of kernel_posix.o.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9734 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-02 01:41:09 +00:00
Axel Dörfler
eed194ef81 The kernel no longer links against posix_string.o, but has it's own subset now.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9733 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-02 01:37:16 +00:00
Axel Dörfler
ed85746ace If available, main2() will now execute the Bootscript. If not, it will fall
back to the old "init" command.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9720 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-01 21:44:23 +00:00
Axel Dörfler
e27751d3df Fixed a stupid bug in create_team_thread_start(): it copied the env variables
in the wrong direction for some time now, corrupting the argument area (user
apps would crash).
B_SYSTEM_TEAM is now reserved, so that no team can be created there.
Fixed some warnings when debug output is enabled.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9719 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-01 21:38:56 +00:00
Axel Dörfler
7a577b56a1 Now starts a login shell.
Renamed console_reader() function to keyboard_reader().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9718 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-01 21:35:10 +00:00
Axel Dörfler
0759a7e5da pipefs_create() now also allows to open an existing pipe.
The inode now keeps track of the number of readers/writers.
Inode::BytesInChain() is now only used protected by the request lock.
Implemented some missing POSIX demands:
- when the last writer is closed, all waiting read requests are aborted
- pipefs_write() now returns EPIPE and signals the current thread with
  SIGPIPE in case there are no readers left
- pipefs_read() will now return 0 in case there are no writers and no
  unread buffers left in the pipe.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9717 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-01 20:36:09 +00:00
Axel Dörfler
fa00c58619 Fixed a potential memory leak in devfs_open().
Correctly implemented devfs_create() - it will now open the an already
existing file if O_EXCL is not set, and no longer fail with EROFS.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9716 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-01 20:20:37 +00:00
Axel Dörfler
7adec93fe8 Added some minor debug output, and a ToDo comment for file_seek().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9714 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-01 19:48:40 +00:00
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
b4fd3816c8 Fixed the stupid bug that prevented you to see what you typed in when bash
was running. Thanks a lot to Jerome Duval who found this!
Since TTY ECHO mode doesn't look too well with the old shell, it will directly
start "sh" now, which should be the bash.
No longer prints out the TTY used when started, but now sets (as usually
done in BeOS) the TTY environment variable.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9697 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-01 03:51:21 +00:00
Axel Dörfler
ffc27ddbe7 fs_mount_volume() changed the order of arguments to be more intuitive.
Removed the fs_initialize_volume() function, as it's probably not going
to be needed.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9695 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-01 01:03:04 +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
Axel Dörfler
2c4f728f7e Added our preliminary mount replacements.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9567 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-28 17:00:29 +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
4303e367b2 Now we need to explicitly disable RTTI in the boot loader, since it is generally enabled in the kernel.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9565 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-28 16:03:12 +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