Commit Graph

20894 Commits

Author SHA1 Message Date
Ingo Weinhold
6cef245eca * Detemplatized ConditionVariable{Entry}. Merged them with their
respective Private* base class.
* Changed sigwait() and sigsuspend() to use thread_block() instead of a
  condition variable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25100 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 18:32:15 +00:00
Ingo Weinhold
b95f6d4710 * Introduced a set of functions (thread_prepare_to_block(),
thread_block(), thread_unblock(),...) that allow a thread to wait for
  something without needing a semaphore or condition variable. It can
  simply block and another thread can unblock it. Supports timeouts and
  interrupting. Both semaphores and condition variables use this
  common mechanism, now.
* Semaphores:
  - Some simplifications due to the thread blocking mechanism.
  - Changed locking order to sem -> thread. It was the other way around
    before and when introducing the wait_for_objects() support I had
    also introduced a situation where the locking was reverse, which
    could potentially cause a dead lock on SMP systems.
  - Instead of queueing thread structures, a semaphore queues
    queued_thread entries now, which are created on the stack. The
    thread::sem structure could thus be removed.
  - Added sem_entry::net_count, which is sem_entry::count plus the
    acquisition count of all waiting threads. This number is needed in
    remove_thread_from_sem() and instead of computing it there we
    maintain it.
  - Fixed remove_thread_from_sem(). It would not unblock threads, if
    the sem count was <= 0.
  - Made sem::last_acquirer unconditional. It is actually needed for
    sem_info::latest_holder. Fixed fill_sem_info() accordingly.
  - Added some optional tracing output, though only via ktrace_printf().
* Condition variables:
  - Could be simplified significantly through the use of the thread
    blocking mechanism. Removed a good deal of unnecessary code.
  - Moved the ConditionVariableEntry "flags" parameter from Wait() to
    Add(), and adjusted all places where condition variables are used
    accordingly.
* snooze() uses thread_block_with_timeout() instead of a semaphore.
* Simplified thread interrupting in the signal and user debugger code.
  Instead of separate functions for threads waiting on a semaphore or
  condititon variable, we only have a single thread_interrupt(), now.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25099 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 16:22:42 +00:00
Ingo Weinhold
e01cebeb0a * cancel_timer():
- If the hook of the timer we're cancelling is currently being
    executed, we do now wait till it is finished. This is how the BeBook
    specifies the function to behave.
  - Periodic timers would not be cancelled, if their hook was being
    invoked at the same time, since they weren't in the queue during
    that time.
  - Since we know the CPU on which the timer is scheduled (timer::cpu),
    we don't have to look through any other CPU queue to find it.
  - Fixed the return value. It should report whether the timer had
    already fired, and was not always doing that.
* Added private add_timer() flag B_TIMER_ACQUIRE_THREAD_LOCK. It causes
  the thread spinlock to be acquired before the event hook is called.
  cancel_timer() doesn't wait for timers with the flag set. Instead we
  check in the timer interrupt function after acquiring the thread
  spinlock whether the timer was cancelled in the meantime. Calling
  cancel_timer() with the thread spinlock being held does thus avoid any
  race conditions and won't deadlock, if the event hook needs to acquire
  the thread spinlock, too. This feature proves handy for some kernel
  internal needs.
* The scheduler uses a B_TIMER_ACQUIRE_THREAD_LOCK timer now and
  cancel_timer() instead of the no longer needed
  _local_timer_cancel_event().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25098 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 15:29:22 +00:00
Axel Dörfler
1201d52e6c * Color drops for the data source color are now only accepted on the colored
box, added a new method _LegendColorFrameAt() that returns that area, and
  is also used when drawing it.
* Fixed changing the history background color; it accidently changed the color
  of the wrong view. This fixes bug #2115.
* If the history gets too dark, it will now lighten up the scale, instead of
  drawing it even darker.
* Changing the color of a data source now immediately redraws the colored box,
  too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25097 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 15:14:51 +00:00
