Commit Graph

2079 Commits

Author SHA1 Message Date
Axel Dörfler
2c49465329 * Removed the at_kbd_io and AT keyboard stuff; this is now done within the PS/2
driver, and that driver is using the raw_key_info structure as well.
* Renamed kb_mouse_driver.h to keyboard_mouse_driver.h.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36267 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-14 19:19:14 +00:00
Axel Dörfler
b26f67513b * Added a test application that show that BFS does not care to fill the space
between the former end of the file and the position of a write with zeros
  as required.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36262 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-14 14:30:34 +00:00
Axel Dörfler
467ce4205b * consoled no longer talks to its own keyboard driver, but uses the new debugger
feature of the usual keyboard drivers (it currently only uses the first one
  always, though, instead of all of them).
* Also, it now loads your current keymap from disk, so you don't need to adapt
  to a different keymap anymore. However, right now, it does not have a built-in
  keymap, so this won't work if there is no Key_map file. This will be done 
  later with some more cleanup.
* It now prints error messages to the syslog/serial as well over debug_printf().
* Removed the BeOS R5 input server mode support.
* Some more cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36260 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-14 12:56:57 +00:00
Jérôme Duval
29fb2094bd added bsd lib tests to the build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36202 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-12 20:57:20 +00:00
Oliver Tappe
56f097ebd9 Applying patch by Atis Elsts:
* fix connecting to INADDR_ANY work for tcp (effectively will
  connect to INADDR_LOOPBACK)
* add same behaviour to udp
* move some ipv4-specific code out of tcp into ipv4 address module
* bind() and connect() now reject addresses from non-matching 
  families
* myself: minor cleanup in udp.cpp with respect to 80 chars limit
Closes #5716 - many thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36192 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-12 18:39:34 +00:00
Jérôme Duval
1590c69933 * added forkpty() and login_tty() to bsd compatibility, a test for forkpty().
* added a TODO questioning the closing master and slave in openpty() when applying window size fails.
* added TIOCSCTTY as a TTY ioctl code, the caller become controlling TTY. Review comments are welcome.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36105 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-10 13:48:28 +00:00
Michael Lotz
ba51713c8f Fix gcc4 build of uhci_decode.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36104 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-10 13:05:43 +00:00
Ingo Weinhold
e99d1fd16f * Fixed more incorrect occurrences of the pid_t == int assumption.
* Automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36090 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-08 17:32:09 +00:00
Ingo Weinhold
d7754ff079 * More generous buffer sizes for the semaphore and shared memory object names.
* The result shared memory was mapped PROT_WRITE only, but since the variable in
  it is used with the increment operator, it needs PROT_READ, too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36089 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-08 17:15:49 +00:00
