Commit Graph

406 Commits

Author SHA1 Message Date
Axel Dörfler
ecf0475ad0 Porting r18992 to the R5 version of BFS (and therefore, bfs_shell used to build the
Haiku image) revealed a problem with that change:
* If the root node only contained a single entry it was freed instead of just making
  it a leaf node - that could produce an invalid b+tree (could only happen with
  attribute or index trees, as directories always contain '.' and '..').


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19006 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-05 17:34:11 +00:00
Axel Dörfler
bad41d39a2 Ported r18992 from the Haiku version of BFS.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19005 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-05 13:59:07 +00:00
Jérôme Duval
c49e0c68b0 dropped a useless arg of the KernelAddon rule, hope I don't mess anything
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18879 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-18 10:02:13 +00:00
Jérôme Duval
9e5134f9dd build udf for r5
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18733 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-01 15:05:54 +00:00
Jérôme Duval
2ab8552e8d copied udf R5 version to tests
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18732 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-01 12:45:12 +00:00
Axel Dörfler
ffacc65107 Imported the bfs_rename() permission check fix from the Haiku version.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18720 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-30 23:37:57 +00:00
Jérôme Duval
1d130feff7 copied dosfs R5 version to tests
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18582 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-23 09:12:05 +00:00
Oliver Tappe
e1aed9319d - reactivated building of arp, ifconfig and route to all BONE-compatbile targets
(by linking them to haiku's libsocket.so and libbind.so). This in turn greatly
  simplifies building their respective userland version as they now are the same
  as the standard version.
- added ping and traceroute to install-userland-networking pseudotarget


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17717 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-04 13:26:53 +00:00
Oliver Tappe
b0623e48ef - created a new pseudotarget 'install-userland-networking' that installs all
userland-networking files into a convenient place for easier testing:
  + net_server_driver and net_stack_driver are installed to 
    /boot/home/config/add-ons/kernel/drivers/bin and ../dev/net
  + net_stack_tester, ifconfig, arp and route are installed to 
    $(HAIKU_TEST_DIR)/kits/net/userland
  + libsocket, libnet, libbind and libnetapi are installed to 
    $(HAIKU_TEST_DIR)/kits/net/userland/lib
  + userland add-ons are installed to
    $(HAIKU_TEST_DIR)/kits/net/userland/add-ons/obos_network


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17701 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-02 17:08:19 +00:00
Oliver Tappe
cd552c7a15 - added legacy headers and posix headers to most Jamfiles here, such that
the userland version of the net-stack compiles again


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17678 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-31 20:35:18 +00:00
Axel Dörfler
f7769aa482 Some more PPC big endian fixes, mostly array handling (b+tree duplicates and
log). Still doesn't seem to work correctly, though (but it's definitely
getting closer :-)).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17560 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-23 01:24:38 +00:00
Axel Dörfler
669b14d756 Fixed GCC 4 warning.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17559 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-23 01:22:49 +00:00
Axel Dörfler
2594778c84 * Imported PPC big endian fixes into Haiku's BFS.
* Fixed another issue in BPlusTree::RemoveKey().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17558 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-22 23:44:00 +00:00
Axel Dörfler
f0280afd93 Adopted the PPC big endian fixes for disk_super_block::Initialize() and made them
a bit nicer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17557 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-22 23:21:45 +00:00
Axel Dörfler
032674909f Some more PPC fixes - initialization still doesn't run through, though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17550 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-22 20:22:48 +00:00
Axel Dörfler
239974d018 The super block is now written correctly when compiled under PPC.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17544 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-22 19:30:32 +00:00
Philippe Houdoin
d3d8b26997 First step in building again the userland test stack
environment: actually build it! :-)
Next step: fix the Jamfile to create the symlink to userland "obos_network" add-ons.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17520 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-22 09:25:35 +00:00
Jérôme Duval
771b07b64c made team monitor resizable
fix build of TeamMonitorTest app


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17220 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-24 12:13:16 +00:00
Axel Dörfler
a722407264 Added "relabel" command to rename volumes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16888 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-27 07:38:53 +00:00
Jérôme Duval
e2a69d2257 moved iso9660 R5 version to tests
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16538 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-27 23:31:21 +00:00
Ingo Weinhold
2d0e3b12b1 Added support for "ln" switch "-n" (no dereference).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16353 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-11 19:37:00 +00:00
Ingo Weinhold
468009f830 Replaced all "bool"s by "int"s. Apparently passing a bool as function
parameter from a C++ to a C context doesn't work as expected (on x86).
The caller reserves 4 bytes on the stack, but initializes only the
less significant 2 of them, while the callee reads all four bytes.
A symptom was, that one couldn't remove a symlink pointing to a directory.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16352 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-11 19:35:41 +00:00
Ingo Weinhold
4b0e1b9bda * We map ioctl() to the build platform manually now. For Linux we
implement the B_GET_GEOMETRY command in a usable way. The bfs_shell is
  able to play with partition devices under Linux, now.
