Commit Graph

340 Commits

Author SHA1 Message Date
Ingo Weinhold
e5e5ddc13a ep_scan_partition(): Removed erroneous check for cookie (it's unused here), and fixed child index counting.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3511 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-14 00:12:12 +00:00
Ingo Weinhold
852d12ef4c Ported the intel partitioning system module to the new interface
(disk device manager) and moved it to a nicer place.
First tests look good, though my hard disk structure doesn't even
have extended partitions. Going to install Linux now...


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3504 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-13 22:01:51 +00:00
Philippe Houdoin
dbafe172c0 Import, on behalf of Niels Reedijk (SF ID: nielx), his RTL8139 network cards driver.
Add a Jamfile to build it (thanks to Axel's sis900 jamfile).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3487 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-12 23:39:38 +00:00
Axel Dörfler
c59538b901 Some cleanups, courtesy of Jack Burton.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3449 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-08 18:37:42 +00:00
Axel Dörfler
8ea8d0c2bb Fixed queries a bit more (maybe even completely...). In several situations,
the old attribute value wasn't evaluated at all.
Also, Index::Update() got a type code of zero, instead of the real value
in situations where this didn't make any sense.
Minor cleanup in kernel_interface.cpp.
New method Volume::CheckForLiveQuery() that checks if there is a live query
depending on the specified attribute - not yet implemented, but already used;
always returns "true" right now, which doesn't cause any harm but reducing
the speed lightly.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3394 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-01 02:55:33 +00:00
Axel Dörfler
cca15c0166 Added a little more debug output in BPlusTree::Find().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3393 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-01 02:49:38 +00:00
Axel Dörfler
c3f10b4674 Added a simple magic field mechanism to make chkbfs calls a little more safe.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3381 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-29 01:02:18 +00:00
Axel Dörfler
f2024b1158 Fixed debug output in bfs_setflags().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3379 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-28 23:12:18 +00:00
Tyler Dauwalder
e4edcddbc5 Fixed nothrow declaration and definition to what I think should
be the proper values.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3368 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-28 07:35:04 +00:00
Axel Dörfler
a9aa5ee181 Implemented bfs_setflags().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3367 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-28 01:56:24 +00:00
Axel Dörfler
a13beecdee Removed the possibility to create a Semaphore object without specifying
a name - that's mostly done to:
1) force better fitting lock names
2) make the API consistent (the empty ReadWriteLock constructor doesn't
   initialize the lock anymore).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3366 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-28 01:34:18 +00:00
Axel Dörfler
20c74d7d25 Fixed reordering of initializer warning - should compile the fs_shell with
-Wall enabled...


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3365 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-28 01:32:40 +00:00
Axel Dörfler
ae58716024 Fixed another bad bug caused by calling get_vnode() on a node currently
being constructed: bfs_read_node() created an Inode object independent from
the one set in new_vnode().
As a work-around (the new VFS layer will introduce some better methods here)
we are now using the bfs_inode.etc field as a pointer to our object - just
like BFS has thought to use this field. If bfs_read_vnode() has to wait for
the inode (because it is being constructed), it will use the "etc" pointer
and don't create it's own Inode object.
Almost all changes made change the API to take this case into account:
- new Inode constructor to be able to be created from a CachedBlock
- CachedBlock now has a Keep() method which suppresses the release_block()
  call when the object is destructed.