Ingo Weinhold
0970b97bed Added support_kit_config.h configuration header. ATM it only contains a
setting to force BLockers to be semaphore style. This may help with
debugging deadlocks.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25096 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 15:04:01 +00:00
Ingo Weinhold
93027f442f Added "straced" debugger command which basically works like "traced",
but also prints post syscall entries not matching the filter, if the
respective pre syscall entry matched. This way one also sees the syscall
return values. Works only in forward direction ATM.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25095 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 14:57:50 +00:00
Ingo Weinhold
f97199edd3 Made dump_tracing() (the "traced" command function) available in the
kernel and added a WrapperTraceFilter* parameter, which allows for
additional filtering. This way other commands can print tracing output
with special filtering. 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25094 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 14:52:48 +00:00
Ryan Leavengood
0039ad59fa Committing patch from Alex Roman, with a few small changes. This updates the NFS file system to the latest file system interface. Untested.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25093 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-22 04:41:30 +00:00
Jérôme Duval
157c0ced17 don't try to archive BHandler::fName when it is null
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25092 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-21 20:52:00 +00:00
Axel Dörfler
f4103e2b13 Reverted r25084, and fixed bug #1762 again as suggested by Korli on the mailing
list.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25091 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-20 21:22:16 +00:00
Michael Pfeiffer
7ca9a33b59 Highlight selected menu item with > ... <.
Moved global variables on the stack.
Hide cursor while menu is displayed.
Print error message at correct location.
Reboot on error.
Display "Loading <name>".

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25089 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-20 18:42:59 +00:00
Michael Pfeiffer
7b51470a32 When writing the MBR, don't overwrite disk signature and the reserved word.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25088 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-20 18:29:48 +00:00
Ingo Weinhold
ccce5afa3c Added simple test that demonstrates that unblocking threads waiting on a
semaphore after an interrupted one is broken.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25087 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-20 17:49:45 +00:00
Jérôme Duval
c4157c8ddb as noticed by Axel, InitObject is also used by other constructors: we init fStyle in the BArchive constructor instead.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25086 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-20 17:47:11 +00:00
Jérôme Duval
9091f4469b added pthread_sigmask based on sigprocmask()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25085 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-20 16:56:39 +00:00
Jérôme Duval
727f8f30c8 _QuitAllWindows()) calls _WindowQuitLoop() twice but we don't want to check two times a window (hence the use of the xor operator)
this fixes bug #1762 (Installer: trying to close it via alt+q shows warning twice)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25084 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-20 16:47:30 +00:00
François Revol
0efb25854a - login window should be visible on all workspaces
- add a DesktopWindow that can show replicants. To edit the shelf run Login --edit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25083 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-20 16:14:53 +00:00
Jérôme Duval
3d9c0d7c37 Patch from Shinta: fStyle defaults to B_FANCY_BORDER
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25082 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-20 16:04:45 +00:00
Jérôme Duval
27ec8243b2 fixed bug #2101 : normalize user paths, use localType for links
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25081 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-20 15:57:54 +00:00
Ingo Weinhold
8db2e37492 Removed the feature that a thread can wait for more than one condition
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
2008-04-20 15:19:48 +00:00
Ingo Weinhold
66aac81e98 We use only a single condition variable (instead of thread different
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
2008-04-20 15:15:58 +00:00
Axel Dörfler
99ad4f7e07 Fixes building strace - the network types should be reworked to work with the
new syscalls, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25075 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-20 12:00:48 +00:00
François Revol
e7f66aa24d Present full names in the list instead of logins. Aw I should have slept tonight... zZzZ
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25074 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-20 04:15:42 +00:00
François Revol
e5f2d374df Add a desktop window to put a shelf on later... ActivityMonitor replicant ? ;)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25073 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-20 03:56:32 +00:00
François Revol
8b2e7d3032 Add an info StringView giving current time or error.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25072 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-20 03:32:07 +00:00
Ingo Weinhold
438df7ecac * Riddled UnixBufferQueue class with debug code.
* Implemented temporary work-around for net_buffer append_cloned(),
  which doesn't seem to work right in combination with remove_header().
  Or maybe I'm just misunderstood how it is supposed to be used. Anyway,
  this fixed invalid data in the stream when buffers were split by a
  read.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25070 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-20 03:07:53 +00:00
