Commit Graph

20690 Commits

Author SHA1 Message Date
Stefano Ceccherini
838c73ba76 Removed unused BWindow friend classes, renamed some BView member
variables to fit our guidelines.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24912 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-11 09:26:11 +00:00
Stefano Ceccherini
18af47f5c4 Renamed some private methods to have the underline prefix, now that
BWindow doesn't call them directly anymore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24911 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-11 08:53:25 +00:00
Stefano Ceccherini
10f4d0679a Added a class MenuPrivate to handle access to private BMenu methods.
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
2008-04-11 08:22:09 +00:00
Ingo Weinhold
df50f7a9b4 * Changed the way the socket functions work:
- 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
2008-04-11 04:12:23 +00:00
Ingo Weinhold
446d50a652 Removed unused _kern_socket() dummy.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24907 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-11 03:37:18 +00:00
Ingo Weinhold
0fc6c43728 Resolved TODO: We can check for sockets, now.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24906 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-11 03:35:15 +00:00
Ingo Weinhold
08b2313e70 * Fixed some checks for user addresses. IS_KERNEL_ADDRESS is not the
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
2008-04-11 03:32:45 +00:00
François Revol
ef16b3bb76 Use the thread's stack size for RLIMIT_STACK, this should work even if we ever implement changing a thread's stack.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24898 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 21:56:22 +00:00
Stefano Ceccherini
0323cae536 Fixed warning.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24897 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 20:58:32 +00:00
Stefano Ceccherini
42bf22abf8 fixed warning.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24896 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 20:57:29 +00:00
Stefano Ceccherini
47908b9ae3 fixed warnings.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24895 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 20:48:38 +00:00
Michael Lotz
017d539c2a A few more things to get the USB stack working under BeOS again. We now have
KDEBUG on by default which causes benaphores to always use their semaphore.
Therefore when initing the benaphore with the inline compatibility function
and then using it using the lock.h provided inline would always cause a
deadlock and a hanging system under BeOS. Also we now (re-)define the
B_KERNEL_{READ|WRITE}_AREA defines for non Haiku targets to 0 apparently which
would probably also cause the stack to misbehave. Therefore they are now
just redefined (again) to plain B_{READ|WRITE}_AREA in BeOSCompatibility.h.
Change the inclusion order in some places so things work as expected.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24894 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 19:55:51 +00:00
François Revol
c4a7b4e09e Report the stack size from getrlimit(), we might want to get fancier later but that should be enough. Tcl will want that.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24893 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 19:27:26 +00:00
François Revol
85e1e2f4d6 Coding style :P
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24892 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 18:05:00 +00:00
François Revol
42fe011d2a Set close-on-exec flag on USB Kit device descriptors, so apps launched by Tracker won't inherit all the fds to hubs as they do on Zeta :)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24891 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 16:46:26 +00:00
Axel Dörfler
c28d31cce6 Removed unused variables.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24889 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 12:48:42 +00:00
Axel Dörfler
cdde324d77 * Looks like r24456 was a bit premature: with string attributes, it makes sense
to ignore a trailing null byte, which the code now didn't do anymore.
* This caused bug #2054.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24888 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 11:43:45 +00:00
Ingo Weinhold
875757adef Wait states should be interruptable.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24887 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 05:01:21 +00:00
Ingo Weinhold
9c796e6e71 * Added some debug output.
* Flags and timeout arguments to acquire_sem_etc() were swapped.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24886 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 04:12:40 +00:00
Ingo Weinhold
65a0f233b9 Looks like I had been fallen asleep before finishing the implementation.
After successfully copying the data from the receive queue into a new
buffer, we should actually return that buffer and update the queue size.
recv() doesn't KDL anymore when reading less data than queued.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24885 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 03:27:31 +00:00
Ingo Weinhold
eb8b342d56 Protocol module for Unix domain stream type sockets. The implementation
is almost complete, but still quite buggy (receiving data has a good
chance to drop into KDL). 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24884 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 03:17:05 +00:00
Ingo Weinhold
f8b4d83f2f New service function vfs_create_special_node() to create special nodes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24883 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 03:07:07 +00:00
François Revol
8ff902d0bd Fix building usb busses with tracing on.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24880 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-09 21:53:11 +00:00
Maurice Kalinowski
a7fb4c16b6 fix some gcc4 related warnings...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24879 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-09 20:28:55 +00:00
Maurice Kalinowski
3c08ed4a34 Don't reset the duration value after passing it to SetRef as pointed out by Marcus.
Sorry for taking so long to commit this...



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24878 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-09 19:43:49 +00:00
François Revol
facc00359b Fix building usb bus manager with TRACE on.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24877 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-09 18:46:24 +00:00
Rene Gollent
aa84c115f6 Build fix :)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24876 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-09 18:16:53 +00:00
Axel Dörfler
400ba068e0 Made sure load_driver_symbols() is not used anymore when building for Haiku;
it's a no-op, and I removed the prototype from KernelExport.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24875 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-09 17:48:36 +00:00
Axel Dörfler
afaf6f2f1b * Implemented open_module_list_etc() in libkernel_emu.so as well.
* Added license.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24874 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-09 14:45:17 +00:00
Axel Dörfler
8b79f1fd68 * Added open_module_list_etc() that also allows to specify a required name
suffix. You can use this to verify the version of a module_info structure.
* Made module_info::std_ops optional.
* Minor cleanup in module.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24873 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-09 14:36:04 +00:00
Axel Dörfler
037f70947f * Cleaned up KernelExport.h completely, removed deprecated and non implemented
API, uses the _PRINTFLIKE macro where appropriate.
* Got rid of the "qent" structure, struct timer now contains everything we
  need. This makes the affected code in sem.cpp, signal.cpp, and timer.c much
  cleaner, and resolves a few TODOs.
