Commit Graph

24200 Commits

Author SHA1 Message Date
Axel Dörfler
1da9f5cea5 * Added BDiskSystem::ShortName() and everything needed to get it there.
* Added BDiskDeviceRoster::GetDiskSystem() method, that can get a disk system
  by short/pretty/module name - since they should all be unique, I put them
  in a single namespace, please complain if you don't like that :-)
* Cleaned up DiskSystem.h and DiskDeviceRoster.h according to the updated
  header guidelines.
* Renamed ntfs pretty name from "ntfs File System" to "Windows NT File System".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25414 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-10 11:44:00 +00:00
Stephan Aßmus
36e12bef8f Applied patch by SHINTA to enable Zenkaku/Hankaku key codes in Japanese keymap.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25413 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-10 11:41:28 +00:00
Stephan Aßmus
d77a8d47d2 * Used ui_color() for default view color.
* Fixed Track and Disc time labels to be large enough. (Fixes #2201.)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25412 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-10 11:27:48 +00:00
François Revol
901e5756cb Indeed we don't need this signal hack for BeOS, we just need to tell it the pgid. That reduces the number of things to remove later ;)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25411 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-10 11:22:18 +00:00
Stephan Aßmus
572ff7ee4a Fix a few minor coding style violations.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25410 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-10 11:12:23 +00:00
François Revol
8bbf2fc768 - some more ANSI attributes
- changed comments to pragma comments for parse tables as it's huge, but sadly Pe doesn't make them clickable in the function list...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25409 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-10 02:48:57 +00:00
François Revol
ac7f526d3c - dump termios struct for ttys
- implement VMIN & VTIME, at least it seems to work but it's 4am and it's overly weird, so please review.
See http://man.cx/termios and http://www.unixwiz.net/techtips/termios-vmin-vtime.html .


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25408 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-10 02:07:12 +00:00
Ingo Weinhold
c44fb2a62c Advisory locking fixes:
* Made the access strategy to vnode::advisory_locking consistent.
  get_advisory_locking() was guarding it with sVnodeMutex,
  create_advisory_locking() was using atomic_pointer_test_and_set(), and
  release_advisory_lock() just set it unguardedly. We do use sVnodeMutex
  consequently, now.
* Beautified create_advisory_locking() (got rid of the gotos,
  reorganized the control flow).
* Fixed race conditions in acquire_advisory_lock(). It was always
  unlocking and relocking the advisory_locking object when it didn't
  have to wait, but in the meantime someone else could have changed the
  locking situation. Reorganized the control flow, so that it only drops
  the lock when it has to fail or wait. Using create_advisory_locking()
  upfront simplifies the code quite a bit (and fixes another race
  condition).

APR's testprocmutex test seems happy now, at least.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25407 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-10 00:53:13 +00:00
Axel Dörfler
078d0317d0 * Work in progress: driver loading triggered by devfs.
* get_driver() now returns a result, as you may theoretically call it on
  any node (and not just your parent, which is guaranteed to be there).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25406 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-09 22:05:50 +00:00
François Revol
4b48c06f26 - dump winsize info too.
- prepare for VTIME and VMIN handling: allow waiting with timeout.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25405 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-09 21:48:59 +00:00
Ingo Weinhold
536f5d515a Don't create anything in a removed directory. Axel, please review. I
don't see how the locking in Remove()/Create() works.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25404 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-09 21:21:22 +00:00
Ingo Weinhold
156c744335 The terminal is not supposed to send signals to the shell. That's done
by the tty. Now I also understand the BeOS work-around to ignore SIGINT
in bash I removed recently.
I suppose the signal code is still needed for BeOS. If not please remove
it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25403 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-09 20:37:45 +00:00
Jérôme Duval
d55232a8c6 update to tzdata2008b
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25402 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-09 20:26:56 +00:00
Stefano Ceccherini
87f17bdf5c added the g prefix to some global variable
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25401 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-09 19:56:25 +00:00
François Revol
02917e5cbf - mark BeOS-specific ioctls we support for legacy apps,
- add 'wsiz' which is a private alias for TIOCSWINSZ,
- add some we might want to implement (or not) as reminder,
- add hw signal ioctls with a note for later (call driver service func),
- implement 'ichr' undocumented ioctl that waits on N chars on input, this fixes behaviour of rhapsody IRC client and many other curses apps. Oddly it seems even our own curses still uses it, that should likely be fixed as we support select(). But we must keep this one in to support apps that have their own curses lib.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25400 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-09 18:49:47 +00:00
Ingo Weinhold
d59239b300 Also align the given size to pages when unmapping memory. Fixes munmap()
for non-aligned sizes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25399 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-09 18:23:23 +00:00
Ingo Weinhold
e4d9ef0e7c setjmp() must return 1 when a 0 value has been passed to longjmp().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25398 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-09 18:22:01 +00:00
Stephan Aßmus
370fc8c907 Fix the build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25397 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-09 15:56:37 +00:00
Ingo Weinhold
ec5867990b I broke pthreads in r25390. The thread pointer was passed in the wrong
argument.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25396 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-09 15:05:17 +00:00
Axel Dörfler
aa8bff87ee Followed Ingo's suggestion, and made StackDeleter an AutoDeleter specialization.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25395 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-09 13:08:59 +00:00
Axel Dörfler
2d79691811 * Changed how the driver paths are found: now, the bus can add type/sub-type/
interface information (in the PCI notion) to a node, and the possible paths
  of a device driver are generated from that information by the device manager.
* Removed the "is bus" attribute - the device manager now decides wether or not
  a device always loads its children (as opposed to on demand loading only),
  even if the B_FIND_CHILD_ON_DEMAND flag is specified.
* device_node::Register() now correctly maintains the fRegistered member field.
* Replaced the driver_module() and driver_data() methods with a get_driver()
  method that retrieves all information at once.
* Cleaned attribute names.
* Some other cleanup, adding const where it makes sense.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25394 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-09 12:56:29 +00:00
Axel Dörfler
359f758bc4 * Added PCI_hd_audio sub-type in the PCI_multimedia base class.
* Fixed some minor typos.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25393 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-09 12:42:33 +00:00
François Revol
eed037b637 - SetPosX/Y were wrong, but not yet used.
- implemented HPA/VPA (CV/CH) sequences (set absolute v and h position). It's optional but because the beterm termcap advertises it we must implement it. Also note beterm increments args unlike others. This fixes all obvious display issues with the rhapsody IRC client (a small ncurses client I ported).
- maybe we should switch the CASE_* to an enum ?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25392 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-09 03:44:37 +00:00
François Revol
85b80c5229 - get rid of control chars in source files (ESC and CTRL-L)
- fix Home and End keys
- simplify code
- add different strings for Ctrl-arrows, allows to map them to previous/next-word (PuTTY and others have actually several codes depending on mods & ALT, mode & CTRL and even mods & CTRL|ALT, might be even better...).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25391 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-09 02:22:37 +00:00
Ingo Weinhold
f7cc12b389 Implemented pthread_attr_{g,s}etstacksize(). Also added commented-out
prototypes for the missing pthread_attr_*() functions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25390 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-09 01:36:49 +00:00
Ingo Weinhold
4c49f2056b * Changed _kern_spawn_thread() and create_thread(): Instead of individual
arguments they get a single thread_creation_attributes structure now.
* Added stack_address and stack_size to thread_creation_attributes,
  which allow to specify the stack size or the stack to be used for the
  new user thread.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25389 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-09 01:32:36 +00:00
François Revol
6eea7aabb8 Handle any dropped message. This makes dropping from Pe working for ex, as well as the BeOS BColorControl.
Color drop is currently disabled, for now it just pastes it as text if provided (#rrggbb form from BColorControl).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25388 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-09 01:15:25 +00:00
François Revol
80f6938b34 - MakeMenu() now adds a separator for empty strings.
- add pref names for ANSI colors, for later...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25387 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-08 23:07:52 +00:00
François Revol
f8a741bcba Sorry but I still need to test Terminal in BeOS to debug it... allstuff is #if(n)defed on __HAIKU__ for clarity.
To be removed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25386 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-08 22:30:39 +00:00
Ingo Weinhold
965aa03f49 Changed all error codes from enum values to macros. This allows for
compile time checks. Incidently those are not totally uncommon in
portable code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25385 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-08 20:54:14 +00:00
Ingo Weinhold
173dd626bf Cast B_OK to (uint32) to solve an overloading ambiguity (I don't agree
with the compiler, though :-)), I'm about to introduce.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25384 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-08 20:50:17 +00:00
Axel Dörfler
b9c7ba4bba * Rewrote how the dynamic drivers are registered, and made it a bit more
flexible; now, a driver type can result in any number of paths to probe.
* Also, the "bus" modules (busses/bus_managers) are now always probed - that's
  only a temporary solution and should be restricted to certain driver types
  later.
* Added a userland buildable version of KPath.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25383 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-08 16:48:14 +00:00
Axel Dörfler
56bbbbc9ca * Added Adopt() method that steals the other path's buffer.
* Fixed operator=(): the second argument of SetTo() is a boolean (normalize),
  not the length of the buffer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25382 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-08 16:45:29 +00:00
Axel Dörfler
b1429e2a05 Added a StackDeleter class that also empties the stack and deletes the items.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25381 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-08 16:43:59 +00:00
Axel Dörfler
9623534399 Now uses mutexes instead of benaphores, that also simplified object
instantiation at early boot a bit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25380 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-08 16:06:51 +00:00
Axel Dörfler
06b580d76f Replaced the sAvailableMemoryLock benaphore with a mutex.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25379 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-08 15:57:59 +00:00
Axel Dörfler
adf376c941 Replaced benaphores with mutexes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25378 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-08 15:52:27 +00:00
Axel Dörfler
3bdd7f38f1 Fixed the libkernelland_emu.so build that Ingo broke so deliberately.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25377 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-08 15:09:57 +00:00
Axel Dörfler
23a60f423e Reordered includes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25376 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-08 15:08:30 +00:00
Axel Dörfler
02a3b9ef49 * kernel_daemon is now a C++ file, and uses DoublyLinkedList instead of
the C list mechanism which also makes the code nicer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25375 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-08 15:08:14 +00:00
Ingo Weinhold
f23d0a6242 Implement shm_open() and shm_unlink(). The shared memory objects are
simply created as files in /boot/var/shared_memory/. The Bootscript
clears the directory.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25374 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-08 13:42:33 +00:00
Jérôme Duval
cf1c322756 use find_directory() instead of /boot/home/
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25373 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-08 13:10:09 +00:00
François Revol
8e3f5e8959 Make the BString& version of SetTo() behave like BeOS, that length < 0 is means "until the end". This makes CopyInto() acting alike too. Note the char * version crashes in BeOS, instead we act like the other version for consistency.
There are many other calls that crash in BeOS when called with invalid args, should we attempt to sanitize them or call debugger() instead ?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25372 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-08 12:56:55 +00:00
François Revol
0fbe0299d3 BPicture is obviously not text data, should be image/ supertype!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25371 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-08 12:35:41 +00:00
Stefano Ceccherini
fd59bc3703 Added a BDragger so that Terminal is replicanteable. Salvatore, hope you
like it :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25370 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-08 12:07:41 +00:00
Jérôme Duval
0895d46fdd added a TODO about user fonts in safe mode
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25369 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-08 11:43:00 +00:00
Jérôme Duval
872556daeb Patch from Kaoutsis: use find_directory() instead of hard coded paths
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25368 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-08 11:28:42 +00:00
Jérôme Duval
52eaadd811 added a sounds directory in beos/etc
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25367 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-08 11:17:09 +00:00
Jérôme Duval
31442c74a4 Patch from Kaoutsis: use find_directory() instead of a fixed path
added some checks, keep the style clean


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25366 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-08 11:12:01 +00:00
Stefano Ceccherini
52def890da When opening a new tab, select it automatically, as described in ticket
#2176.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25365 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-08 10:28:52 +00:00