Ingo Weinhold
61ef761d69 Send() and Receive() select notified the wrong socket about readability
respectively writability.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25069 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-20 02:59:23 +00:00
Ingo Weinhold
17619433ba Made the used debug print function settable. Changed to ktrace_printf().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25068 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-20 02:55:45 +00:00
Ingo Weinhold
0c45a1202d Ignore the trailing new line when printing trace entries.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25066 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-20 02:53:28 +00:00
François Revol
01f64d38f6 hide pw checkbox was acting wrong...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25065 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-20 02:44:27 +00:00
François Revol
d5cec75295 - fixes
- added ok, halt and reboot buttons
- added "hide password" checkbox
- shake the window on error (good idea axel :p)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25064 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-20 02:42:25 +00:00
François Revol
8917d3d855 Remove net stack ioctls. strace still breaks on NetworkTypes.cpp though...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25063 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-20 01:48:50 +00:00
François Revol
d65e1397df - hide the password
- fix beos build, for testing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25062 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-20 00:14:58 +00:00
Axel Dörfler
bd6908f87b socket_interface.h is no more - this fixes the build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25060 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-19 23:49:27 +00:00
François Revol
e33471b4e2 This should fix building libnetwork.so, we don't have the net_api header anymore.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25059 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-19 23:49:17 +00:00
Axel Dörfler
49aadb1dac Fixed the build of vfs_net_boot.cpp - I obviously messed up the full build I
thought I had done.
Of course, that wouldn't have happened if Ingo didn't break the network boot
with his netstack changes ;-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25058 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-19 19:28:34 +00:00
Ingo Weinhold
adebfe62cb It seems beneficial to let RETURN_ERROR() do something with debugging
disabled, too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25057 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-19 18:46:59 +00:00
Ingo Weinhold
ac018c2ffa Adjusted to work with shadow passwords.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25056 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-19 17:43:38 +00:00
Ingo Weinhold
2e4a383953 Removed obsolete notify_listener().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25055 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-19 17:42:34 +00:00
Oliver Ruiz Dorantes
39399f65f0 - Implement RemoteDevice::GetFriendlyName() in kit and handle the required reply in the server.
- Now a discovery process is nicer.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25053 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-19 16:53:06 +00:00
Oliver Ruiz Dorantes
a8c6c1c0a6 - Ask always for the remotename as we still dont have any kind of cache devices.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25052 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-19 16:47:44 +00:00
Ingo Weinhold
b14a49c9bd * Added BTextView derived class HyperTextView, which allows for
associating text with an action performed when clicked. Very
  bare-bones, but sufficient for our purposes.
* Turned all URLs into proper URLs (i.e. prepended "http://" where
  missing).
* Added new AboutView::AddCopyrightEntry() versions. One can take an
  additional licenses list, the other extracts all info from a supplied
  BMessage.
* The displayed licenses and URLs are hyperlinks now. Clicking the
  former opens the license file in /etc/licenses, the latter try to open
  a browser (works with NetPositive at least).
* The "COPYRIGHTS" attribute of the executable can contain descriptions
  of optional packages. Those are read, parsed, and added as copyright
  entries.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25049 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-19 15:51:18 +00:00
Karsten Heimrich
dbf2630af2 * resolved ticket #1880
* implemented center on first start
* removed TODO's as they where partly implemented



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25047 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-19 13:49:33 +00:00
Axel Dörfler
9c89c45059 * Allow color drops to change the legend background color only for the
replicant.
* Implemented storing and restoring the color of the data sources.
* Minor style fixes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25046 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-19 13:11:19 +00:00
Axel Dörfler
45e95a057f * Removed the old net_stack driver code, and the kernel socket interface.
* Also removed the header files that belong to those files.
* Only kept the userland_ipc.h header for now, to remember us about the
  former userland server driver (that I also removed - it can always be
  resurrected from SVN if needed).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25045 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-19 12:42:25 +00:00
Michael Pfeiffer
88321c8cd5 Prepared bootman to boot from other than the first drive.
The ioctl B_GET_BIOS_DRIVE_ID still needs to be implemented.
Only partitions from the first drive can be added to the boot menu, until B_GET_BIOS_DRIVE_ID is implemented.
Fixed bug calculating the offset of the first partition. off_t is a signed type, the fact? that Be FS is a 64-bit filesystem, lead me to the wrong assumption that this is an unsigned type :-(

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25044 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-19 07:43:03 +00:00
Ingo Weinhold
f5e8e68924 * Added useradd and passwd tools. They allow adding new users and
changing a user's password, like on other platforms (just a bit more
  bare-bones :-)).
