Commit Graph

25009 Commits

Author SHA1 Message Date
Oliver Ruiz Dorantes
43c93ca367 Fix EOL
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26234 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-02 21:26:41 +00:00
Oliver Ruiz Dorantes
d51d2501bf Fix EOL
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26233 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-02 21:18:43 +00:00
Oliver Ruiz Dorantes
75c310bc5b Fix EOL
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26232 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-02 21:12:07 +00:00
Oliver Ruiz Dorantes
ade530ec1d Fix EOL
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26231 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-02 21:10:24 +00:00
Oliver Ruiz Dorantes
5d7bf42195 Fix EOL
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26230 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-02 21:09:04 +00:00
Oliver Ruiz Dorantes
848c65ab3e Fix EOL
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26229 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-02 20:59:57 +00:00
Oliver Ruiz Dorantes
c8bc2d8897 Fix EOL
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26228 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-02 20:01:02 +00:00
Oliver Ruiz Dorantes
9bfe62f9aa Cleapups, Fix memory leaks,
Patch by Mika Lindqvist. Could we give give him Commit access? 
I am getting daily patches from him with fixes and new features.
 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26227 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-02 19:41:45 +00:00
Jérôme Duval
765ae3a785 Applied patch from Mika Lindqvist: This patch implements both strlwr() and strupr() functions in libroot and includes strupr() in kernel build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26226 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-02 19:30:46 +00:00
Jérôme Duval
72401b8f9e PAGE_SIZE is defined in Haiku limits.h
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26225 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-02 19:13:13 +00:00
Oliver Ruiz Dorantes
b94e17518b Implement RemoteDevice contructor by String
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26224 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-02 18:28:00 +00:00
Stephan Aßmus
22e2241763 * Fixed a race condition where the interrupt for a command happened before
the thread issuing the command called acquire_sem_etc() on the semaphore
  that the interrupt handler would otherwise release. The semaphore is now
  released unconditionally, but to prevent the race condition that the
  B_RELEASE_IF_WAITING_ONLY was trying to avoid, it is released with the
  spinlock held.
* The error interrupt handler did not reset the fCommandsActive flag, but
  it seemed to us like it should do that.
* WaitForTransfer now also acquires the spinlock to reset fCommandsActive,
  which may be unnecessary but does not harm either.
* Cleanup of some long lines, sorry for mixing that with the actual fix.

Fixes bug #2359 (long pauses when accessing the disk).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26223 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-02 15:37:35 +00:00
Axel Dörfler
119b7dccf0 Patch by David Powell:
* Turn off text cursor when switching to text mode.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26222 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-02 15:04:10 +00:00
Michael Lotz
321ee820ea * Fix the broken size/alignment computations for area allocations by replacing
them with the ROUNDUP macro that was specifically made for this task so that
  too tired developers do not mess up the calculations...
* Don't use area allocation during kernel startup (not that it really happened).
* Minor simplification of similar calculations in heap_attach().

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26221 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-02 13:00:13 +00:00
Michael Lotz
84c54473eb Added grow request tracking again. In case an allocation fails due to lack of
contiguous pages, it will request growing even if there are still more than
10% free pages available. Previously that case was not handled anymore and the
allocation would have just failed. Note that this is a pretty rare case, as
there are no "large" allocations happening in either the small or large heap
classes, but only in the huge one for allocations between 128KB and 1MB.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26220 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-02 11:42:35 +00:00
Stephan Aßmus
96a152f90d Applied patch by Urias McCullough:
Fixed Big Endian build of ReiserFS.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26219 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-02 11:20:47 +00:00
Axel Dörfler
bac6cc8ad7 * Fixed a few problems reported by Marcus - thanks for proofreading!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26218 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-02 10:38:27 +00:00
Axel Dörfler
3b83493b10 * Cast block before shifting, as suggested by Marcus; it shouldn't have any
actual consequences but looks more correct.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26217 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-02 10:33:38 +00:00
Michael Lotz
883f9063ef Implement transparent allocation by area for huge allocations (> 1MB). This
does in fact happen, as there are objects used in the kernel that allocate
with new, which in turn uses the heap. The OpenHashTable used from the slab
allocator hit this case during an svn checkout here, because it grows it's new
allocated list by doubling the list size. Added some unconditional debug
output for those cases to monitor the usage for now. All of that not yet really
tested though.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26216 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-02 10:29:02 +00:00
Michael Lotz
7431b5241e Fix subtle logic error that would always cause a needless large allocation if an alignment was given.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26215 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-02 09:50:58 +00:00
Axel Dörfler
b7cb8f8c30 * Seems like GCC4 does not like declaring structures inside unnamed unions;
that looks like a compiler bug to me, though.
* Pulled struct data_stream out of the union (now called ext2_data_stream),
  based on a patch by Maurice, thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26214 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-02 09:43:12 +00:00