- a CachedBlock can now be constructed from the contents of another one (by
  calling the source's Keep() method).
- Inode::InitCheck() no longer checks the integrity of the bfs_inode - this
  is now done by bfs_inode::InitCheck() which is optionally called by the
  former (default).
- moved the inline CachedBlock methods out of the class definition (was
  too crowded to be readable).
- new Inode::Initialize() which is called by all Inode constructors
- an Inode object now sets a better name for its read/write lock.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3364 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-28 01:27:27 +00:00
Axel Dörfler
1d9fd63d3a The ReadWriteLock class now has an Initialize() method to initialize the
object after creation. This enables the Inode constructor to set a better
name for the lock.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3363 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-28 01:12:38 +00:00
Axel Dörfler
24d6529a93 Journal::LogBlocks() now calls cache_write() if the block is already in the
log entry - this is only necessary if the buffer is not the one of the
CachedBlock object.
Journal::TransactionDone() now properly aborts transactions if possible,
instead of just writing them to disk (does only work if the log entry
was not used by other transactions already).
Added a comment about how to speed up writing the log entries a bit more
(though it's not so easy to do, and might not be much faster).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3362 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-28 01:10:22 +00:00
Tyler Dauwalder
968997db5f new(nothrow) is desired by SLList. My definition of nothrow is
a bit sketchy here, but will work for now until I figure out the
proper way to do it.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3359 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-27 08:25:15 +00:00
Tyler Dauwalder
c6b0bb0480 Missed a #include <stdio.h>
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3358 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-27 08:23:59 +00:00
Tyler Dauwalder
9b6661b079 Added PartitionMap.cpp to the build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3357 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-27 08:10:56 +00:00
Tyler Dauwalder
0d383564c3 - Added beginnings of volume descriptor sequence walking code.
- Accounted for addition of "udf_" to beginning of on-disk structs.
- Accounted for Block<typename> to MemoryChunk change


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3356 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-27 08:06:43 +00:00
Tyler Dauwalder
81d91d069a Added DUMP() and PDUMP() macros.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3355 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-27 08:04:28 +00:00
Tyler Dauwalder
56f47960a3 - Prepended each struct name with "udf_" to clarify which structs are actually
on-disk data structures.
- More endian-neutrality conversions
- More dump() functions


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3354 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-27 08:03:47 +00:00
Tyler Dauwalder
8a079cf89c Initial checkin. Provides mapping of partition numbers to udf_partition_descriptors.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3353 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-27 08:01:52 +00:00
Tyler Dauwalder
15eec8a161 Single-linked list courtesy Mr. Ingo Weinhold, here temporarily
until we get our kernel C++ utils library up and running.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3352 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-27 08:01:08 +00:00
Tyler Dauwalder
4627317bcd Initial checkin.
Slightly more typesafe static array type than built-in arrays,
with array length information stored implicitly (i.e. consuming no
physical space in the actual struct) via the arrayLength template
parameter.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3351 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-27 07:58:08 +00:00
Tyler Dauwalder
4873cabb06 Renamed Block to MemoryChunk, and got rid of the template
parameter in lieu of using reinterpret_cast, which turns out to
be cleaner all in all.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3350 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-27 07:57:02 +00:00
Axel Dörfler
a476bfc5b1 Now waits for a whole second on the inode to become unbusy - just in case
there is a slow drive. Note, if the system is heavily used and the thread
waiting for the inode to become unbusy is a real time thread, that time
might be not enough - don't have a better solution at hand though (other
than waiting even longer).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3346 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-26 22:40:14 +00:00
Axel Dörfler
3cfd8472f9 Fixed the ominous "new_vnode() already exists with different cookie" bug,
thanks to Bruno for pointing me in the right direction (that has probably cost
him several hours of his life ;-))!
Yes, it was that complicated to fix it...


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3345 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-26 22:36:23 +00:00
Axel Dörfler
470a60786e Updated the ToDo list; thanks to Ingo I know now a little bit more about
float/double queries :-)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3332 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-26 01:51:19 +00:00
Axel Dörfler
6ac535c5c5 Fixed another bad bug in the block allocator: the size of the last block
of the block bitmap could be computed wrong - this could cause all sorts
of errors like: overwriting data, creating the "new_vnode with different
cookie" problem, etc.
Should really be the last bug in that piece of code ;-P


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3331 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-26 01:50:34 +00:00
Axel Dörfler
e1d37632bb Now takes changed function of Index::Update() into account - queries on
non-indexed attributes now finally work as they should.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3330 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-26 01:47:06 +00:00
Axel Dörfler
ab47860c37 Index::SetTo() now sets fName even if the index initialization failed (for
whatever reason).
Index::Update() is now allowed to be called for those indices - in this case
it will just update all live queries.
Added some comments.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3329 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-26 01:45:09 +00:00
Axel Dörfler
09ed3db89a Some minor style changes/clean ups.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3328 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-26 01:43:14 +00:00
beveloper
acd429ac89 Fixed clock rate calculation (multiple bugs).
Fixed sound stutter after start.
Added generic macros to deal with SIS7012 and Intel differences.
Fixed SIS7012 init (PICB register was written, instead of SR).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3290 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-23 20:44:12 +00:00
Tyler Dauwalder
6b3fa44dd0 Forgot to keep #ifndef DEBUG macros up to date.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3282 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-21 08:29:36 +00:00
Tyler Dauwalder
28f8fb21ea Added NULL class name argument to DEBUG_INIT() calls
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3281 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-21 07:10:25 +00:00
Tyler Dauwalder
565457fd43 Added code to search out anchor volume pointers and dump out any
volume descriptor sequences found.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3280 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-21 07:09:50 +00:00
Tyler Dauwalder
6cbf5bf379 - Added option to include class name with DEBUG_INIT() to so it's clearer which
dump() or init_check() or what have you function is printing out debug info.
- Added DUMP_INIT() for dump() functions
- Added tabCount option for class DebugHelper.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3279 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-21 07:08:31 +00:00
Tyler Dauwalder
fbdfed8191 - Fixed union/struct bitfield tricks so they should actually work as desired now
- Started the mind numbing task of making all the disk structs endian-neutral
- Started the addition of dump() functions
- Updated descriptor_tag::init_check() to treat the location() field as a disk
  block instead of an absolute address.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3278 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-21 07:03:18 +00:00
