variable at once. It wasn't used anymore, and the code gets simpler.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25080 a95241bf-73f2-0310-859d-f6bbb57e9c96
ones) for wait_for_child(), which is notified when any job control
condition (child dead, stopped, continued) occurs. These events are
relatively rare anyway, and it simplifies the code.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25079 a95241bf-73f2-0310-859d-f6bbb57e9c96
to port_buffer_size_etc(), but returns the info through a structure,
which also identifies the sender (uid, gid, team ID) of the message.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25003 a95241bf-73f2-0310-859d-f6bbb57e9c96
and defines the macros needed by them.
* Renamed syscall sys_vm_map_file() to _kern_map_file() and changed the
path to an FD parameter. Changed vm_map_file() accordingly and
adjusted the kernel ELF loader and the runtime loader.
* Added syscall _kern_unmap_memory().
* Added bool unmapAddressRange parameter to vm_create_anonymous_area()
and map_backing_store(). If true and the address specification is
B_EXACT_ADDRESS, all areas in the specified address range will be
deleted (unless an area is covered only partially).
* Introduced B_SHARED_AREA flag, which is set on areas that have been
created by {vm,_user}_map_file() with REGION_NO_PRIVATE_MAP. When
fork()ing those areas won't be copied CoW, but rather be cloned. This
is needed for mmap() MAP_SHARED.
* {vm,_user}_map_file() also accept an FD argument < 0, in which case an
anonymous area is created.
* Implemented mmap() and munmap(). Currently there's the restriction
that we can't partially unmap areas. Otherwise the functions should be
rather compliant. We also support the non-POSIX extension
MAP_ANONYMOUS.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24964 a95241bf-73f2-0310-859d-f6bbb57e9c96
That would explain why syscall restarts were broken. In fact there's no
reason to check the flag at all, since we know we set it.
ftp appears to work again.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24918 a95241bf-73f2-0310-859d-f6bbb57e9c96
ATM.
* Changed common_fcntl() to also work for non-vnode-based FDs. Only the
operations that require a vnode do fail now. F_SETFL uses the new
fd_ops::set_flags() if available, falling back to the vnode respective
operation.
* Changed some direct accesses to file_descriptor::u::vnode. It was safe
in those cases, but might not be anymore if we ever change fd_vnode().
ftp can at least connect to servers again, now, but apparently we still
have a problem with syscall restarts -- downloads fail after one second,
when the timer goes off.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24917 a95241bf-73f2-0310-859d-f6bbb57e9c96
syscall_restart_ioctl_is_restarted() to syscall_restart_is_restarted,
IoctlSyscallFlagUnsetter to SyscallFlagUnsetter, and
IoctlSyscallRestartWrapper to SyscallRestartWrapper, as they are no
longer only used for ioctl().
* Removed unused syscall_restart_ioctl_handle_post().
* Made SyscallRestartWrapper a lot fancier. Instead of storing a
reference to the result value, it stores the value itself, and it
features all the interesting operators that make it appear like that
value. This simplifies the use of the class quite a bit.
* THREAD_FLAGS_SYSCALL is now set for all socket function and the
read[v](), write[v]() syscalls.
* Added is_syscall() function and net_stack hook to the net stack.
* Removed "kernel" parameter from all net_stack_interface and net_socket
module hooks. They aren't need any longer, since is_syscall() can be
used instead.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24914 a95241bf-73f2-0310-859d-f6bbb57e9c96
- The net_stack driver is no longer used. Instead we have a kernel
module which is directly used by syscall implementations in the
kernel. I.e. we no longer tunnel those functions through ioctls, but
have normal syscalls.
- Removed the superfluous net starter module.
- Implemented the FDTYPE_SOCKET type file_descriptors, that is sockets
are no longer vnode based.
- Adjusted libnetwork (the socket function implementations)
accordingly.
- Adjusted netstat accordingly.
* Socket module:
- Implemented socketpair().
- Added "kernel" parameter to the control hook. Quite a few more hooks
would actually need the parameter, but I didn't change those yet,
since that would probably also require changes to the protocol
module interface.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24908 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Revised the RLE algorithm used for compressing the boot splash artwork to
handle uncompressed runs.
* Compress the RGB channels separately for improved efficiency.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24844 a95241bf-73f2-0310-859d-f6bbb57e9c96
FIFO. Reimplemented pipe() to use it.
* pipefs is no longer mounted. Will remove the superfluous code soon.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24823 a95241bf-73f2-0310-859d-f6bbb57e9c96
- Moved most file_system_module_info hooks into separate structures.
Those that operate on mounted volumes to fs_volume_ops, those
operating on a vnode to fs_vnode_ops.
- Got rid of the fs_volume, fs_cookie, fs_vnode typedefs. We use void*
again.
- Instead of a void* volume and node cookie hooks are passed a
fs_volume and fs_vnode structure pointer, which contain the cookie
and an ops pointer (fs_volume a few more things).
- The VFS {new,publish,get,...}_vnode() functions take a fs_volume*
instead of the volume ID. So does vfs_get_fs_node_from_path().
- Added type and flags arguments to publish_vnode() and the
get_vnode() hook and removed the type argument from lookup() hook.
Added vnode::type using formerly unused bits to store the node type.
Simplified a few things in the VFS due to the now always available
node type.
- Added fs_volume_ops::{create,delete}_sub_vnode() and
fs_vnode_ops::get_super_vnode() hooks. They are used to support file
system layers, e.g. allowing to extend an FS not supporting BeOS
attribute with attribute support. Needs some more work in the VFS.
- Added fs_vnode_ops::create_special_node() hook for creating special
nodes (e.g. FIFOs).
* Adjusted the built-in file systems and BFS according to the interface
changes. Removed all other FSs from the image for the time being.
We'll see whether further API changes are necessary before porting
them.
* Adjusted the bfs_shell accordingly.
* Implemented create_special_node() in rootfs to support special nodes.
* Added support for FIFOs:
- Added syscall _kern_create_fifo() (used by mkfifo()), which creates
a special node (type S_IFIFO) in the respective file system.
- When a special node is published the VFS creates a respective sub
node. Currently only FIFOs are supported.
- Added a little support for FIFO subnodes by using functionality from
the pipefs.
- Added mkfifo to the image. It can create FIFOs in the rootfs, but
the FIFOs aren't really usable ATM, since they still work like
pipes, i.e. readers and writers need to have them open at the same
time.
* Some smaller changes in the VFS:
- Made the *_CALL macros nicer to use (vargs).
- Refactored FS entry lookup into new function lookup_dir_entry().
- create_vnode() no longer just calls the FS create() hook. First it
looks up the entry and uses open_vnode(), if it already exists. This
is necessary for two reasons: 1) The FS might not support create()
while still allowing to open() entries. 2) When the FS has other
layers on to of it (or the respective node) it might not be
responsible for opening the node.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24816 a95241bf-73f2-0310-859d-f6bbb57e9c96
and ino_t instead of a path. Supposed to work with node monitoring messages.
Took the name from vfs_entry_ref_to_path() that takes the same arguments, but
suggestions for a better name are welcome.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24813 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Implemented RLE compression for the boot splash images, resulting in
smaller kernel and boot loader.
* Only the boot loader contains the RLE compressed images, the decompressed
buffer for the icons is passed to the kernel via kernel args.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24812 a95241bf-73f2-0310-859d-f6bbb57e9c96
The dividing line is back although with a little more spacing. Also the icon
spacing is a little increased and I added a subtle outline as well as a little
brighter background for the active icon look. The placement logic is now not
independant of each other anymore, otherwise I couldn't center both images
as a unit. But only the vertical placement is affected.
Comments as always on the commit mailing list... :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24796 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Added {Create|Delete}Device() analogous to {Create|Delete}FileDevice
* Added a small DeviceWatcher class that reacts to entry creation/removal
* Implemented a way to start/stop node monitoring
* Start watching for devices after the boot volume has been mounted and the
the second initial scan was run
The disk device manager now creates and scans a device when a "raw" node is
published and deletes the device on removal. This makes hot-plugging of disk
devices (for example memory sticks using usb_disk) work. Their partitions will
be scanned and published so they can be mounted. Somehow the removal of the
partitions does not yet work however, any insights are welcome.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24777 a95241bf-73f2-0310-859d-f6bbb57e9c96
the icons are centered.
* The boot loader and kernel now use the placement info that
generate_boot_screen now generates.
* Made the code that draws the images handle the case where any of the images
is larger than the frame buffer.
* All drawing functions need to know the image width (analogous for bytes per
row).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24773 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Not sure if it works as intended, as the specs are a bit vague.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24717 a95241bf-73f2-0310-859d-f6bbb57e9c96
item entry.
* The bios_ia32 video platform code now stores the available VESA modes in
the new vesa_modes kernel_args field.
* When configuring a VESA mode via settings file, it's no longer needed to
specify the exact mode - the closest available mode is now used. This should
help with bug #1962.
* frame_buffer_console_init() now also creates a boot_item for the VESA modes
in the kernel_args.
* The VESA accelerant now filters the mode list to only contain modes that
are actually supported.
* Moved non-shared vesa driver data into its own file vesa_private.h.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24675 a95241bf-73f2-0310-859d-f6bbb57e9c96
- Added a "root" vnode to the io_context. It is used for resolving
paths and converting nodes to paths instead of sRoot. Some more
passing around of io_context structures was necessary.
- Introduced a new lock sIOContextRootLock to protect
io_context::root. The current uses of io_context::io_mutex
(put_vnode(), remove_vnode() while holding it) looked too suspicious
to use that mutex in vnode_path_to_vnode().
- Added _kern_change_root() syscall and chroot() libroot function.
- Added chroot coreutils program to the image. Funnily it seems to be
much easier to set up a little jail than under Linux (just copy
bash and libroot.so into respective subdirs; mount another pipefs
if you want pipe support).
With Haiku allowing direct access to directories via inode IDs
jailing is obviously not very secure at the moment.
- Added /var/empty to the image. It will be the chroot target for ssh.
* Changed vfs.cpp:get_cwd() so that the io_context::io_mutex is no
longer held when calling dir_vnode_to_path().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24673 a95241bf-73f2-0310-859d-f6bbb57e9c96
- The kernel stores the group IDs in the team structure. They are
correctly inherited on fork() and load_image_etc().
- Implemented getgroups() for real, i.e. it retrieves the groups
associated with the process.
- Implemented setgroups(), initgroups() and (the BSDish)
getgrouplist(). The latter two read the group information from the
"group database" /etc/group (if existing).
- Change the BIND port config, since we do have getgrouplist() now.
* The set-uid feature was broken when the path to the executable was
relative, since we used stat(), which, in the kernel, uses the kernel
IO context.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24669 a95241bf-73f2-0310-859d-f6bbb57e9c96
reference counted memory allocations. Can be used for sharing immutable
structures.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24666 a95241bf-73f2-0310-859d-f6bbb57e9c96
finally created a solution to avoid that: Header files that contain
configuration settings (and nothing else) go to build/config_headers.
To change settings, create a directory build/user_config_headers (which
is ignored by svn), copy the respective header there and modify it at
your leisure. Currently only tracing_config.h has been moved to the new
location, but more files will follow eventually. It is also recommended
to move optional macro definitions in Jamfile (as for BFS) to a config
header instead; the build system will then automatically rebuild on
changes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24611 a95241bf-73f2-0310-859d-f6bbb57e9c96
a call chain contains a specific symbol (or address).
* Added a new KDL command "calling" that you can use to get a list of
threads that have a specific function in their call chain.
* Removed extraneous white space.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24594 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Add a cached_pages field to the system_info structure, and change the
meaning of the used_pages field to not include cached pages.
* Provide the needed info using the new calls vm_get_available_memory(),
and vm_page_num_available_pages().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24571 a95241bf-73f2-0310-859d-f6bbb57e9c96
- Take extended family and model into account when generating the cpu
type and revision.
- Added Intel Core 2 Extreme to the cpu list.
Please review.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24509 a95241bf-73f2-0310-859d-f6bbb57e9c96
* The boot splash code now checks wether debug screen output is enabled or not
using the above function.
* The boot splash code no longer maps it's own copy of the frame buffer, instead,
it will use the boot item feature as the VESA driver does. Also removed the
lock, as that's not needed at all.
* Renamed splash.cpp to boot_splash.cpp, and boot/splash.h to boot_splash.h
(it's not part of the boot loader, but the kernel).
* Removed dead code from boot_splash.cpp, added license. Replaced license
header in boot_splash.h to a style guide conforming one.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24489 a95241bf-73f2-0310-859d-f6bbb57e9c96
executable permissions of the file by hand. We use _kern_access()
instead, which also handles the root case correctly.
* The user and group arguments of test_executable() aren't needed any
longer.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24483 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Fixed the icons image, it was upside down.
* Support the new 24 bit boot screen images in the boot_loader and the kernel.
* Prepare the code for future indexed versions of the boot screen images.
But the generate_boot_screen tool currently does not generate those.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24449 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Calculate icon offset from stage in splash.cpp, remove hard coded placement
values. Draw only icon, not the whole image from top/left to right of
icon.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24439 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Added the feature of an animated boot screen (icons lighting up at
different boot stages).
* Added first version of new boot splash images, generated by the new
hsbg tool. (Also finally contains the "new" Haiku logo.)
changes by myself:
* Added Artur to the contributors list in About System.
* Fixed some left overs in the patch, kept tracing turned off.
TODO:
* Remove the need for hard coding the icon positions. (Maybe generate
those from hsbg and put them into images.h? Have user provide icon
spacing/offsets at the command line for hsbg?)
* Rename the stages to something meaningful.
* Use hsbg as a build system tool and generate images.h during build
from PNGs provided in the artwork folder.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24434 a95241bf-73f2-0310-859d-f6bbb57e9c96
structure. They are properly inherited and updated on
fork(), load_image(), and exec().
* Implemented the get[e]{u,g}id(), set[[r]e]{u,g}id() family for real.
* getgroups() also calls the kernel now, but only returns the effective
group ID. Supplementary groups support is still missing.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24359 a95241bf-73f2-0310-859d-f6bbb57e9c96
as the death entries of a deceased processes that were in this group
and have not yet been reaped hold references to the group, so that it
won't be deleted until the group is empty and all gone group members
have been reaped. This fixes#1799 at last.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24335 a95241bf-73f2-0310-859d-f6bbb57e9c96
in code that has interrupts disabled. The chunks of memories are queued
and free()d periodically by a kernel daemon.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24332 a95241bf-73f2-0310-859d-f6bbb57e9c96
of the resolved ToDo, but could probably be made more efficient. Instead of
transfering the area, the area is cloned into the target teams' address space
and the original is deleted. This generates a new area_id for the transfered
area (as suggested by the ToDo). Updated syscall prototypes according to the
status_t to area_id return type change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24320 a95241bf-73f2-0310-859d-f6bbb57e9c96
options.
* module_init() now sets sDisableUserAddOns to whatever the safemode settings
say, ie. the B_SAFEMODE_DISABLE_USER_ADD_ONS setting is now respected by
the module code.
* Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24315 a95241bf-73f2-0310-859d-f6bbb57e9c96
* driver_entry::api_version now stores the actual version instead of a
pointer to it.
* Renamed node_path_entry to path_entry and reused it for driver
reloading: handle_driver_events() will now also check for drivers to
add in the sDriversToAdd list.
* Added new devfs_driver_added(), and devfs_driver_removed() functions
that trigger certain driver actions.
* Implemented notifying devfs on B_ENTRY_CREATED, B_ENTRY_REMOVED, and
B_ENTRY_MOVED events in probe.cpp. The watched directory inode numbers
are now stored in a hash for B_ENTRY_MOVED.
* unpublish_driver() did not actually delete the node, it only marked
it removable since we never get/put the node. We now do, and so the
node is actually removed as intended.
* Added "devfs_driver" KDL command.
* Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24152 a95241bf-73f2-0310-859d-f6bbb57e9c96
and made it public (within the kernel).
* _user_entry_ref_to_path() is now using that function.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24151 a95241bf-73f2-0310-859d-f6bbb57e9c96
negative relative timeout would be converted to B_INFINITE_TIMEOUT.
For some reason the ScreenSaver preflet is snooze()ing with such
a value.
* Some more comments.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24080 a95241bf-73f2-0310-859d-f6bbb57e9c96