* Moved login from src/bin/network/login/ to src/bin/multiuser/.
* login correctly checks the shadow password now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25041 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-19 00:15:59 +00:00
Ingo Weinhold
f694f63e2b * Moved private passwd/group/shadow passwd limit constants from
<libroot_private.h> to <user_group.h>.
* Added support in the registrar for adding and modifying users.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25040 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-19 00:10:51 +00:00
Ingo Weinhold
80d0ab493a * Haiku has grown a few features in the meantime, so enable them in
coreutils' config.h.
* "su" needs to have set-uid permission.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25039 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-19 00:07:12 +00:00
Ingo Weinhold
eebd3f7d47 * Don't check the open count of the other tty anymore when acquiring a
reference. The places where that is of relevance do that anyway, and
  tty_ioctl(), where it isn't, failed before, although that was not
  necessary. This prevented for instance ioctls() on the master tty
  before any slave had been opened.
* If the tty has no process group set, don't check for background reads.
  This was a problem with telnetd, respectively the executed login,
  which couldn't access the tty, since telnetd makes sure neither itself
  nor login has a controlling tty.
  telnet still doesn't work, exactly because it has no controlling tty
  and cannot set the tty process group. Not sure how that is supposed to
  work. Furthermore the tty doesn't have the usual flags set, which is
  apparrently the reason for the workaround (read_string()) in login.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25038 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-19 00:02:05 +00:00
Karsten Heimrich
8a2dad71cc * no need to reply, as set_ui_color won't read it anyway
Fixes some strage behavior (moving/disappearing text) in
  Appearance preflet while moving a color control chooser.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25035 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-18 23:19:31 +00:00
Michael Lotz
4b80900d33 Remove the at least questionable b_sqrt() function and replace it with the
normal sqrt(). The stated goal of the function was to avoid a dependency to
the math library, which in our case does not apply anyway. This removes one
case of broken strict aliasing rules...

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25034 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-18 23:05:43 +00:00
Michael Lotz
4a32ef2c30 Remove doubled "count" in declaration. Fixes a "operation may be undefined"
warning with GCC4.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25033 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-18 22:55:27 +00:00
François Revol
9173ac083b Don't use the drop offset, much better now, it goes where the mouse is.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25032 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-18 21:18:26 +00:00
Axel Dörfler
5464b10f1a * get_uint32_color() now returns the color as host endian value.
* Introduced a new get_rgb_color(), that returns an rgb_color from a host endian
  uint32.
* Those two together fix bug #2094.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25031 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-18 18:10:44 +00:00
François Revol
5f2f72a288 Accepts drops on legends.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25030 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-18 17:30:00 +00:00
François Revol
79cbd22649 Colors should be archived correctly now, at least for replicants.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25029 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-18 16:42:10 +00:00
François Revol
c28f8ea349 Now reacts to color drops. Tested with Zeta prefs and ArtPaint palette.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25028 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-18 16:09:27 +00:00
Axel Dörfler
3f315b26d2 * Moved the "Remove View" functionality into the popup menu of the ActivityView
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25025 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-18 14:51:27 +00:00
Axel Dörfler
f374f0d9f1 * A view can have more than just one LayoutItem, and therefore, we have to
remove them all in RemoveView().
* Also, previously, the wrong LayoutItem could be removed if there was any
  view that had more than one item around.
* IOW using BView::RemoveSelf()/RemoveChild() yourself would have leaked
  memory in the best case, and would otherwise crash your app if there was
  any view with more than one LayoutItem.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25024 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-18 14:44:19 +00:00