* Minor cleanup in vfs.cpp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24871 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-09 14:21:06 +00:00
Axel Dörfler
36de598e0f * block_cache_sync[_etc]() now also waits for all notifications to be handled.
This fixes a potential problem where a volume would be left marked dirty on
  a clean reboot as reported by Vasilis; no harm would have been done to the
  data on the volume, though (it would just replay a log entry that it didn't
  need to).
* Unified the naming of the notifier/writer thread: renamed the thread to "block
  notifier/writer", and the variable holding the thread ID to
  sNotifierWriterThread.
* Added a few more doxygen descriptions to the private functions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24870 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-09 11:04:26 +00:00
Axel Dörfler
cfc3fa87da * Cleaned up InterfaceDefs.h, added TODO about getting rid of declaring
_init_interface_kit_() in there.
* Moved private get_mode_parameter() into the BPrivate namespace.
* Renamed interface_misc.h to InterfacePrivate.h.
* Minor other cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24869 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-09 10:07:35 +00:00
Ingo Weinhold
3daf03d3ab I broke the index dir access when changing the FS interface.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24868 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-08 21:14:21 +00:00
Oliver Ruiz Dorantes
2154bbe8d6 Added copyright
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24867 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-08 20:39:04 +00:00
Oliver Ruiz Dorantes
da9793832b ObjectList is required
Courtesy of candidate SoC student Adrien Destugues 



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24866 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-08 20:02:29 +00:00
Stefano Ceccherini
e5e708ca39 Removed the snooze() call before tracking the popup menu. This should
avoid the problem noticed by Andrea Anzani (can you check, please ?) 
where the tracker menu would close when moving the mouse too fast.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24863 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-08 08:37:05 +00:00
Stephan Aßmus
67d5c5a838 Implemented Oliver's suggested improvement to ServerCursorReference when
switching cursors. There was a race condition in case the objects was used
by multiple threads, in which Cursor() could return an already destroyed
object. Note: This doesn't fix a real bug or anything, the change is purely
forward looking in case ServerCursorReference is ever used like that.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24862 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-08 08:12:38 +00:00
Michael Lotz
bfbbfedc5f * Prepare usb_raw.h for eventually being made public. Prefixed enums values
with B_USB_* and the command union is now usb_raw_command.
* Changed usb_raw and the BUSB* classes accordingly.
* Moved the raw_device struct into usb_raw.cpp as suggested by Francois as it
  was the only thing usb_raw_private.h defined.
