Commit Graph

24103 Commits

Author SHA1 Message Date
Ingo Weinhold
cb734beeee Added get_open_fd() function which gets the descriptor and also
increments its open count.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25317 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-05 00:24:14 +00:00
François Revol
1571aa7ff9 Add IDs for Sonix cams according to linux driver.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25316 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-04 20:35:31 +00:00
François Revol
a486abdce0 - don't hardcode frame size, use the maximum available instead. Setting it at connection won't work yet.
- Added hooks to handle device and sensor-specific parameters
- Added gain controls for my webcam, oddly none seem to work correctly except green gain :^)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25315 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-04 20:14:19 +00:00
Ingo Weinhold
c5174c0a7e Add libMicro copyright and license to the image when the respective
optional package is installed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25314 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-04 16:08:30 +00:00
Ingo Weinhold
5f78d261a2 Added rules AddOptionalPackageDescriptionToHaikuImage and
AddLicenseToHaikuImage that can be used in optional package definitions
to add a copyright entry in AboutSystem and add a license file to
/etc/licenses.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25313 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-04 16:06:41 +00:00
Ingo Weinhold
cff443b405 Added OpenSSH optional package. The daemon has to be started manually
(just "sshd"), ATM. Not sure how we want to deal with daemons, yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25311 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-04 13:19:57 +00:00
Ingo Weinhold
9a7ef652a3 diff_zip uses the STL and thus needs to be linked against the respective
library. Not sure why it worked earlier.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25310 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-04 13:12:31 +00:00
Ingo Weinhold
b2c7de8230 Reactivated the "fresh install" code in the Bootscript, but modified it
a bit:
* Added directory /etc/post_install, which can contain scripts that will
  be executed on the first boot.
* Moved the mimeset invocations to such a script. Use the "-apps"
  option instead of "-all". Since create_app_meta_mime() (and thus
  mimeset) work recursively now, running the commands does actually have
  an effect.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25309 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-04 13:10:42 +00:00
Ingo Weinhold
26791a6b96 Changed the semantics of create_app_meta_mime(): Like update_mime_info()
it does now accept directories and doesn't ignore the "recursive"
parameter anymore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25308 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-04 13:01:11 +00:00
Ingo Weinhold
3a4c7e6e71 If the supplied entry was a directory,
CreateAppMetaMimeThread::DoMimeUpdate() would always fail early, making
recursive operation impossible.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25307 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-04 12:48:21 +00:00
Marcus Overhagen
ca978b6ed8 make memory map printing independant of other mmu debug output
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25306 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-04 01:20:22 +00:00
Ingo Weinhold
5d55026291 Added support for SO_PEERCRED for Unix sockets.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25305 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-04 00:32:57 +00:00
Ingo Weinhold
b946bc32e2 Don't create the symlinks for the old networking libraries in the
development libraries dir.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25304 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-04 00:32:26 +00:00
Ingo Weinhold
d29deffa2c Added the Linuxish SO_PEERCRED.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25303 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-04 00:28:27 +00:00
Karsten Heimrich
88be2c9f5d * added missing destructor
* delete app icon on pref close
* use HVIF icon in case of Haiku


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25302 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-03 11:39:54 +00:00
Karsten Heimrich
9ec99c6e2f * some code formating, no functional change
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25301 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-03 10:08:10 +00:00
Ingo Weinhold
ea035707b3 * Support the new {send,read}_data_no_buffer() protocol hooks to avoid
unnecessary data copies and waste of memory.
* Changed the storage backend to ring_buffer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25300 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-03 01:14:44 +00:00
Ingo Weinhold
cdc00dadfc * Added optional {send,read}_data_no_buffer() hooks to the protocol
module interface. They directly operate on iovecs and thus allow
  protocols that don't need it to avoid the creation of a net_buffer.
* Adjusted the socket module to support the new hooks. If they are
  present, they will be chosen over the old hooks.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25299 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-03 01:11:21 +00:00