Ingo Weinhold
aea8795346 Be more generous with the semaphore name array size. Large enough PIDs would
lead to overwriting its bounds.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36084 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-08 15:34:12 +00:00
Ingo Weinhold
b4ab2a2c37 Fixed incorrect assumption that pid_t is int.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36071 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-07 18:32:47 +00:00
Ingo Weinhold
57ebe59dfd SEM_VALUE_MAX is not POSIX. Use sysconf(_SC_SEM_VALUE_MAX) instead.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36070 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-07 18:30:57 +00:00
Ingo Weinhold
e327fa52fe Missing return value.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36069 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-07 18:29:25 +00:00
Ingo Weinhold
dff3f62071 pthread_exit() cannot return, but the "noreturn" attribute is really a compiler
feature (which we haven't set yet). So return some dummy value.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36068 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-07 18:27:34 +00:00
Ingo Weinhold
814f5ae159 SEM_VALUE_MAX is not POSIX. Use sysconf(_SC_SEM_VALUE_MAX) instead.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36067 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-07 18:24:13 +00:00
Ingo Weinhold
8e69b283a4 PTHREAD_ONCE_INIT only needs to be a valid initializer.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36066 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-07 18:18:11 +00:00
Ingo Weinhold
72d74075da Prevent unused variable errors in case CLOCK_REALTIME is not defined.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36065 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-07 18:16:12 +00:00
Ingo Weinhold
a06cec2fdf <features.h> is not POSIX.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36064 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-07 18:14:34 +00:00
Ingo Weinhold
b22623ba6a Prevent clashes with non-POSIX macros that are (or were?) still part of some
standard and are defined in our headers.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36063 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-07 18:13:49 +00:00
Ingo Weinhold
d888ea5d13 Fixed out of bounds array access.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36051 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-06 18:44:58 +00:00
Ingo Weinhold
2b76954997 Removed tests that tested undefined behavior:
* Calling pthread_{join,detach}() on non-joinable threads.
* Calling mutexattr_setpshared() on uninitialized object.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36050 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-06 18:44:18 +00:00
Ingo Weinhold
3b589a0fb7 Enable the mapping to positive POSIX error codes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36043 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-05 19:21:50 +00:00
Ingo Weinhold
4142e99f09 Copied Open POSIX Test Suite 1.5.2 to the trunk.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36040 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-05 13:10:28 +00:00
Ingo Weinhold
93de3bca5f Removed partial (unknown version) Open POSIX Test Suite from the build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36039 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-05 13:09:20 +00:00
François Revol
f3abd9ad73 Fix build.
Add test for ioctl(FIONREAD). Doesn't work much yet though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35990 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-28 19:17:30 +00:00
Stefano Ceccherini
96d7f22d56 Reverting this, since BMessage doesn't crash anymore.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35912 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-19 12:26:14 +00:00
Stefano Ceccherini
05525b50d0 Commented out BMessage::PrintToStream() calls which crash (worked before).
The tests shows that Drawing shapes within BPicture is broken.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35909 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-19 07:53:30 +00:00
Stephan Aßmus
76ab3f88df Basically, this changeset implements BShape::ArcTo(). In more detail:
* Added BShape::ArcTo() and BShapeIterator::IterateArcTo(), using a previously
   unused virtual slot. (Added the symbols for binary compatibility for GCC2
   and GCC4.)
 * Added operator=(), operator==() and operator!=() to BShape.
 * Added BShape::BezierTo() version taking three points, which is sometimes
   more convenient.
 * Added the four new shape data ops OP_LARGE_ARC_TO_CW, OP_LARGE_ARC_TO_CCW,
   OP_SMALL_ARC_TO_CW and OP_SMALL_ARC_TO_CCW. For a single arc, provided the
   radius is large enough, there are four possibilities to draw the arc, these
   are controlled by the two boolean flags to ArcTo() and mapped to the new
   commands accordingly.
 * Some style cleanup in Shape.cpp (sorry for mixing it up, but it gets
   worse below...)
 * Added ShapeTest to src/tests/servers/app.
 * Changed the way BShapes are transformed from view to screen space in the
   app_server. For arcs, it would be nontrivial to apply a proper transformation,
   it's much easier to let AGG take care of it. This affects ServerPicture as
   well.
 * Wrapped iterating the BShape into try/catch blocks in ShapeIterator. But
   I really don't understand the purpose of the class in the first place.
   Maybe it can now be dropped, since coordinates don't have to be transformed
   in place anymore.
 * Refactored copy&paste shape iteration code in Painter. The transformation
   to screen space happens there.
 * Since RemoteDrawingEngine needed to be adopted anyway, I also updated
   it for the new DrawString() with offsets version. But the client still needs
   to be adapted.
 * Style cleanup in Painter.h


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35905 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-18 16:58:19 +00:00
Philippe Houdoin
24957bd499 Fixed last places where resolv.conf was still expected under /etc, UserGuide included. Fixed authentication misspelling
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35898 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-18 08:48:13 +00:00
Stephan Aßmus
a9daf3d911 Improved the DrawString() method that takes offsets per glyph by making the
client provide the array size. Added version that doesn't take a string length
for convenience.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35866 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-15 15:08:07 +00:00
Stephan Aßmus
77e5acc0d9 * Extended the BView drawing API by a DrawString() version that takes an array
of locations, one for each glyph.
 * Added a test for the new functionality.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35865 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-15 13:59:14 +00:00
Ingo Weinhold
5cf6995685 The usual cleanup after Axel. ;-) Define vm_page_num_pages() which is now
used by the block cache.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35745 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-03 21:02:34 +00:00
Ingo Weinhold
27f78bf522 Fixed build after signature change in r35601.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35607 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-24 18:54:59 +00:00
Axel Dörfler
75e7a5adae * Added simple test application to be able to see node monitoring messages
in order to reproduce bug #5405.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35526 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-19 21:35:46 +00:00
Adrien Destugues
33eead339b * Improve the test for TimeFormat (style and error checking)
* Fix the TimeFormat API, there was a double free. Make it work as expected : you send it a number of seconds and it will format it properly in days, hours, minutes, seconds with proper plural.
 * Cleanup other parts of the Format API from useless things. They may get reintroduced later if we feel the need to do so.
 * AboutSystem now use TimeFormat to display the uptime in properly localized way.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35506 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-17 15:35:28 +00:00