* Fixed two warnings.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16146 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-30 01:19:11 +00:00
Ingo Weinhold
51855db4b0 Added cleanup for the external command stuff, so that the UNIX flavored
implementation can unlink the named pipe.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16145 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-30 01:13:48 +00:00
Ingo Weinhold
d4e25ae745 Got rid of the argument number limit of fs_shell's cp command.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16000 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-17 21:00:42 +00:00
Axel Dörfler
8a74d5f103 Imported r15693 to the R5 version of BFS: fixed endian issues.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15869 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-08 13:55:56 +00:00
Axel Dörfler
1956c146ea bfs_shell now also builds under Linux/PPC, not tested yet, though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15868 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-08 13:19:12 +00:00
Ingo Weinhold
29306dbe81 Host platform gcc 4 fixes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15026 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-18 22:29:31 +00:00
Ingo Weinhold
155b583ac3 Fixed unit tests build for platforms libbe_test and r5. Only randomly tested
a few whether they actually work.
New pseudo target "unittests", which builds all unit tests for the currently
set TARGET_PLATFORM. They are placed in generated/tests/<platform>/unittests.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14791 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-09 16:17:31 +00:00
Axel Dörfler
5112e701f3 This should fix an annoying warning that newer GCCs seem to like.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14676 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 09:56:36 +00:00
Axel Dörfler
e70c238dd9 The fs_shell is dumb and doesn't know any B_* constants :-)
Thanks to Ingo for the note.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14604 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-31 23:47:54 +00:00
Axel Dörfler
1893013260 Volume::Initialize() needs a valid nspace object in the kernel - this fixes the
"*** remove ..." error messages when initializing a BFS image via the bfs_shell.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14591 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-31 12:03:27 +00:00
Ingo Weinhold
338b8dc301 Merged changes from branch build_system_redesign at revision 14573.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14574 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-29 16:27:43 +00:00
Axel Dörfler
3a7c99e12d Oops, this one did only work for my test case...
The last log entry was never added to the list (if there were more than one), and
thus, it's blocks were never unlocked nor written back (after some minutes of
makehdimage an empty image would greet you).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14427 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-19 14:32:25 +00:00
Axel Dörfler
8047f0a02d Ported the new logging structure over to the old R5 BFS version - doesn't optimize it,
though, so it's not really ready to be used in a real file system.
Found an off-by-one/some error in Be's BFS implementation: it doesn't use the log
array to its full extent.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14423 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-19 12:59:04 +00:00
Waldemar Kornewald
36d4f38324 Fixed build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14383 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-14 13:54:27 +00:00
Axel Dörfler
eb581c1455 Fixed the mkbfs build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14273 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-09-29 01:27:39 +00:00
Axel Dörfler
0f4453363f Ported the two bug fixes from r14063 (in BPlusTree::RemoveDuplicate()) to the R5 version of BFS.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14064 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-08-25 23:19:41 +00:00
Andrew Bachmann
fa071ce3dc change variable types for compilation
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14030 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-08-21 09:02:38 +00:00
Axel Dörfler
ee0951d2b5 Fixed missing escaping of spaces in command names.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13931 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-08-11 12:34:24 +00:00
Michael Lotz
024ef0b800 Fixing and adding more BMessage speed tests. Previously messages weren't written at all. This shows that Message2 is actually much faster than the R5 version in flattening. The current implementation is sometimes a lot faster than Message2 though but doesn't scale that well.
Added libmessagetest.so to test specifically the BMessage implementation.
Fixing some other unit tests along the way - quite many of them are borken.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13911 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-08-07 13:19:49 +00:00
Axel Dörfler
1a3f15e929 Doh, it's Team Monitor - not Task Manager :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13368 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-30 17:46:34 +00:00
Axel Dörfler
2921880701 Fixed a bad bug in the journaling code: set_blocks_info() was called before
the super block was written back. This had a big race condition when all
blocks in the transaction were written back before the super block was
written. In that case, the log info part of the super block got out of
sync and was plain wrong (eventually causing the disk to be unmountable).
Also moved the list code over to the kernel's DoublyLinkedList.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13366 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-30 16:23:56 +00:00
Axel Dörfler
ce98205af5 Build fixes, mostly by John Drinkwater - looks like he's cleaning up behind me :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13346 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-29 14:48:13 +00:00
Jérôme Duval
12f043c1e2 reverted to 12828
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13200 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-17 11:44:32 +00:00
Axel Dörfler
62f29f2d9b Added test application for the task manager window.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13146 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-15 06:40:13 +00:00
Jérôme Duval
d70f24a679 fix the build ...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13122 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-14 19:08:49 +00:00
Axel Dörfler
5cc1406383 The libfs_shell.a is no longer built with DEBUG turned on by default.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12828 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-26 08:24:00 +00:00
Axel Dörfler
69aaf3f39b Fixed some stupid problems with the stat::st_mode field; the type of
a node was not always correctly determined (or set) - the recent change
of the attribute (directory) modes made these bugs a bit more obtrusive.
This also fixes a drop to the kernel debugger when doing a
"zip -r config.zip config/" in the home directory, as reported by Korli.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12826 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-26 08:09:27 +00:00
Axel Dörfler
c477f77c33 lock.h is not really used anymore (now you should be able to check out the
repository under Windows).
Some minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12802 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-24 22:07:29 +00:00
Axel Dörfler
b926763e09 Partial backport of r10356: no longer preallocates space for attributes,
attribute directories, and symlinks.
This reduces the space usage of the image created by makehdimage quite
a bit already (dropped from currently 56 MB to 34 MB).
The core of r10356, the fix for the preallocation memory leak, however,
has not been backported (it would probably save another 5 MB on the final
image).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12797 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-24 11:04:10 +00:00
Axel Dörfler
36cb9bac61 Attribute directories must have the S_IFDIR flag set, attribute files
the S_IFREG flag. The missing flags caused the original BFS to crash
on our files.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12796 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-24 10:38:59 +00:00
Axel Dörfler
367861b645 This fixes the bfs_shell build under Linux: replaced B_OK with FS_OK in
tracker.cpp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12552 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-03 02:34:32 +00:00
Axel Dörfler
718b5114e0 This should fix the build after all the kernel/system renaming.
If anything is still broken (and was not before :)), please shout.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12361 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-13 13:59:17 +00:00
Michael Lotz
a039ddd972 Replacing more broken binary resources with rdefs.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12303 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-11 23:10:13 +00:00
Axel Dörfler
28fb0f9857 Added a very simple mkindex command - can only create string indexes for now
(and added support for that function in the emulated kernel).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11951 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-22 03:08:32 +00:00
Axel Dörfler
6557584901 Made some kernel tests build again (that didn't work anymore since I moved
some pieces around). There might be more left, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11939 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-21 17:38:22 +00:00
Ingo Weinhold
f8e5453f2b Added a small program for testing unblocking on close and select support. Not quite exhaustive and tests for ECHO mode are missing, since I couldn't figure out how to turn it on.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11932 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-20 22:35:05 +00:00
Jérôme Duval
f28587e165 removed .cvsignore files
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11920 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-20 12:31:46 +00:00
Ingo Weinhold
01203fdf42 Made a bit more compliant to the shell `cp':
* When the target is a symlink, it is tried to be resolved before making
  the decision what to do.
* If the (resolved) target is a file and the source is a file, we don't
  fail anymore, if `-f' wasn't specified. We truncate the target file
  instead and copy the source data into it.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11683 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-11 17:52:29 +00:00