beveloper
3b3c3547a5 Updated jamfiles to match recent cvs changes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3249 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-16 23:31:38 +00:00
beveloper
6fc1b5bacd Fix sample rate calculation based on the AC-link clock rate.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3248 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-15 19:20:14 +00:00
Tyler Dauwalder
f896590804 Added DEBUG_INIT() categories.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3241 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-14 05:42:29 +00:00
Tyler Dauwalder
778d70ca00 - Added category support
- Moved doxs from header to cpp file


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3240 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-14 05:18:41 +00:00
Tyler Dauwalder
fd67013594 Apparently I'm not allowed to link kernel modules to libroot.so... :-)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3239 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-14 05:17:35 +00:00
Axel Dörfler
b263fa5a63 Added Jamfile and fixed all warnings that popped up when compiling with -Wall.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3230 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-12 23:45:57 +00:00
Axel Dörfler
c0f1a43053 Initial revision
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3226 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-12 23:11:21 +00:00
Tyler Dauwalder
be45fb85b6 Revamped debugging macros:
- Updated macro formatting to be more readable
- Changed semantics to be more to my liking
- Added neat-o automatic call-stack indenting
- Added more detailed macro docs


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3225 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-12 21:45:41 +00:00
Tyler Dauwalder
a44384b038 Hadn't intended to lose a step of revision history along
with the rename from Debug.{h,cpp}. This is what the
first revision of UdfDebug.{h,cpp} should have looked
like. The new updated version shall follow in the next
revision.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3224 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-12 21:43:11 +00:00
Tyler Dauwalder
13d4aa9ef9 Debug.cpp => UdfDebug.cpp
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3223 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-12 21:34:25 +00:00
Tyler Dauwalder
ccbc83414f - Started udf_mount() implementation.
- Updated to use revamped debug macros


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3222 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-12 21:33:53 +00:00
Tyler Dauwalder
4ac730182d - Started on volume recognition; volume recognition sequence walking implemented.
- Updated to use revamped debugging macros.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3221 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-12 21:33:03 +00:00