* Removed usb_raw_private.h again because of the above.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24861 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-08 07:53:43 +00:00
Ingo Weinhold
5822847842 If the entry leaf name is "." or ".." we need to resolve it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24860 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-07 19:41:49 +00:00
Ingo Weinhold
54045c2e44 * Explicitly support source paths with a leaf name "." or "..". In this
case the contents of the directory shall be copied into the target
  directory, not the source directory itself. This is actually a feature
  the build system uses for installing in a directory, but I've only
  ever tested it under Linux and there a bug in libbe_build made it work
  automatically. Fixes #2036.
* Removed copy and paste left-over for the "-x" and "-X" options.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24859 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-07 19:40:52 +00:00
Michael Lotz
d419b482ad Integrate the USBKit into libdevice and make it public. I left the USBKit.h
name, as it in fact is like a kit in the kit. It combines the different BUSB*
classes as compared to SerialPort.h where there really is a 1:1 relationship
between the header and the (one) class. If someone has a better fitting name
please shout.
Separated the usb_raw.h into usb_raw.h which defines the protocol and
usb_raw_private.h which holds the internal device structure for usb_raw. This
reduces the header dependencies.
Hopefully cought all occurencies of USBKit.a usage (in usb_dev_info and
the usb_webcam media add-on) but might have missed something that is not in
the image.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24858 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-07 19:24:16 +00:00
Michael Pfeiffer
d4f7b8428a Applied patch for ticket #2042 by Philippe Saint-Pierre: List box was overlapping the label of the list box.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24857 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-07 19:04:07 +00:00
Axel Dörfler
8b5e5656f4 * BFS now panics if cache_sync_transaction() didn't free the space needed,
instead of writing over the old log entries.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24856 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-07 12:15:15 +00:00
Axel Dörfler
b9fe86d2d7 * Added pthread_setconcurrency(), and pthread_getconcurrency() functions.
* Since we use a 1:1 mapping, they don't do anything besides remembering the
  level set, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24855 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-07 10:57:01 +00:00
Stephan Aßmus
04ea9a475f * Use the new layout features to build the UI, prevents problems with
BMenuField being cut off. Simplifies the code a lot.
* Move message constants declaration into View, since they are private.
* Cleanup of EthernetSettingsView.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24854 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-07 10:45:50 +00:00
Axel Dörfler
391fdf1e99 * notify_transaction_listeners() would always remove all listeners when it
was asked to. Unfortunately, it also removed the TRANSACTION_WRITTEN
  listeners (that were added before notifying other listeners), so that BFS
  could never free up space in the log. Now, it will only remove the listeners
  it may remove. This fixes bug #2024.
* Rearranged functions a bit, moved notification/listener related private
  functions together.
* Added tracing entry for written transactions as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24853 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-07 10:39:01 +00:00
Axel Dörfler
797a92d84d * Made super block log handling endian-safe.
* Made all debugging functions endian-safe.
* Added tracing for log entries.
* Added new KDL command "bfs_journal" to dump all pending log entries.
* When BFS_DEBUGGER_COMMANDS is defined, the LogEntry class will also track
  the transaction ID it belonged to.
* The "bfs" KDL command now sets some useful debugger variables.
* The "bfs_allocator" KDL command now accepts the group index as 3rd argument.
* Renamed Journal::_TransactionListener() to _TransactionIdle(), as that's
  all it is for.