Ingo Weinhold
2c05bc8a8d Move to_platform_open_mode() to stat_util.cpp/h and made it available to other source files. It has little to do with stat data, but it fits with the other conversion functions at least and I found no better place.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11682 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-11 17:48:21 +00:00
Ingo Weinhold
6ce30cc809 Made xcp the default cp/copy command. The code for it is still there, for it is also used in other tests.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11681 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-11 17:45:59 +00:00
Axel Dörfler
3380da1e1f Another small improvement to how things build as suggested by Ingo.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11631 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-09 14:43:42 +00:00
Axel Dörfler
7f67a70cfe Now builds under Dano/Zeta as well.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11619 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-08 12:44:03 +00:00
Axel Dörfler
fa900c88f7 Fixed warnings.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11618 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-08 12:43:15 +00:00
Axel Dörfler
3f687b627a mkbfs now also writes a standard boot block to disk (works for images only).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11617 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-08 12:29:09 +00:00
Axel Dörfler
9fcf97f229 Added a binary copy of BFS's boot block code (as used in BeOS). This will
be used by our R5 mkbfs replacement for now, until someone replaced that
boot loader code :)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11616 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-08 01:39:44 +00:00
Ingo Weinhold
61f6087c2a Define _GNU_SOURCE for GNU extensions.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11602 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-06 13:42:17 +00:00
Ingo Weinhold
9c523f7e48 * Added source for scripting support under Linux.
* Define _GNU_SOURCE for GNU extension.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11601 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-06 13:40:54 +00:00
Ingo Weinhold
0adb8b09ca Implemented fs_shell scripting under UNIX using UNIX sockets. Refactored
the platform independent code out of fs_shell_command_beos.cpp.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11600 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-06 13:39:17 +00:00
Ingo Weinhold
58183b99ff * dirent::d_dev is not POSIX. Use it only under BeOS.
* Make return value of implementations of Directory::GetNextEntry()
  match the base class version.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11599 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-06 13:36:25 +00:00