Ingo Weinhold
25010b8723 Updated rand.c with a newer version from FreeBSD (version 1.17). This
also removes the advertising clause.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25023 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-18 14:24:10 +00:00
François Revol
dc1ffc79ef - fix BeOS build (it's getting nasty)
- add a media node count data source. Yes I do have work to do instead :P


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25022 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-18 14:01:48 +00:00
Axel Dörfler
43eda1cd8f * Each DataSoure now has a "primary" indicator - this is used to separate
more important DataSources from less important ones.
* Made the popup less crowded based on that info.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25021 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-18 12:54:34 +00:00
Axel Dörfler
065e8de0d5 * Improved layout of the activity views: each view now has separate layout
items for the history and the legend, causing the history parts of all
  views to be of equal size if used (which ActivityWindow now does, of course).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25020 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-18 12:45:41 +00:00
Axel Dörfler
28d5567e28 * GetPreferredSize() no longer crashes when given a NULL parameter (as the
other interface views already do).
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25019 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-18 12:01:07 +00:00
Axel Dörfler
00d5cfaa7e Fixed view persistence again.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25018 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-18 11:35:05 +00:00
Axel Dörfler
6f6ba87580 * Amazing: François writes almost style compliant code! :-)
* Minor cleanup - I haven't written SystemInfoHandler, François did.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25017 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-18 11:08:34 +00:00
François Revol
e034d18f42 Really really useless clipboard size data source (both flattened message size and plain text size). I should rather go to sleep than write useless code :D
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25014 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-18 00:12:40 +00:00
Alexandre Deckner
e8fa461ae7 * clamps the textcontrol input to 255
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25013 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-17 22:57:04 +00:00
François Revol
74158bb474 - introduced a SystemInfoHandler class used to watch for stuff when polling isn't needed.
- used it to add a count of running apps (not exactly the same as teams).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25012 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-17 22:04:18 +00:00
François Revol
03aaa278a5 Add Semaphores and Ports data sources.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25011 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-17 20:30:13 +00:00
François Revol
8cda9a8ead Added Teams data source.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25010 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-17 20:02:43 +00:00
François Revol
cbd4bc9573 Made ActivityMonitor buildable under BeOS (at least BONE).
This is only temporary, to help test adding data sources, so the gross #ifdef __HAIKU__ are intentional to keep BeOS-only code (without layout support) trackable. It is not fully functional but sufficient for testing and will go away later.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25009 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-17 19:46:52 +00:00
François Revol
3ddc1cdb8b - style cleanup.
- fix warnings.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25008 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-17 19:34:01 +00:00
Oliver Ruiz Dorantes
3ef106839a - Block correcily until the discovery has finished to retrieve the remote names.
- Guidelines fixings



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25007 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-17 19:19:19 +00:00
Oliver Ruiz Dorantes
fae5a1d349 - Add inquiry fields for the RemoteDevice, to store the information retrieved .
- Update those fields at discovering




git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25006 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-17 19:17:10 +00:00
Ingo Weinhold
b5a945d648 Allow only root access to the shadow password DB.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25005 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-17 17:58:51 +00:00
Ingo Weinhold
2d9a40222f ReceiveFrom() can now return the message_port_info for the received
message, if desired.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25004 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-17 17:58:02 +00:00
Ingo Weinhold
7727e08e5f Added experimental public API get_port_message_info_etc(). It is similar
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
2008-04-17 17:46:02 +00:00
Ingo Weinhold
a94ce1c912 * Reorganized the passwd and group support: A dedicated thread in the
registrar provides access to the DBs via a port message based
  protocol. The functions in libroot just ask the registrar now.
* Added Linuxish shadow passwd support. No putspent() though -- we'll
  provide private functions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25002 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-17 16:19:18 +00:00
Ingo Weinhold
e09769a94c Added Dump() method. It prints some general info and a list of the
message fields, no data, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25001 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-17 16:05:37 +00:00
Axel Dörfler
f127ebfd93 * Replaced the previous pthread_key implementation with a lockless one
that does not rely on the Be API TLS anymore, and is also more compliant
  with respect to the lifespan of the key specific values.
* It supports up to 256 different keys, which is equivalent of the solution
  that FreeBSD offers.
* The main thread now also gets a pthread_thread structure.
* Reenabled the POSIX suite test pthread_key_delete_2-1 as we now pass it.
* This also fixes bug #1642.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25000 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-17 13:44:39 +00:00
Ingo Weinhold
33b577d3b3 Patch by Vasilis Kaoutsis: Added mmap/munmap tests.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24999 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-17 13:10:07 +00:00
Axel Dörfler
ef4a3227fa * If there is no handler, we must not try to remove it from the linked list.
* This fixes bug #1644 again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24998 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-17 11:55:04 +00:00
Axel Dörfler
e0da34f5c0 * "where" and "be:view_where" are supposed to contain the same value; dunno
why the latter is then even added, but we do the same thing as BeOS now.
* This fixes bug #2075.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24997 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-17 11:10:44 +00:00
Michael Lotz
ba575e420d Add support for detecting FAT32 volume labels.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24996 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-17 10:04:12 +00:00
Michael Lotz
b8c45ca140 Just a bit of cleanup, remove trailing whitespace mostly. No functional changes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24995 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-17 10:02:49 +00:00
Michael Lotz
0eaadd30b2 * Applying patch by Dustin Howett that updates the iso9660 filesystem to the
new filesystem interface.
* Renamed sISO* to gISO* though as they are in fact not static.