* Removed TODO comment in Volume::WriteSuperBlock(), as it's actually not true.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24852 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-07 10:32:03 +00:00
Stephan Aßmus
c9d15f8cdb Applied patch by Duane R. Bailey:
* Replaced occurances of "..." by B_UTF8_ELLIPSIS in the apps folder.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24851 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-07 09:19:56 +00:00
François Revol
038ed3d1f2 Add _SC_PAGE_SIZE sysconf().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24850 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-07 01:08:18 +00:00
Ingo Weinhold
bd31302c3c Added small tool diff_zip that I used for building the latest optional
packages.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24849 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 23:40:12 +00:00
Michael Lotz
31f63eb4da Fix broken build due to forgotten definition of the reserved virtual functions.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24847 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 22:00:19 +00:00
Axel Dörfler
18d3e65ebd * The beginnings of an activity monitor application. Very bare and feature-less
right now, but it's already working (and shows that we better compute our
  system_info::cached_pages field directly).
* I am not sure if we want to keep this app here, merge it with
  ProcessController, or have it as a separate (3rdparty) app. Opinions welcome.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24846 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 21:30:50 +00:00
Michael Lotz
6a7b827501 Forgot to use nothrow for the allocation of the interface descriptor. Thanks
for pointing that out Stephan!

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24845 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 20:19:38 +00:00
Stephan Aßmus
636bff2fd2 Patch by Philippe Saint-Pierre:
* 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
2008-04-06 20:10:50 +00:00
Stephan Aßmus
5c21588c29 Addded various people who have contributed lately.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24843 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 20:00:58 +00:00
Michael Lotz
5aa70ae110 * Add a AlternateAt() method to the BUSBInterface class that can retrieve the
usb_interface_descriptor of an alternate interface without having to switch
  to it.
* Add some reserve bytes to all classes and add some reserved virtual slots
  where the objects are publically constructable.
* Remove the source compatibilty defines that were briding the old USB* with
  the new BUSB* class names.
* Implement the usb_raw side of getting an alternate interface descriptor.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24842 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 19:59:24 +00:00
Stephan Aßmus
d7aa5bb89c Oh boy. I think I fixed the issue by understanding it with the right side of
my brain, while the left side is still puzzled. So it's hard to put it into
words. Basically, there was an unwanted feedback loop when applications first
scrolled vertically and then horizontally (or vice versa). Because of the
feedback effects between BView and controlling BScrollBar, and because BView
controlls both scrollbars at once, it is important not to set the scrolling
offset of an unaffected ScrollBar, since we might actually be comming from the
SetValue() function of the other scrollbar. Fixes #1913 and possibly more,
going to check up on the other scrolling related bugs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24841 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 17:59:22 +00:00
Stephan Aßmus
205cf95ff6 More cleanup, disabled accidentally left on tracing.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24840 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 17:53:43 +00:00
Stephan Aßmus
2f8dc04583 More style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24839 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 16:56:30 +00:00
Stephan Aßmus
1158eeac58 According to my tests on R5, a BScrollBar with a proportion of 0.0, the value
that it has when you never set it, uses the large step to figure out the
proportion it should display. This fixes Pe's scroll bars to display the
"correct" proportion. Of course the proportion is only correct if the large
step indeed equals the page size. Fixes #1758.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24838 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 16:47:43 +00:00
Michael Lotz
a43222b925 * Implemented setting an alternate interface through the USBKit library based
on a patch by Salvatore Benedetto, adapted to the usb_raw interface by me
* Added two convenience functions IsStalled() and ClearStall() to USBEndpoint

Both changes are actually untested, so if you have a use for them and encounter
problems please shout.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24837 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 16:22:59 +00:00
Stephan Aßmus
c2234e0598 * Added optional tracing to ScrollBar.cpp.
* Fixed line breaks to not exceed 80 char limit.
* Removed any trailing spaces.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24836 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 16:22:10 +00:00
Michael Lotz
49df4099d1 Implement a binary compatible way of setting an alternate interface through
usb_raw.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24835 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 15:57:26 +00:00
Ingo Weinhold
25eb8cd717 * Renamed pipefs.cpp to fifo.cpp.
* Removed the pipefs functionality. We only need to support FIFO nodes.
* Renamed the remaining pipefs_*() functions to fifo_*().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24834 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 15:50:28 +00:00
Ingo Weinhold
a1db78790d Removed pipefs from the built-in modules.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24833 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 15:45:07 +00:00
Stephan Aßmus
6a1d169c52 * Removed trailing spaces in ScrollBar.h
* It's not a good idea to archive fProportion as int32, seeing it's a float
  on [0..1].