Adrien Destugues
b2c385c072 -Added new TimeFormat API for formatting and localizing a time (uptime, copy duration, ...)
-Added a very simple test that shows the API is corrupting memory and ends up crashing
-Fixed build of other locale tests


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35503 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-17 00:02:50 +00:00
Axel Dörfler
15fd71bfff * Fixed artwork directory.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35462 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-14 22:29:29 +00:00
Michael Lotz
b07ef504a0 Add a memalign test that checks for valid alignments and fills/verifies
allocated buffers to validate that the full allocated size is actually usable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35425 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-07 02:11:31 +00:00
Michael Lotz
e33d4e74c2 Update the test to cover a wider width range now that truncating doesn't crash
anymore. Also make that test string a bit more complicated.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35386 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-01 22:03:11 +00:00
Michael Lotz
8806dfd057 Adding test that shows that B_TRUNCATE_BEGINNING mode is essentially broken.
Worse yet for a small enough length it actually crashes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35379 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-01 13:39:06 +00:00
Michael Lotz
82471975d5 Adding a simple test app for the utf-8 aware BString functions. I didn't feel
like writing a full blown unittest though, sorry...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35372 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-01 04:26:05 +00:00
Ingo Weinhold
b6620ccc71 Make the {memalign,free}_etc() available in the kernel emulation.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35321 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-27 19:04:46 +00:00
Ingo Weinhold
86c794e5c1 slab allocator:
* Implemented a more elaborated raw memory allocation backend (MemoryManager).
  We allocate 8 MB areas whose pages we allocate and map when needed. An area is
  divided into equally-sized chunks which form the basic units of allocation. We
  have areas with three possible chunk sizes (small, medium, large), which is
  basically what the ObjectCache implementations were using anyway.
* Added "uint32 flags" parameter to several of the slab allocator's object
  cache and object depot functions. E.g. object_depot_store() potentially wants
  to allocate memory for a magazine. But also in pure freeing functions it
  might eventually become useful to have those flags, since they could end up
  deleting an area, which might not be allowable in all situations. We should
  introduce specific flags to indicate that.
* Reworked the block allocator. Since the MemoryManager allocates block-aligned
  areas, maintains a hash table for lookup, and maps chunks to object caches,
  we can quickly find out which object cache a to be freed allocation belongs
  to and thus don't need the boundary tags anymore.
* Reworked the slab boot strap process. We allocate from the initial area only
  when really necessary, i.e. when the object cache for the respective
  allocation size has not been created yet. A single page is thus sufficient.

other:
* vm_allocate_early(): Added boolean "blockAlign" parameter. If true, the
  semantics is the same as for B_ANY_KERNEL_BLOCK_ADDRESS.
* Use an object cache for page mappings. This significantly reduces the
  contention on the heap bin locks.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35232 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-21 23:10:52 +00:00
Ingo Weinhold
70742459f5 Fixed build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35176 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-19 19:38:09 +00:00
Axel Dörfler
29ddbdbb53 * Moved the "var" directory to /boot/common/.
* Moved the "tmp" directory out of /var, and to /boot/common/cache/.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35104 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-16 17:17:07 +00:00
Stephan Aßmus
9563f44bfd Patch by Humdinger:
Changed strings to sentence case in various places. This is the
case-misc.diff part of ticket #5169.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35043 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-13 10:49:58 +00:00
Stephan Aßmus
ecc1234fbe Apparently some GCC 4 fixes...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35027 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-12 20:18:50 +00:00
Oliver Tappe
15c0996174 * added small test program done by Axel (and slightly changed by myself) that
exposes a problem in our UDP-connect implementation: the local address is 
  not set as a side-effect of connecting to a specific destination.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34987 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-10 15:03:12 +00:00
Michael Lotz
14429e896e Reverted the part of r31520 that made devfs_unpublish_partition() take a raw
device path + child partition name. When a "raw" device is unpublished the node
removal notification triggers the partition and child partitions to be
unpublished/removed. Since in that case the "raw" node is already unpublished
trying to resolve it in devfs_unpublish_partition() again to unpublish the child
partitions would fail, leaving the child partition nodes behind. When a new raw
device would then become available publishing its partitions would fail because
of these left behind nodes, causing bug #4587. Seeing that this code is more
compact and straight forward anyway I don't quite see why it was changed in the
first place.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34967 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-09 03:55:38 +00:00
Ingo Weinhold
c4f9831292 Added new mutex_switch_from_read_lock() for unlocking a read lock and
starting to lock a mutex in an atomic operation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34935 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-07 15:31:29 +00:00