Commit Graph

1848 Commits

Author SHA1 Message Date
Jérôme Duval
ca6e6e8d16 removed unuseful clone_area
This is a temporary solution, until moving to a global kernel export data struct


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9819 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-07 01:19:27 +00:00
Jérôme Duval
3a88903282 _kern_set_real_time_clock now returns a status, we now use it for errno
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9818 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-07 01:16:12 +00:00
Jérôme Duval
d104cdcbae Moved sBootTime to an area, so that userland can clone it
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9811 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-06 17:37:00 +00:00
Jérôme Duval
dc80059933 first real_time_clock impl
todo : setup_rtc_area should be called on startup


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9810 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-06 17:34:39 +00:00
Axel Dörfler
d2170152b1 _user_set_real_time_clock() can now return an error. It currently even
will do this if this function is called by anyone other than the root
user.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9804 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-05 16:08:00 +00:00
Jérôme Duval
c345d00db1 added a check of permission
now set errno and return -1 for errors


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9802 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-05 13:25:13 +00:00
Jérôme Duval
4fe4cbd39c added implementation of stime
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9801 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-04 23:02:54 +00:00
Axel Dörfler
fe5b39146f Neither unregister_wait_for_any() nor register_wait_for_any() returned
status.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9799 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-04 16:42:16 +00:00
Axel Dörfler
bd00cbc6a9 Updated the PPC stuff to recent changes in other parts.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9798 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-04 16:41:32 +00:00
Ingo Weinhold
90072e721d Always define the symbols needed for basic C++ features. If we link against libgcc.a the symbols from there are simply overridden.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9778 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 17:33:17 +00:00
Axel Dörfler
ba44a1e8e1 Changed the way the stores commit their memory: there is no special handling
for temporary memory anymore, it's the store's responsibility to do that
correctly now, and that functionality is reached via the vm_cache using
vm_cache_set_minimal_commitment().
Therefore, the vm_store commit() function now returns a status instead of
the size that could be commited.
Replaced the max_commit mechanism with one that cares about the available
memory, stores can reserve and unreserve such memory. The anonymous_commit()
will now fail in case it could not reserve the needed amount of memory.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9777 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 17:24:41 +00:00
Axel Dörfler
d0f68c485f Added uio functions to the kernel (readv/writev[_pos]()).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9775 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 16:23:45 +00:00
Axel Dörfler
8c3e1399ec Thanks to Johannes Fortmann, I learned that the blinking mode can be turned
off to enable bright background colors. It's now always done which enabled
me to improve the slider colors a bit.
Therefore, console_set_color() no longer clears bit 8 from the background color.

Now no longer tries to change the palette in non-8-bit modes; that fixes
the strange colors I got in high and true color modes (VESA palette changing
would fail and the fallback VGA palette changing was responsible for the effect).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9772 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 15:43:27 +00:00
Axel Dörfler
2786541fbe Fixed a crashing bug in fill_sem_info() - if it was called for a semaphore
with an empty queue, it crashed. sem_info::latest_holder is obviously not
set correctly, and should be fixed.
Some cosmetics.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9771 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 15:33:01 +00:00
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