* Implemented archive constructor for BScrollBar. Untested.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24832 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 15:11:31 +00:00
François Revol
658aafcb62 Add recent files to the Open File menu.
Add dropped files to the roster's list of recent files.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24831 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 14:52:43 +00:00
Stephan Aßmus
27000126fd Fixed the build of the registrar for the app_server test environment.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24830 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 14:39:22 +00:00
Stephan Aßmus
20eb92f20a * Fixed missing include.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24829 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 14:36:14 +00:00
Michael Lotz
8024db25a8 Change just host_controller_info to usb_host_controller_info for the sake of
clearity as suggested by Philippe Houdoin once and brought to my attention by
Slavatore. As this definition is completely private to the USB stack it would
not have caused any conflicts though.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24828 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 14:14:42 +00:00
Michael Lotz
3568352d8d When a partition was unpublished from devfs the devfs_delete_vnode() would
also free the device info which it must not do, as this info is in fact just
a pointer to the device info of the raw node. Removing a raw device that had
partitions published therefore always lead into KDL when closing the raw
device after unpublising the partition, as the close_hook pointer which sits
in the device info now was 0xdeadbeef. This should make for example unplugging
USB devices work as expected.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24827 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 12:07:45 +00:00
Axel Dörfler
a63f51dea4 * Enabled a few more chipsets that I found PCI IDs for. Only the i845G one has
actually been tested (see ticket #1969).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24826 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 09:37:14 +00:00
Michael Lotz
fc38019945 Rename vfs_stat_entry_ref() to vfs_stat_node_ref() as that's what a dev_t and
ino_t combination really is.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24825 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 09:18:27 +00:00
Ingo Weinhold
ea39c6377e Might help gcc 2.95.3 to resolve its perceived overloading of the
function.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24824 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 03:13:11 +00:00
Ingo Weinhold
6e36a49e62 * Added _kern_create_pipe() syscall, creating a pipe as an entryless
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
2008-04-06 02:49:12 +00:00
Ingo Weinhold
ad3a563d43 create_special_node() supports creating a special node without entry,
now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24822 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 02:44:37 +00:00
Ingo Weinhold
3af6d6a43a Commented out some debug output. The sources will be reworked soon.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24821 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 02:42:18 +00:00
Ingo Weinhold
9583c41d8a Added TODO regarding potential deadlock.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24820 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 02:35:07 +00:00
Ingo Weinhold
d4016ffdbb * A pipe can now be inactive and active. After creation it remains
inactive until at least one reader and one writer have opened it. As
  long as it is inactive, reads from and writes to it just block. When
  active, they behave as before (if there's no counterpart writes fail:
  SIGPIPE + EPIPE, reads return 0). When both reader and writer count
  drop to zero, the pipe becomes inactive again.
* Allocate the ring buffer lazily when the pipe becomes active and
  delete it when it becomes inactive.

This makes the pipe implementation FIFO compatible. IOW, FIFOs work as
expected as far as I've tested them.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24819 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 01:40:01 +00:00
Ingo Weinhold
a8cba5904f The rootfs was calling remove_vnode() on nodes for which it might not
have had a reference.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24818 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 00:27:36 +00:00
Ingo Weinhold
717705d816 We get a reference to the node from create_special_node(), so we have to
release it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24817 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 00:26:15 +00:00
Ingo Weinhold
7ffafac8d7 * Reorganized the FS interface a little:
- 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
2008-04-05 23:05:16 +00:00
Michael Lotz
5d7ee5e84a * Replace the path based lstat in the device watcher with the new device/node
based one. The path based version could not have worked for entry removed
  notifications at all as the node is removed from the directory at this point
  already
* Forgot to delete the device watcher instance after removing all monitors
* The PartitionRegistrar in DeleteDevice() was set to already locked which is
  not the case
* Someone probably forgot to add a PartitionRegistrar to the media checker - it
  did register the device on each run but never actually unregistered it, which
  obviously messed up the reference counting a bit

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24815 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 22:08:47 +00:00
Michael Lotz
efb965d559 Introduce vfs_stat_entry_ref() that allows to stat a vnode based on a dev_t
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
2008-04-05 22:01:05 +00:00
Stephan Aßmus
d0fc7c65c6 Patch by Philippe Saint-Pierre:
* 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
2008-04-05 21:15:43 +00:00
Michael Lotz
86dd3875cd * Updating device->removed must be protected by the device lock
* Also updating device->open_count must be protected by the device list lock

This fixes the (unlikely) case where a device was removed from usb_disk
standpoint while it still had an open read/write/ioctl operation.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24811 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 16:42:34 +00:00
Michael Lotz
b6b5de0741 Use a more reasonable timeout of 1 second for synchronous USB requests.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24810 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 15:14:30 +00:00
Axel Dörfler
0e4edbeafa * Added checks to (hopefully) all write/create functions to bail out early
if the volume is read-only. This should help with #2028.
* Removed unused bfs_[de]select() functions.
* Removed most paranoia checks - now that we control both sides of code,
  this would just hide eventual problems in the VFS code.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24809 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 12:24:11 +00:00
Stephan Aßmus
85f0201086 Rene left tracing turned on in his last commit to this file.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24808 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 12:07:10 +00:00
Axel Dörfler
98b7d71b7c The wait_for_notifications() function now detects if it has been run from
within the notifier/writer thread, and will then flush the notifications
directly. This should fix #2008 again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24806 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 10:23:11 +00:00
Axel Dörfler
355914a2cd * Enlarged maximum kernel size to 2 MB - this is the code the boot loader's
MMU code reserves for the kernel, and we hit that limit recently with the
  addition of the boot splash code.
* This fixes the boot crash as triggered by Stippi's recent changes to the
  splash image.
* Cleanup (doxygen comments, line length).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24805 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 10:16:49 +00:00
Michael Lotz
b04afa2413 * Another tiny cut in stack load time: do not delay after setting the current
configuration of a root hub
* Cut down on number of retries to set the initial device address

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24804 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 00:38:38 +00:00
Michael Lotz
f1a9c3c214 Implement a downcounter for the synchronize cache command. There are devices
that do not support it (probably because they do not have a cache at all like
in flash media) and this should at least avoid spamming the syslog when this is
the case. It will try 5 times and then disable syncing for that device. Untested
as of yet though.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24803 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 23:46:14 +00:00
Rene Gollent
0ee109102b Forgot about this static function.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24802 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 23:41:01 +00:00
Rene Gollent
45219b61ea Modify ProcessController's System Resources and Caches item: it
now shows cache and total committed mem respectively.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24801 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 23:40:09 +00:00
Rene Gollent
4e103cc0e7 Remove cache mem indicator from this app.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24800 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 23:39:30 +00:00
Michael Lotz
a380bc2513 * Add support for devices with multiple LUNs
* A device now has one or more LUNs which are used for LUN specific functions
* Adapted these LUN specific functions to the new design and also change the
  (un-)publishing accordingly
* Handle "no media" cases more correctly
* Output some interesting device infos also with tracing disabled
* Add some more helpful debug output here and there

Devices that provide multiple logical units (like those n in 1 card readers)
should now be usable with usb_disk too. Also we don't fail when a device is
attached which currently does not contain a media. Instead handle media changes
correctly so inserting a media works as expected. Note that hot-unplugging and
media removal still does not quite work right at the devfs or disk device
manager level and easily crashes the system.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24799 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 22:51:29 +00:00
Jérôme Duval
f27659f55e * GRAY8 is 8 bits
* typo


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24798 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 19:45:11 +00:00
Axel Dörfler
d6e60839e9 * Resolved a TODO: determine the log size depending on the size of the volume.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24797 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 19:32:39 +00:00