Commit Graph

4592 Commits

Author SHA1 Message Date
beveloper
8a3b6e2cfd fixed warnings
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4662 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 20:44:45 +00:00
Waldemar Kornewald
53a75b6389 Added some extended support for DialOnDemand.
Fixed missing ifnet flags.
PPPStateMachine: replaced nearly all pointers to PPPInterface objects with references.
PPPInterface: added delay to Redial() method (will be used to implement DialRetryDelay, too).
PPPLCP: changed the way Receive() handles LCPExtensions and added code for removing padding from packet.
PPPOptionHandler: added code and only one OptionHandler per code is allowed from now on.
Added some changes to support authenticators.

TODO:
- add DialRetryDelay
- maybe change how StateMachine iterates over OptionHandlers (as they have a code field now)
- commit changes for PFC support and PFC, MRU, and authentication handler


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4661 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 15:27:29 +00:00
Tyler Dauwalder
90685fb799 Per POSIX, now returns B_BAD_VALUE if read position is negative (thanks Axel :-).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4660 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 08:49:12 +00:00
Axel Dörfler
c6c1620a32 Added/changed some test input strings. Removed an unused variable.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4659 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 07:48:39 +00:00
Axel Dörfler
e6889ed1a3 Added the new BFS files BPlusTree.cpp and File.cpp.
Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4658 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 07:40:27 +00:00
Axel Dörfler
e3505b15f4 Fully implemented Directory including directory traversing and file lookup.
Also implemented the new GetNextEntry() method.
Added some more constructors for convenience.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4657 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 07:39:09 +00:00
Axel Dörfler
0cc97dd615 Implemented File::GetName() using Stream::GetName().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4656 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 07:37:22 +00:00
Axel Dörfler
c9fad12dca Added the new BPlusTree.cpp and File.cpp to the build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4655 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 07:36:36 +00:00
Axel Dörfler
8efb3a26d2 Add a simple Node implementation for BFS files (and everything else that
needs access to the stream directly).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4654 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 07:33:42 +00:00
Axel Dörfler
8565a87552 Added some convenience functions, a method to get the node's name, and
a node factory to get the correct type of node (Directory/File).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4653 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 07:32:21 +00:00
Axel Dörfler
a421161e94 Added another ToOffset() convenience method.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4652 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 07:28:53 +00:00
Axel Dörfler
1e7e9b1284 Cut down the original BFS BPlusTree implementation to the bare minimum
required to have read-only, single-threaded access to a B+tree.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4651 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 07:28:12 +00:00
Axel Dörfler
3d2f1723fd Stream::ReadAt()/WriteAt() now return B_BAD_VALUE if the read/write
position was set to a value lower than zero (as Posix demands).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4650 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 07:21:03 +00:00
Axel Dörfler
0774a741c2 The small_data section now makes use of the const keyword :-)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4649 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 07:19:50 +00:00
Axel Dörfler
8d86e5a30d Now prints out all devices found, and shows their root directory.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4648 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 07:17:45 +00:00
Axel Dörfler
1a5a709876 Implemented the new GetNextEntry() method in the root file system.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4647 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 07:16:39 +00:00
Axel Dörfler
1fdfe0c39a Added a new directory traversing method GetNextEntry() that's based on the
entry's name.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4646 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 07:15:32 +00:00
Axel Dörfler
3e64cf641c No longer scans the whole /dev/disk tree, but only the "ide", "scsi", and
"virtual" subtrees in it (no more parallel, ... scanning).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4645 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 07:14:03 +00:00
Axel Dörfler
4e91b25740 Tried to use stat() to get the size of the file, but of course, that don't
work out for devices - still need to fix it.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4644 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 07:12:55 +00:00
Axel Dörfler
3f2188ad1a Partition::AddChild() created its child with the wrong file descriptor; i.e.
it passed partition_data::volume which used to be the correct descriptor
earlier, but is now unused in the boot loader partition support.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4643 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 07:10:45 +00:00
Tyler Dauwalder
c52519cfcd Switched from local cpp.h/cpp.cpp to global kernel_cpp.h/kernel_cpp.cpp
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4642 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 06:38:49 +00:00
Axel Dörfler
184dd21b87 Adds the new Stream.cpp file to the build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4641 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 02:29:33 +00:00
Axel Dörfler
50ab1fac08 Somehow forgot to actually include the Stream class in the last commit...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4640 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 02:29:01 +00:00
Axel Dörfler
aec0abfd56 Add a new Stream class that handles reading bytes from an inode (retrieved
from the BFS Stream.h file) - it supports all data stream ranges (direct,
indirect, & double indirect).
Moved bfs_inode::InitCheck() to the new Stream class.
The Directory class now has a Stream object instead of a bfs_inode directly.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4639 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 02:28:14 +00:00
Axel Dörfler
7df7a4cc01 Added endian-aware getter methods for all internal BFS structures.
Also made all methods implemented in this file endian-aware (lazy as I am,
I left things like "name_size == 0" unchanged, because 0 is a endian-safe
value... [hey, it's even faster that way]).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4638 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 01:24:55 +00:00
Axel Dörfler
c966bfdab7 Started to implement the real BFS module for the boot loader.
Currently, it only recognizes a BFS disk, and will print out its name
(and that code is now endian-aware as well).
More to come, though :-)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4637 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 01:22:40 +00:00
Axel Dörfler
b796791788 Now adds real devices - it scans the /dev/disk tree and adds all files
with the name "raw" - note, this is directly accessing your precious data,
but read-only of course.
Also added the test-file-device as used by the DiskDeviceManagerTest.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4636 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 01:20:07 +00:00
Axel Dörfler
fe281d90df Now has the possibility of opening a file directly, instead of only
accepting already opened files.
Hence, it now also has an InitCheck() method, because opening doesn't
have to succeed.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4635 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 01:18:02 +00:00
Axel Dörfler
fa89d1f6f3 Now exports the calls of the boot loader heap no longer the platform dependent
bindings - we are now using stdlib's malloc()/free() directly instead.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4634 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 01:16:38 +00:00
Axel Dörfler
6b770349d5 Added partitioning and file systems to the build.
Removed the boot loader heap - it now uses standard malloc()/free() in order
to cause less confusion. The boot heap does have its own test app anyway.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4633 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 01:15:13 +00:00
Axel Dörfler
e9117d1507 Put Partition and the new (private) NodeOpener class into the "boot" namespace.
Implemented Partition::Size() and Type() to stat its device.
Partition::ReadAt() and WriteAt() now return B_BAD_VALUE if a position smaller
than zero is provided (as Posix actually states).
Partition::Scan() now provides the partitioning system modules with the correct
file descriptor; it now opens itself (using the NodeOpener class) and no longer
the descriptor of its device directly (resulting in wrong positioning).
Debug output can be turned off now.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4632 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 01:12:53 +00:00
Axel Dörfler
f150614a3b Node::fRefCount is now 1 after creation, so that a following Acquire()/Release()
pair doesn't delete the object anymore (creation is regarded as an Acquire()
equivalent now).
Moved mount_boot_partitions() and vfs_init().
Debug output can be turned off now.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4631 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 01:09:22 +00:00
Axel Dörfler
21d6803233 The class partition is now in the namespace "boot". Now overloads Size()
and Type() as well.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4630 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 01:07:03 +00:00
Axel Dörfler
04409b5f9e The R5 Device API is not public, and shouldn't be exported by this file.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4629 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 01:01:12 +00:00
Ingo Weinhold
7cc4564205 Always put SubIncludes at the very end of a Jamfile.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4628 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-11 21:44:29 +00:00
Ingo Weinhold
508fd666f4 Replaced ObjectDefines by the newly introduces ObjectsDefines and replaced BuildPlatformTest by SimpleTest (that's, how I understood Axel's previous comment, what he wanted in the first place).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4627 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-11 20:50:46 +00:00
Ingo Weinhold
728b5725a8 ObjectDefines is safe to be called on one file at ones only. So is
ObjectHdrs.
* Introduced a rule ObjectsDefines which is safe to be invoke with more
  than one file and replaced ObjectDefines where it was used wrongly.