Ingo Weinhold
3134e71811 Also check whether the data pointers of provided userland iovecs are
actually pointing to userland. This saves checks in the net stack.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25298 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-03 01:04:20 +00:00
Niels Sascha Reedijk
7218a9b2ea Update copyright entries in the about window. Work done by scottmc. Thanks! This closes #1222.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25297 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-02 22:49:23 +00:00
François Revol
f3ff69e413 Haiku's BMessenger::SendMessage() only takes a pointer...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25296 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-02 22:23:50 +00:00
François Revol
dc6d91a930 Added a path popup menu like Tracker's and Pe's to the Status bar.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25295 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-02 22:13:09 +00:00
Axel Dörfler
03298f9d20 * The WaitList now always notifies all waiters.
* In SendData(), TCP will now split the buffer into smaller parts if it
  can send data (ie. there is free space in the buffer queue left, but
  not enough to send the whole buffer, and the free space is more than
  the send low water mark of the socket).
* Both of these changes together let TCP now pass the "forwarding" test
  of the OpenSSH suite.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25294 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-02 17:36:28 +00:00
Bruno G. Albuquerque
c1b9831bbe - Moved AHCI_PORT_TRACING define to its correct position.
- Prepend "ahci port" to all trace entries in ahci_port.cpp.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25293 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-02 17:02:41 +00:00
Ingo Weinhold
49e00d1f99 Moved the container management for ancillary data from the net_buffer
module to the stack module. There's a dedicated struct
ancillary_data_container, now. One can just set the container on a
net_buffer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25292 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-02 14:37:16 +00:00
Bruno G. Albuquerque
110d4031fb - Added AHCI port tracing (Only PRD table tracing for now).
- Added controller attribute to the AHCIPort class for debugging purposes.

AHCI is failing whenever the PRD table has an address above the 2048 Mb mark.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25291 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-02 14:34:20 +00:00
Axel Dörfler
248f01553f * Fixed warning and bad coding style.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25290 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-02 13:00:27 +00:00
Axel Dörfler
2239c25b29 Fixed warnings.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25289 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-02 12:39:17 +00:00
Ingo Weinhold
6f57d9d066 When creating a socket file descriptor fetch the SO_NONBLOCK value from
the socket first, so the FD open flags are in sync with that. Fixes
situations where a socket accept()ed from a non-blocking listener socket
wouldn't have O_NONBLOCK set.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25288 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-02 02:30:16 +00:00
Ingo Weinhold
3dba513f4c This fixes the crashes when calling {g,s}etsockopt() on an AF_LINK
socket. Not sure, if there are any cases where there is a next protocol,
though. Please review.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25287 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-02 02:26:58 +00:00
Ingo Weinhold
39ae5e4d12 Use a mutex instead of a benaphore.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25286 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-02 02:20:17 +00:00
Ingo Weinhold
6057b5ee44 Added a bit more debug output in UnixFifo, but disabled debug output in
all files by default.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25285 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-02 01:22:16 +00:00
Ingo Weinhold
042be52922 In Shutdown() pass an actual error code to notify(). B_OK is just
ignored. This fixes the hanging OpenSSH "multiplex" test. Save for the
"forwarding" test, which sometimes hangs due to a TCP bug, the complete
test suite passes, now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25284 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-02 01:13:53 +00:00
Ingo Weinhold
0c615a01ae * Removed old mutex implementation and renamed cutex to mutex.
* Trivial adjustments of code using mutexes. Mostly removing the
  mutex_init() return value check.
* Added mutex_lock_threads_locked(), which is called with the threads
  spinlock being held. The spinlock is released while waiting, of
  course. This function is useful in cases where the existence of the
  mutex object is ensured by holding the threads spinlock.
* Changed the two instances in the VFS code where an IO context of
  another team needs to be locked to use mutex_lock_threads_locked().
  Before it required a semaphore-based mutex implementation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25283 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-01 22:07:36 +00:00