Briefly tested and works as expected. Thanks for your work Dustin!
Closes enhancement #2089.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24994 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-17 06:26:43 +00:00
Oliver Ruiz Dorantes
ae736793e8 - Fix parsing of the inquiry replies. There is a first byte indicating the number responses which was ignored.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24993 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-16 22:21:28 +00:00
Oliver Ruiz Dorantes
6b81bac2bf - Change again the api... Strings are not for everything
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24991 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-16 22:16:19 +00:00
Oliver Ruiz Dorantes
b0410a2221 - Implement a filter for devices that are repling multiple times.
- Fix the creation of the RemoteDevicesList


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24990 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-16 22:15:20 +00:00
Oliver Ruiz Dorantes
5d820ba02d - Completed the command line tool. Discovers and after finishing asks the names of the discovered devices
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24989 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-16 22:08:23 +00:00
Ingo Weinhold
b0b25f209e Updated lp_solve copyright.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24988 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-16 21:01:16 +00:00
Michael Lotz
72010d4247 * Ported the FAT filesystem to the recent filesystem interface changes which
was, thanks to the detailed instructions from Ingo, quite doable.
* Ported the (deprecated and now publically removed) notify_listener() calls
  to the respective new notify_* calls.
* Fixed debug build.
* Added the FAT filesystem back to the image.

I only tested the filesystem briefly and everything seemed to work as expected
(mounted the FAT part of my bootable Haiku memory stick, opened a few files
and copied something to it). At least it should not be any more broken than
before the interface changes ;-).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24987 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-16 20:24:22 +00:00
Jérôme Duval
6112fe9a8d added memrchr and dirname
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24985 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-16 18:49:23 +00:00
Ingo Weinhold
b9f23a3497 Moved KMessage from libbe to libroot.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24984 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-16 17:55:55 +00:00
Stephan Aßmus
52e06f988d Applied patch by Artur Wyszynski:
* Renamed BView::Alignment() to LayoutAlignment() which fixes a ton of warnings
  and some conflicts with BControls.
* Added virtual destructor to BRefFilter in case the GCC version is 3 or newer
  (can't do it for GCC 2.95.3, since that would break binary compatibility 
  AFAIKT)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24983 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-16 17:11:40 +00:00
Michael Pfeiffer
5162961675 Added David Dengg to list of contributores for providing the initial version of bootman boot loader. Thank you!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24982 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-16 15:26:10 +00:00
François Revol
5415d8ed79 Fix warning on extra token.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24981 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-16 13:09:26 +00:00
Michael Lotz
f3283bfa83 * Increase the amount of tries in the EHCI BIOS handover so it lasts for up to
1 second instead of half a second. Might help with slow BIOSes.
* Disable EHCI interrupts if the BIOS handover fails so that we do not flood
  the system with interrupts if the BIOS later on decides to still comply with
  our handover request.
* Add an unconditional success message to EHCI and UHCI to better see if
  controllers are present/initialized correctly at all.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24980 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-16 08:16:14 +00:00
Bruno G. Albuquerque
044f45b2db - Another patch by Hervé W.
- Updated code so Processor IDs for older processor do not have to be 
modified.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24979 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-15 23:51:17 +00:00
Oliver Ruiz Dorantes
bf6f088436 The stack is already discovering devices, this is the small tool I used to test.
The stack calls for the moment hooks at starting and finishing and discovering each BT deviceNeeds still some polishing as some devices reply multiple times, and they should be filtered. And its nice to know the name after discovering not only the address. 




git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24978 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-15 22:49:05 +00:00
Oliver Ruiz Dorantes
078958f502 - Run the Looper
- Create Agent from the LocalDevice
- Fix constructors



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24977 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-15 22:31:54 +00:00
Ingo Weinhold
ae3633b049 We weren't tracking the buffer size in one case, which was rewarded with
a segment violation due to NULL pointer access.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24975 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-15 21:21:45 +00:00
Ingo Weinhold
5b53519c63 Some setre{g,u}id() tweaking. What happens to the saved set-{g,u}id is
not specified by the standard, but other systems set it as well in most
cases. We set it to real {g,u}uid now, if that changes. OpenSSH (sshd)
seems to be agreeable with that solution.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24974 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-15 21:18:07 +00:00
Axel Dörfler
2d8e02e435 * Started playground for the new device manager. This will eventually evolve
into the full thing, and will then be adapted to the kernel.
* Doesn't do a lot at this point - it can be built as a test app under BeOS
  and Haiku.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24973 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-15 19:07:08 +00:00