Axel Dörfler
13de3d0767 * Fixed wrong group block offset computation: the
ext2_super_block::first_data_block must be used; the superblock offset
  doesn't matter if the block size is greater than 2KB.
* Fixed block access beyond the 4GB limit - we need to cast the block to
  a 64 bit type in ext2_get_file_map() before shifting it.
* Tested with various larger ext3 disks, and everything seems to work fine.
* Added some optional debug output.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26213 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-02 09:15:04 +00:00
Michael Lotz
0aad734230 The simple alignment trick used before doesn't work with the new heap classes
(it didn't really work previously anyway). The only alignment really used seems
to be B_PAGE_SIZE, which happened to always work out before, because anything
larger would have been allocated using individual pages anyway. Since larger
bins are now available and with kernel heap leak checking enabled an allocation
of B_PAGE_SIZE with B_PAGE_SIZE alignment is actually a bit bigger than
B_PAGE_SIZE, it got into the 5KB bin, which didn't guarantee the alignment
anymore. This would have caused a tripple fault on boot when kernel heap leak
checking was enabled. The alignment is now taken into account when picking
the bin for the allocation. Added a more detailed TODO as to why this isn't
the best thing (wastes space) and how it could be changed if deemed necessary.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26212 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-02 00:59:32 +00:00
Stephan Aßmus
396f6e29ee bonefish+stippi:
Implemented the needed fs API hooks to support identifying partitions 
(so ReiserFS partitions appear in the Tracker Mount menu now).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26211 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-01 23:54:08 +00:00
Michael Lotz
b1f4df4a62 Implement heap classes that each have their own range of allocation sizes they
serve, bin sizes and page size. This minimizes the amount of "large"
allocations made in heaps that don't have a bin for the allocation size
(combining multiple pages). This is desirable as such large allocations
are generally pretty inefficient, and also because it separates larger from
smaller allocations better, making the chance of a heap becoming empty higher.
For now there are three heap classes "small", "large" and "huge", with a
predefined set of bin sizes for each. This might need some finetuning later on.
Reduce the grow size to 4MB though as the allocations should now be spread
across heap classes which each grow on their own.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26210 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-01 23:19:35 +00:00
Stephan Aßmus
e8679dcdc7 Merge Ingo's reiserfs changes which he accidentally commited to his branch: Adopted reiserfs add-on to the new fs API and added it to the image.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26209 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-01 22:46:54 +00:00
Marcus Overhagen
d7c321236f Set transfer length when doing ATAPI transfers.
Dump ATAPI command packet on error.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26205 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-01 22:04:33 +00:00
Jérôme Duval
af206cf2d6 gcc4 build fix
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26204 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-01 20:56:23 +00:00
Michael Lotz
8c57aefdf8 Remove the B_PAGE_SIZE page size and replace it by a heap->page_size. This
allows for dynamic (heap)page sizes. It's currently just set to B_PAGE_SIZE
but I'm expermienting with the creation of differently sized heaps that could
use dynamic page sizes with that.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26203 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-01 20:44:43 +00:00
Oliver Ruiz Dorantes
b42c202a65 Fix typos reported by Mika, and remove whitespaces
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26202 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-01 20:28:12 +00:00
Oliver Ruiz Dorantes
d0651ae6ac Add entity to handle the available LocalDevices from KL
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26201 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-01 20:25:08 +00:00
Michael Lotz
86a38aedf4 Take a shortcut when freeing in heap_realloc(), we already know the address belongs to our heap.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26200 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-01 20:18:02 +00:00
Oliver Ruiz Dorantes
291e114333 Fix EOL
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26199 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-01 19:43:37 +00:00
Oliver Ruiz Dorantes
480cccf67b Fix a serious TODO,
Report the index where the event opcode pair has been found.
Currently server was expecting them to be the first entry of the request 



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26198 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-01 19:35:10 +00:00
Michael Lotz
5c5b7a5760 While the comment was correct with regards to collecting the semaphore after
the cancel, it wasn't actually done. This could bring a device out of sync in
the case timeouts actually happened (which shouldn't be a commen case).
Fixed that and increased the timeout to 2 seconds in favor of slower devices.
Might need some fine tuning later still.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26197 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-01 19:21:59 +00:00
Oliver Ruiz Dorantes
18dbcd22a0 Handle the command status sent before the arrival of a remote name request.
Avoid unhandled event in the bluetooth_server
	by Mika Lindqvist
  


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26196 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-01 19:15:15 +00:00
Oliver Ruiz Dorantes
ab563fc0a5 Fix mail in header
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26195 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-01 19:00:39 +00:00
Rene Gollent
78163ba34d That should've been eol-style :/
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26194 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-01 17:31:11 +00:00
Rene Gollent
452d5f989a Set svn:eol property to native to deal with CR/LF problems.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26193 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-01 17:27:24 +00:00
Stephan Aßmus
f592fcef43 stippi + bonefish:
Fixed race conditions when a ServerApp or ServerWindow is created. The 
reply to the client that the object has been created successfully was 
sent in the thread creating it. Preempted at the wrong time (right after 
writing the message to the port) could lead to the object's thread using 
the link at the same time, which would screw up all subsequent 
communication via that link.
This fixes the problem that mimeset would sometimes fail when building 
Haiku in Haiku (can't find the ticket). It probably also fixes #2331, 
and the bug that sometimes when a window is opened (Terminal, crash 
alert, shutdown window, etc.) it would come up with huge width/height 
and tiny other dimension (can't find the ticket).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26192 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-01 15:47:56 +00:00
Axel Dörfler
0c48c43777 * Fixed the bfs_write() error code for directories as suggested by Jerome.
* Removed a few superfluous checks.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26191 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-01 11:42:51 +00:00
Axel Dörfler
25f758586b * Added ext2 file system to the image.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26190 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-01 11:28:48 +00:00
Axel Dörfler
6450897685 * Fixed a pretty dumb copy&paste error that prevented (/double/triple) indirect
blocks from working.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26189 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-01 11:24:48 +00:00
Axel Dörfler
0680840ad1 * Added support for files larger than 4GB - not yet tested, though.
* The stat::st_nlink value is now correctly reported.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26188 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-01 10:39:39 +00:00
Axel Dörfler
63db34c816 * Implemented a read-only ext2 file system.
* It's not yet complete, doesn't support some ext2 stuff (like files over 4 GB),
  and might have some other bugs (I only tested it with a single 20 MB ext2
  image).
* To have a read/write ext2 file system, it would probably make more sense to
  port GNU sources (like ext2fs lib), and use that. But a small read-only ext2
  file sytem doesn't hurt, I think, and I don't know if ext2fs lib would be
  feasible for kernel use (porting the file system from Linux directly would
  also be an alternative, but probably more work).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26187 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-01 10:12:19 +00:00
Jérôme Duval
fdf3fa9fe1 read() expects B_IS_A_DIRECTORY on directories that can't be read.
This fixes grep misbehavior with directories.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26186 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-30 23:06:41 +00:00
Philippe Houdoin
774e87aac9 Removed mention of Haiku, a generic "system" sounds both better and distro name independent.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26185 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-30 22:35:01 +00:00
Philippe Houdoin
eb0a51d2f2 Applied patch by David Powell: fix missing and existing bootloader options menu items help texts.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26184 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-30 22:25:19 +00:00
Oliver Ruiz Dorantes
5e53139393 Make the BWindows die in a proper way as suggested by mmu & stippi
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26183 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-30 22:16:23 +00:00
Oliver Ruiz Dorantes
51ac4f530a Patch by Mika Lindqvist
FromString Implementation for the bdaddr utils class 



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26182 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-30 21:43:21 +00:00