François Revol
0ddd7ea66e Some more ioctls...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25282 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-01 21:59:46 +00:00
Ingo Weinhold
9e518ee91d Also hold the threads lock when removing a team from the team hash
table. This is not necessary, but allows for a better solution fo how to
lock the IO context of another team.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25281 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-01 21:53:12 +00:00
Ingo Weinhold
ee96aa8f6e * Replaced cutex::release_count by flags field. It is only one thread
that can unlock the mutex, so one bit is sufficient.
* Added cutex_init_etc() which has an additional "flags" parameter.
  The only specifyable flag is CUTEX_FLAG_CLONE_NAME, which causes the
  function to strdup() the given name and free() its copy in
  cutex_destroy().
* cutex_destroy() does now unblock waiting threads.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25280 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-01 18:06:09 +00:00
Ingo Weinhold
2988eab3dc Added support for option '-L' (always dereference symbolic links).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25279 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-01 12:43:29 +00:00
Axel Dörfler
63368af591 * As Ingo pointed out to me earlier, TCP could now delete its socket too early
when using the shutdown() command.
* If TCP no longer needs a socket, it will now set the flag FLAG_DELETE_ON_CLOSE;
  when the socket is closed from the upper layers, it will set the FLAG_CLOSED
  flag - and only if both are set, TCP will now delete the socket itself on
  receive.
* This fixes bug #2189.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25278 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-01 11:44:19 +00:00
Ingo Weinhold
184de764fe Replaced the vm_cache mutex by a cutex. This should save quite a few
semaphores.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25277 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-01 01:59:09 +00:00
Ingo Weinhold
8562499f44 * Introduced a new locking primitive I called "cutex" (sorry for the
name, couldn't resist :-P). It's semantically equivalent to a mutex,
  but doesn't need a semaphore (it uses thread blocking and a simple
  queue instead). Initialization can't fail. In fact it is ready to use
  without initialization when living in the bss segment, also in the
  early boot process. It's as fast as a benaphore in cases of low lock
  contention, and faster otherwise.  Only disadvantage is the higher
  immediate memory footprint of 16 bytes.
* Changed how the "thread" and "threads" debugger commands list the
  objects they are waiting for. Cutexes are also included.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25276 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-01 01:53:07 +00:00
Ingo Weinhold
4e6b38af6c Following Axel's suggestions:
* Added data_node::flags field and currently only flag
  DATA_NODE_READ_ONLY, indicating that the node is read-only (i.e.
  a clone). If set, the node won't have any header or tail space. Not
  being able to write to it is not yet enforced, though.
* Moved data_node::tail_space to data_header.
* Removed data_node:used_header_space/own_header_space.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25275 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-30 18:47:11 +00:00
Ingo Weinhold
8e671b34c2 Introduced kernel tracing in wait_for_objects.cpp (in r25273), ATM only
for select(), though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25274 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-30 16:14:42 +00:00
Ingo Weinhold
514fb1360b * Removed select_sync::lock. The only thread that was still locking was
the selecting thread, which has obviously no effect.
* Changed select_info::events to vint32. It is now updated atomically.
  This removes a race condition when concurrent threads would notify at
  the same time.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25273 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-30 16:12:20 +00:00
Axel Dörfler
a1e3e17d35 * Added 24-bit mode support.
* This fixes bug #2182.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25272 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-30 16:07:25 +00:00
Ingo Weinhold
503912f733 Fixed the case that a file to be created non-exclusively is a symlink
(bug #2183).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25271 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-30 14:21:02 +00:00
Axel Dörfler
ec12806d2f Reverted r25258 - I didn't know that an undefined value defaults to 0.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25270 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-30 08:03:53 +00:00
Ryan Leavengood
6aede71c0c Resolve a TODO and fix another ancient bug, #386. Print Screen is now handled
by BWindow, no longer by the app_server. This should stop the "screen freeze"
effect.

This adds a dependency on libpng.so and libz.so to libbe.so. The same
dependencies and the PNGDump code added here can be removed from the
app_server. I am just waiting for a code review of this before doing that.

This implementation still does not give the client a chance to handle it
differently.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25269 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-30 02:55:15 +00:00
Ingo Weinhold
2428097297 Removed superfluous uint32 ref parameter from select() FS hook.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25268 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-30 00:06:17 +00:00
Ryan Leavengood
85a4868f71 Future proofing, make sure we get the screen this window is in.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25267 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-29 23:55:55 +00:00