* Fixed SourceHdrs which used ObjectHdrs wrongly.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4626 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-11 20:48:05 +00:00
Ingo Weinhold
e9230d05d0 Fixed the target directory for static libs distributed with the system. Is develop/lib/<platform> now, as is under R5. Added an optional third parameter to StaticLibrary, which specifies the target directory for the library -- defaults to the just fixed standard directory.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4625 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-11 20:04:13 +00:00
Axel Dörfler
0ccfc3ca29 Added TRACE() macro to be able to make the loader more silent.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4624 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-11 18:58:37 +00:00
Axel Dörfler
9225f27c04 Class Node already had a list_link field, so Partition::fNext was not only
wrong, but also completely senseless :-)
Renamed Partition::NextOffset() to LinkOffset() to honour that change.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4623 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-11 18:58:05 +00:00
Axel Dörfler
9a7a3f03c1 While "BuildPlatformTest" doesn't define OBOS_TEST, "ObjectDefines" doesn't
seem to work in combination with "SimpleTest".
As I am too lazy to figure out what's causing this, I hope for Ingo :-)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4622 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-11 18:17:09 +00:00
Axel Dörfler
8c7387275b Added support for BeOS; Handle.cpp uses read_pos() now, and will define
that to pread() if read_pos() doesn't exist.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4621 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-11 17:49:03 +00:00
Axel Dörfler
0547046085 Added the userland boot loader test to the build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4620 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-11 17:32:24 +00:00
Axel Dörfler
9e20549fb6 The boot loader heap test now defines HEAP_TEST in order to let heap.cpp
export dump_chunk().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4619 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-11 17:31:31 +00:00
Axel Dörfler
81b8b661c1 dump_chunk() is now only exported when HEAP_TEST is defined.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4618 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-11 17:30:12 +00:00
Axel Dörfler
572edf3377 Added the start of a userland boot loader test (i.e. userland platform
bindings for the stage2 boot loader).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4617 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-11 17:28:58 +00:00
Axel Dörfler
0686bd4707 Fixed and simplified.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4616 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-11 02:01:48 +00:00
Axel Dörfler
eb03840af1 Added a BFS special endian header.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4615 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-11 01:34:38 +00:00
Axel Dörfler
bd75d5b8cf OpenFirmware handles now report a size of 1024 GB for now - so that the
partition modules won't complain about a disk too small to hold a partition.
Should be fixed, though.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4614 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-11 00:31:21 +00:00
Axel Dörfler
ebe8f6bba7 Accidently exported a C++ function in a plain C accessible part.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4613 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-11 00:27:11 +00:00