address back to userland, even if the provided buffer was smaller. Fixes
a problem with Firefox, which is for some reason providing a buffer
smaller than our sockaddr_in.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24948 a95241bf-73f2-0310-859d-f6bbb57e9c96
handing them over to the USB stack. Otherwise the finisher (kernel) thread
would have no way to fill those packets when they came from a user space
address range. Completely untested though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24947 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Handles wrapping of the chunk buffer for the case that we need to read
additional chunk data, but still need the data from the last chunk
buffer as well.
* Don't skip the very first frame when calculating the timing.
* Includes some new code to handle seeking internally, but it is currently
disabled and incomplete.
* Prepared to recover from floating point exceptions generated in some rare
situations by xvid, but we are currently missing fenv.h in our public POSIX
headers, so it is disabled.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24945 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Fixed shutdown(). It was computing the wrong fifo flags and set the
wrong ones from the wrong variable on the peer fifo.
* Generally made the Unix sockets behave more like they should. E.g.
after closing one end, it must still be possible to read from the
other (as long as there are buffered data). Also fine-tuned when to
return what errors from recv()/send().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24943 a95241bf-73f2-0310-859d-f6bbb57e9c96
have two more optional hooks for attaching supplied ancillary data to a
net_buffer and for processing received ancillary data. Not sure, if that
is flexible enough for all kinds of ancillary data, but it is for
SCM_RIGHTS and also should for SCM_CRED[ENTIAL]S (if we ever decide to
implement one of those) -- don't know any other types on other protocol
levels.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24941 a95241bf-73f2-0310-859d-f6bbb57e9c96
implementation ATM, since it malloc()s the required memory.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24940 a95241bf-73f2-0310-859d-f6bbb57e9c96
the heap and the IOV_MAX limit.
* They also take the responsibility of copying the ancillary data in and
out.
* These syscalls were badly broken. They used a member of an
uninitialized structure instead of the iovec pointer passed from
userland. sendmsg() would thus fail or send arbitrary data, recvmsg()
would overwrite arbitrary memory.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24939 a95241bf-73f2-0310-859d-f6bbb57e9c96
Select default item at start.
Added timeout handling.
Don't switch to graphics mode, stay in text mode instead. Graphics mode led to display issues with lilo.
Reverted order of text color like it is in original bootman.
Fixed bugs.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24933 a95241bf-73f2-0310-859d-f6bbb57e9c96
src/system/kernel/fs/fd.cpp: In function 'ssize_t common_user_vector_io(int, off_t, const iovec*, size_t, bool)':
src/system/kernel/fs/fd.cpp:727: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the
second:
headers/private/kernel/syscall_restart.h:151: note: candidate 1: bool SyscallRestartWrapper<Type>::operator<(const Type&) const [with Type = long int]
src/system/kernel/fs/fd.cpp:727: note: candidate 2: operator<(long int, int) <built-in>
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24927 a95241bf-73f2-0310-859d-f6bbb57e9c96
read_next_module_name(). This is ugly and less flexible but it allows us to
explicitly force an initialization order. As detailed by the added comment
there seem to be controllers/BIOSes that require the EHCI controller to be
initialized after the companion host controller or else they refuse to publish
any high speed devices. This was the case for bug #1236 and my laptop when
legacy emulation is enabled and any device was plugged in at boot. This change
fixed the problem for me and hopefully closes bug #1236 too.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24926 a95241bf-73f2-0310-859d-f6bbb57e9c96
initialization as suggested by the EHCI spec and do not touch it again
once the controller is running. Doing so would result in undefined behaviour
according to EHCI specs.
* Set the port routing policy after the controller has started and not before
as suggested by the EHCI specs.
* Explicitly set the segment register after resetting the host controller and
not before, as this likely has no real effect ;-)
Might help with some legacy support or UHCI/OHCI to EHCI handover problems.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24925 a95241bf-73f2-0310-859d-f6bbb57e9c96
what keymap it came from. This allows us to indicate the current keymap in
the list views. I'm not sure how to get the build system to populate that
attribute by default though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24924 a95241bf-73f2-0310-859d-f6bbb57e9c96
Added sunos to the list of platforms, but it needs more work.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24922 a95241bf-73f2-0310-859d-f6bbb57e9c96
B_{READ|WRITE}_AREA. Otherwise we'd allow any user process to shredder our
data as Axel put it so nicely ;-) Thanks for the clarification.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24921 a95241bf-73f2-0310-859d-f6bbb57e9c96
when they are not open or they are deleted on free when they are already
removed. This should fix the sudden crashes when you unplugged a device that
might not have been fully closed yet.
Also handle the case of removal correctly and don't use the usb_device anymore
after releasing it by returning from the device removed hook. Calls to the
device just return B_DEV_NOT_READY in that case.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24920 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
sMountMutex lock when calling sync() on a file system. This fixes a potential
deadlock (I just encountered for the first time).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24915 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
* get_dir_path_and_leaf() now removes trailing slashes from the path.
* This fixes bug #2016, thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24913 a95241bf-73f2-0310-859d-f6bbb57e9c96
BMenuItem and BWindow are no longer friends of BMenu, but use this class
instead.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24909 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
same as !IS_USER_ADDRESS.
* Use the new IoctlSyscallFlagUnsetter helper class in _kern_ioctl().
The former implementation wasn't checking correctly for a previous
syscall flag.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24904 a95241bf-73f2-0310-859d-f6bbb57e9c96
modification seemed to have caused the macro not to get defined anymore.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24901 a95241bf-73f2-0310-859d-f6bbb57e9c96
into a header. This version instantiates the given argument only once.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24900 a95241bf-73f2-0310-859d-f6bbb57e9c96