Added an initial mkbfs test app (it's intended to be used under R5).
Hardcoded device file to "/boot/home/test-device" - more to come :) git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6318 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
SubDir OBOS_TOP src tests add-ons kernel file_systems bfs ;
|
SubDir OBOS_TOP src tests add-ons kernel file_systems bfs ;
|
||||||
|
|
||||||
#SubInclude OBOS_TOP src tests add-ons kernel file_systems bfs blockAllocator ;
|
|
||||||
SubInclude OBOS_TOP src tests add-ons kernel file_systems bfs bufferPool ;
|
SubInclude OBOS_TOP src tests add-ons kernel file_systems bfs bufferPool ;
|
||||||
SubInclude OBOS_TOP src tests add-ons kernel file_systems bfs bfs_shell ;
|
SubInclude OBOS_TOP src tests add-ons kernel file_systems bfs bfs_shell ;
|
||||||
SubInclude OBOS_TOP src tests add-ons kernel file_systems bfs btree ;
|
SubInclude OBOS_TOP src tests add-ons kernel file_systems bfs btree ;
|
||||||
|
SubInclude OBOS_TOP src tests add-ons kernel file_systems bfs mkbfs ;
|
||||||
SubInclude OBOS_TOP src tests add-ons kernel file_systems bfs structureSizes ;
|
SubInclude OBOS_TOP src tests add-ons kernel file_systems bfs structureSizes ;
|
||||||
|
|||||||
@@ -0,0 +1,53 @@
|
|||||||
|
SubDir OBOS_TOP src tests add-ons kernel file_systems bfs mkbfs ;
|
||||||
|
|
||||||
|
SubDirHdrs $(OBOS_TOP) src tests add-ons kernel file_systems fs_shell ;
|
||||||
|
SubDirHdrs $(OBOS_TOP) src add-ons kernel file_systems bfs ;
|
||||||
|
UsePrivateHeaders [ FDirName kernel util ] ;
|
||||||
|
|
||||||
|
{
|
||||||
|
# set CHECK_MALLOC to something when doing tests against memory corruption
|
||||||
|
local malloc_debug_defines ;
|
||||||
|
local malloc_debug_flags ;
|
||||||
|
if $(CHECK_MALLOC) {
|
||||||
|
malloc_debug_defines = _NO_INLINE_ASM ;
|
||||||
|
malloc_debug_flags = -fcheck-memory-usage ;
|
||||||
|
}
|
||||||
|
|
||||||
|
local defines = [ FDefines USER DEBUG
|
||||||
|
#BFS_BIG_ENDIAN_ONLY
|
||||||
|
$(malloc_debug_defines) ] ;
|
||||||
|
SubDirCcFlags $(defines) -fno-exceptions -fno-rtti $(malloc_debug_flags) ;
|
||||||
|
SubDirC++Flags $(defines) -fno-exceptions -fno-rtti $(malloc_debug_flags) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
SimpleTest mkbfs
|
||||||
|
:
|
||||||
|
mkbfs.cpp
|
||||||
|
|
||||||
|
cache.c
|
||||||
|
kernel.c
|
||||||
|
sl.c
|
||||||
|
sysdep.c
|
||||||
|
rootfs.c
|
||||||
|
|
||||||
|
Volume.cpp BPlusTree.cpp Inode.cpp Index.cpp Query.cpp Journal.cpp
|
||||||
|
BlockAllocator.cpp kernel_interface.cpp Utility.cpp BufferPool.cpp
|
||||||
|
Debug.cpp
|
||||||
|
:
|
||||||
|
;
|
||||||
|
|
||||||
|
# Tell Jam where to find these sources
|
||||||
|
SEARCH on [ FGristFiles
|
||||||
|
Volume.cpp BPlusTree.cpp Inode.cpp Index.cpp Query.cpp Journal.cpp
|
||||||
|
BlockAllocator.cpp kernel_interface.cpp Utility.cpp BufferPool.cpp
|
||||||
|
Debug.cpp
|
||||||
|
] = [ FDirName $(OBOS_TOP) src add-ons kernel file_systems bfs ] ;
|
||||||
|
|
||||||
|
SEARCH on [ FGristFiles
|
||||||
|
fsh.c rootfs.c initfs.c kernel.c cache.c sl.c stub.c tracker.cpp
|
||||||
|
sysdep.c hexdump.c argv.c
|
||||||
|
] = [ FDirName $(OBOS_TOP) src tests add-ons kernel file_systems fs_shell ] ;
|
||||||
|
|
||||||
|
SEARCH on [ FGristFiles
|
||||||
|
kernel_cpp.cpp
|
||||||
|
] = [ FDirName $(OBOS_TOP) src kernel core util ] ;
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
** Copyright 2004, Axel Dörfler, [email protected]. All rights reserved.
|
||||||
|
** Distributed under the terms of the OpenBeOS License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include "Volume.h"
|
||||||
|
|
||||||
|
#include "compat.h"
|
||||||
|
#include "kprotos.h"
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
char *deviceName = "/boot/home/test-device";
|
||||||
|
uint32 blockSize = 1024;
|
||||||
|
|
||||||
|
// ToDo: evaluate arguments!
|
||||||
|
|
||||||
|
init_block_cache(16348, 0);
|
||||||
|
init_vnode_layer();
|
||||||
|
|
||||||
|
Volume volume(42);
|
||||||
|
status_t status = volume.Initialize(deviceName, "New Disk", blockSize, 0);
|
||||||
|
if (status < B_OK) {
|
||||||
|
fprintf(stderr, "Initializing volume failed: %s\n", strerror(status));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
shutdown_block_cache();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user