Ingo Weinhold
6fd31accd3 makebootable was broken under Haiku:
* Haiku partitions are block devices.
* Unlike BeOS Haiku requires a size parameter to be passed to ioctl()
  for B_GET_PARTITION_INFO.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24972 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-15 17:28:22 +00:00
Oliver Ruiz Dorantes
717c9b00f2 - Fix correct handling of the command status event
- Fix Removal of specifil event wanted in a given request



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24971 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-15 17:17:47 +00:00
Ingo Weinhold
b27b39f198 Added libMicro benchmark. Ported by Vasilis Kaoutsis.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24969 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-15 16:27:00 +00:00
Ingo Weinhold
9b293bf653 mmap() was a little strict: The length parameter need not be page
aligned. It shall be rounded up by the implementation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24967 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-15 14:22:50 +00:00
Stephan Aßmus
e806cb517a Applied patch by Scott McCreary:
* Added a whole lot of missing copyright statements, small corrections in
  some existing ones.
Changes by myself:
* Fixed line breaks to honor 80 char limit.
* Removed unused function declaration to avoid warning.
* Small style fixes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24966 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-15 14:22:03 +00:00
Michael Lotz
33574eaf6e Exclude the frame list rollover interrupt from the interrupts we are interested
in. We do not enable this interrupt and if we still "handle" it in our
interrupt handler we might prevent the interrupt from reaching the real intended
handler in a shared interrupt setup. Not sure if this could have happend at
all, but this is more correct in any case.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24965 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-14 06:35:25 +00:00
Ingo Weinhold
3cf7ecd1e4 * Added <sys/mman.h> header. It declares only mmap() and munmap() yet
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
2008-04-13 22:52:11 +00:00
François Revol
ebf8c71d74 Fix warnings about missing protos.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24961 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-13 17:52:41 +00:00
Axel Dörfler
c54a6536d6 Committed patch by Gerald Zajac, thanks!:
* Enabled testing the checksum of the EDID info.
* Added a version check of the EDID info.
* Added more debug output.
* In the ModeList class, changes were made to how the refresh rate is 
  computed and used.  Previously, some of the basic VESA modes were not 
  added to the mode list because the computed and specified refresh rates 
  did not exactly match.  Now if the computed refresh rate is within 1.2% 
  of the specified rate, the mode is added.  With this change, all basic 
  VESA modes selected by the EDID info are now added to the mode list.
* The "additional video modes" shown in the EDID dump are now added to 
  the mode list.  Previously, this mode data was setup but not added to 
  the mode list.  Code was also added here to set the vertical & 
  horizontal sync polarity according the EDID info.  The sync polarities 
  are set according to a VESA document that I have.
* Fixed copy_str() warning, broken removal of trailing spaces, and null
  termination.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24959 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-13 10:58:30 +00:00
Bruno G. Albuquerque
9c383d9867 Applied patch by Hervé W.
- Updated Intel processor IDs.
- Only take extended family/model into account on Intel processors.




git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24958 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-13 07:27:12 +00:00
Michael Lotz
93209d82e2 Fully clear the EHCI members too, so an incompletely constructed object can be
safely deleted.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24957 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-13 06:04:20 +00:00
Axel Dörfler
3a4a214197 Some more work on the ActivityMonitor:
* Added legend.
* Added network receiving/sending DataSource.
* Now uses the new layout engine.
* Added support for per CPU DataSources, and added a per CPU CPU usage
  DataSource.
* The DataSources can now be turned on and off via popup menu.
* You can now add more than one view to the window.
* The DataSources of the ActivityViews are now remembered.
* Now uses an offscreen bitmap to reduce flicker (it should now no longer
  flicker with accelerated graphics).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24955 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-13 06:02:45 +00:00