Ingo Weinhold
19de31b510 B_OK -> FS_OK
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11598 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-06 13:33:25 +00:00
Ingo Weinhold
76a14666e0 * As read_pos() and write_pos() are supposed to be platform functions,
they return the respective error codes.
* Fixed the open mode conversion function.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11597 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-06 13:32:33 +00:00
Ingo Weinhold
7d0617a836 Er, the last change was quite wrong. Correctly define O_NOTRAVERSE to O_NOFOLLOW, if available.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11596 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-06 13:31:26 +00:00
Ingo Weinhold
cc13340e9a Fixed struct stat conversion functions for non-BeOS.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11595 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-06 13:09:50 +00:00
Ingo Weinhold
16157ab59e ioctx::lock was not initialized properly.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11594 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-06 13:08:58 +00:00
Ingo Weinhold
875d890122 O_NOTRAVERSE is called O_NOFOLLOW under Linux.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11593 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-06 13:07:41 +00:00
Ingo Weinhold
6ff9fee56f Improved the output in case the command failed.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11591 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-06 00:13:39 +00:00
Ingo Weinhold
a34fce7356 Rewrote the mkdir command to support option -p and multiple directories.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11590 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-05 21:37:09 +00:00
Ingo Weinhold
6bc2ff3471 Reverted the kludge introduced to wrap the build platform fstat() and
switch to Axel's hack to just redefine the critical functions via macro
definition in the Jamfile.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11589 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-05 21:01:56 +00:00
Ingo Weinhold
0bd9d4d1c0 Added new source files xcp.cpp, path_util.cpp, stat_util.cpp.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11588 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-05 20:59:47 +00:00
Ingo Weinhold
4a91298cbb * Use our open mode flags and seek modes instead of the build platform
ones.
* Added listattr command.
* Added cd command. It can change the CWD of the emulated as well as of
  the host OS (prefix `:').
* Changed do_dir() to print symlinks with their target.
* Rewrote the rm command. It now support the options -r and -f
  and multiple files.
* Rewrote the symlink command (and renamed it to link, alias ln). It now
  supports creating hardlinks and understands the options -s and -f.
* Added command xcp, with support for options -r, -f, -d, and pretty
  close approximation of the shell command cp, save for the fact, that it
  copies attributes and can freely copy in the emulated and host OS
  (and between them, of course; prefix `:').

Now it should be possible to change makehdimage to use a scripted
bfs_shell instead of UserlandFS to build a HD image.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11587 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-05 20:58:58 +00:00
Ingo Weinhold
c5126c5985 * Write buffers should be const.
* Added sys_stat_attr().
* Added sys_open_attr_dir(). Extended the directory functions to be able
  to deal with attribute directories.
* Init the current directory, so we can use it (the support is there
  already).
* Use our open modes instead of the platform ones.
* Added O_NOTRAVERSE support to sys_open().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11586 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-05 20:45:45 +00:00
Ingo Weinhold
e19f027e30 Change into the root dir of the FS directly after mounting.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11585 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-05 20:39:02 +00:00
Ingo Weinhold
f64fcd3794 attr_info -> my_attr_info
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11584 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-05 20:38:01 +00:00
Ingo Weinhold
3eb4c2e0cd We also need to take care of the open flags, seek constants and the
BeOS specific structure attr_info (it contains an off_t).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11583 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-05 20:37:04 +00:00
Ingo Weinhold
edbadbb0f3 * The build platform fstat() wrapper moved into stat_util.cpp/h.
* Added wrappers for open(), close(), and read_pos().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11582 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-05 20:34:39 +00:00
Ingo Weinhold
d29e55d8ec Functions for converting between the build platform and emulated platform stat structures.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11581 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-05 20:32:40 +00:00
Ingo Weinhold
740f995468 Paths related utility functions.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11580 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-05 20:31:39 +00:00
Ingo Weinhold
2645d1f338 Use the fstat() wrapper only on non-BeOS systems.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11571 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-04 00:37:10 +00:00
Ingo Weinhold
d139bc986a The st_rdev field was missing in our my_stat structure, so it wasn't binary compatible with R5 struct stat.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11570 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-04 00:36:14 +00:00
Ingo Weinhold
c64ead1580 Accidentially gave a empty commit message when committing the changes to
the bfs_shell related files:
* Fixed a couple of `friend without struct/class' errors gcc 3
  complains about.
* Several adjustments do make the FS add-on build in a BeOS-like
  environment. E.g. the fs_shell header "myfs.h" is not longer included.
  For "cache.h" and "proto.h" the local copies are included.
* additional_commands.c must is part of the fs_shell and must be build in
  the same environment as the fs_shell. The fs_shell definitions must be
  used for system dependencies.
* The FS add-on has a platform dependency, since it opens and fstat()s
  the underlying device. open() is harmless, but we must wrap fstat().
* We don't longer compile in kernel_cpp.cpp, but rather use the
  platform C++ support directly.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11569 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-03 23:48:52 +00:00
Ingo Weinhold
105d7373e9 *** empty log message ***
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11568 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-03 23:36:57 +00:00
Ingo Weinhold
efaa1f0e73 We now build a static library from the fs_shell sources. No need to compile them again for each FS.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11567 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-03 23:35:57 +00:00
Ingo Weinhold
bc421eb5c9 Jam rule SetupFSShellIncludes that sets up the include search dirs for building the fs_shell. Reused, hence in a separate file.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11566 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-03 23:34:29 +00:00
Ingo Weinhold
e6f3010336 A whole bunch of changes to make the fs_shell build (and work) under
Linux:
* Corrected use of error code. We consequently use the errors we
  defined to be compatible with BeOS and translate error code to and from
  the build platform where necessary.
* Consequently use the structs my_stat and my_dirent and the type
  fs_off_t when dealing with the guest FS. my_dirent had to be adjusted
  to be BeOS compatible.
  We wrap the platform fstat() now to translate the struct stat to the
  BeOS representation.
* Fixed a bug introduced with the last checkin: The fs_shell crashed after
  executing a command.
* Fixed printf() format warnings under Linux.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11565 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-03 23:32:35 +00:00
Ingo Weinhold
9b3fd9f88c Support for translating error codes between the build platform and the
emulated system (i.e. the FS).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11563 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-03 23:18:54 +00:00
Ingo Weinhold
d2df6f5a20 We compile the fs_shell with BuildPlatformMain, which is more correct. We
use all Haiku headers save the POSIX and STL headers. Let's see how we
fare on Linux with this change...


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11552 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-03 00:47:39 +00:00
Ingo Weinhold
2585523bed Changed since the fs_shell additional command mechanism has changed.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11551 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-03 00:44:59 +00:00
Ingo Weinhold
fc5863cce5 * Renamed fsh.c to fsh.cpp to have a more usable static initialization at
hand. Fixed all compiler errors.
* Changed the mechanism for including additional commands. Now an array
  is exported by the instance code.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11550 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-03 00:43:23 +00:00