Michael Lotz
656af4e869 * Initialize all of the fields in the UHCI class so in case of an error in the
constructor the object can be safely deleted (as documented for bug #1473)
* Some simplifications by caching the Pipe object for a transfer
* Minor cleanup

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24954 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-13 05:56:10 +00:00
Axel Dörfler
6ad23dbbf4 Some cleanup:
* Reordered to have the constructor/destructor first.
* Two blanks between functions.
* Removed superfluous constructor calls.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24953 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-13 04:57:13 +00:00
Rene Gollent
1174007caf Modified bin/keymap's -h option to write a variable to the generated header
indicating the name of the keymap. Correspondingly, modified input_server 
to use the aforementioned variable in order to write the name attribute
to ~/config/Key_map. This allows Keymap prefs to correctly recognize the name
of the default keymap on a fresh build.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24951 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-12 22:41:19 +00:00
Ingo Weinhold
f13ba03959 * Removed SyscallRestartWrapper comparison operators. They are not
needed, since we've got a cast operator.
* Reverted r24927-r24929. There's no potential ambiguity anymore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24949 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-12 17:18:31 +00:00
Ingo Weinhold
460c990c5d The syscalls that were returning an address always copied back the full
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
2008-04-12 16:59:49 +00:00
Michael Lotz
c8661c3885 Make a local copy of the passed in isochronous packet descriptors before
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
2008-04-12 14:20:53 +00:00
Jérôme Duval
c103aef2b3 disabled check for memory overlaps for the time being
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24946 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-12 13:36:33 +00:00
Stephan Aßmus
2082f2d5c1 * Cleanup and improvements in the debug output
* 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
2008-04-12 13:24:33 +00:00
Michael Lotz
b6d44561ff Quick buildfix.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24944 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-12 10:27:04 +00:00
Ingo Weinhold
59234b36ce * Added support for SCM_RIGHTS (sending file descriptors).
* 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
2008-04-12 09:37:13 +00:00
Jérôme Duval
316b5f9214 updated bzip2 to 1.0.5
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24942 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-12 09:30:47 +00:00
Ingo Weinhold
97cdbb548e Added support for sending/receiving ancillary data. The protocol modules
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
2008-04-12 09:28:05 +00:00
Ingo Weinhold
62d7da1f45 Added support for attaching ancillary data to a net_buffer. It's a naive
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
2008-04-12 09:19:44 +00:00
Ingo Weinhold
5f2d64a25e * _user_{send,recf}msg() no longer copy iovecs on the stack. They use
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
2008-04-12 08:50:17 +00:00
Jérôme Duval
9c6ab2ae36 fixed bug #2067
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24938 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-12 08:37:03 +00:00
Ingo Weinhold
0cc82d47d4 Added close_fd_index() which is pretty much like close(), but gets the
IO context in which to close the FD.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24937 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-12 08:32:29 +00:00
Michael Pfeiffer
dff9173818 Save and restore MBR and write boot menu.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24935 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-12 08:25:38 +00:00
Michael Pfeiffer
7437e205be Removed debug code.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24934 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-12 08:21:35 +00:00
Michael Pfeiffer
86ad7d1c71 Refactored and reformatted.
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
2008-04-12 08:19:25 +00:00
Michael Pfeiffer
1b56fe8db5 Helper application that converts the contents of a file into an uint8 array.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24932 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-12 08:10:57 +00:00
Michael Pfeiffer
20abf32b6d Boot menu and loader by Dengg David.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24931 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-12 08:10:29 +00:00
Jérôme Duval
2be56e7576 Applied patch from n3s: the check for file extension was broken. Thanks!
This fixes bug #2034


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24930 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-12 07:58:43 +00:00
Jérôme Duval
6cb51e58bc better cast to the good type to avoid confusing gcc
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24929 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-12 07:17:01 +00:00
Jérôme Duval
b1459ca4b4 hmm I managed to break the comparaison order...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24928 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-12 07:08:56 +00:00
Jérôme Duval
bdfe92370f gcc4 build fix. Here is one of the two errors:
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
2008-04-12 07:04:45 +00:00
Michael Lotz
349a9cfc0f Use a list of host controller modules instead of using open_module_list() and
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
2008-04-12 06:10:36 +00:00
Michael Lotz
e959baed58 * Set the interrupt threshold of the controller when doing the rest of the
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
2008-04-12 06:10:28 +00:00
Rene Gollent
487171f0b9 Keymap preferences now saves an attribute on the Key_map file to indicate
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
2008-04-12 03:28:12 +00:00
Michael Lotz
77599d6d06 Redefine B_KERNEL_{READ|WRITE}_AREA to 0 for BeOS compatibility and not to
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
2008-04-11 22:03:34 +00:00
Michael Lotz
dbcfdd5ca7 Correct the way serial devices are deleted. They are either deleted on removal
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
2008-04-11 21:52:39 +00:00
Ingo Weinhold
c1add58abb Resolved TODOs: We now do know whether the call comes from userland or
the kernel.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24919 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-11 20:43:40 +00:00
Ingo Weinhold
3118b3a7cb * Added fd_ops::set_flags() hook. It's only implemented by socket FDs
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
2008-04-11 19:21:14 +00:00