Fixed building the R5 version of BFS on BeOS.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24263 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2008-03-06 09:33:09 +00:00
parent cfbbe30f3b
commit 9906039303
12 changed files with 48 additions and 40 deletions

View File

@ -8,6 +8,7 @@ SubInclude HAIKU_TOP src tests add-ons kernel file_systems bfs dump_log ;
SubInclude HAIKU_TOP src tests add-ons kernel file_systems bfs fragmenter ;
SubInclude HAIKU_TOP src tests add-ons kernel file_systems bfs mkbfs ;
SubInclude HAIKU_TOP src tests add-ons kernel file_systems bfs queries ;
SubInclude HAIKU_TOP src tests add-ons kernel file_systems bfs r5 ;
SubInclude HAIKU_TOP src tests add-ons kernel file_systems bfs randomread ;
SubInclude HAIKU_TOP src tests add-ons kernel file_systems bfs rename ;
SubInclude HAIKU_TOP src tests add-ons kernel file_systems bfs structureSizes ;

View File

@ -1,10 +1,9 @@
/*
* Copyright 2001-2008, Axel Dörfler, axeld@pinc-software.de. All Rights Reserved.
* This file may be used under the terms of the MIT License.
*/
#ifndef DEBUG_H
#define DEBUG_H
/* Debug - debug stuff
**
** Initial version by Axel Dörfler, axeld@pinc-software.de
** This file may be used under the terms of the OpenBeOS License.
*/
#include <KernelExport.h>
@ -21,6 +20,9 @@
# define __out dprintf
#endif
#define _KERNEL_DEBUG_H
// to work around problems with private/kernel/debug.h
// Which debugger should be used when?
// The DEBUGGER() macro actually has no effect if DEBUG is not defined,
// use the DIE() macro if you really want to die.

View File

@ -1,5 +1,5 @@
/*
* Copyright 2001-2007, Axel Dörfler, axeld@pinc-software.de
* Copyright 2001-2008, Axel Dörfler, axeld@pinc-software.de
* This file may be used under the terms of the MIT License.
*/
@ -12,7 +12,6 @@
#include "Stream.h"
#include "Index.h"
#include <fs_cache.h>
#include <util/kernel_cpp.h>
#include <string.h>

View File

@ -1,6 +1,6 @@
/* Inode - inode access functions
*
* Copyright 2001-2006, Axel Dörfler, axeld@pinc-software.de
* Copyright 2001-2008, Axel Dörfler, axeld@pinc-software.de
* This file may be used under the terms of the MIT License.
*/
#ifndef INODE_H
@ -13,6 +13,7 @@
#endif
#include "cache.h"
#include "fsproto.h"
#include <string.h>
#include <unistd.h>

View File

@ -1,5 +1,7 @@
SubDir HAIKU_TOP src tests add-ons kernel file_systems bfs r5 ;
SetSubDirSupportedPlatformsBeOSCompatible ;
# save original optimization level
oldOPTIM = $(OPTIM) ;

View File

@ -1,13 +1,12 @@
/* Journal - transaction and logging
*
* Copyright 2001-2006, Axel Dörfler, axeld@pinc-software.de
/*
* Copyright 2001-2008, Axel Dörfler, axeld@pinc-software.de
* This file may be used under the terms of the MIT License.
*/
//! Transaction and logging
#include "Journal.h"
#include "Inode.h"
#include "Debug.h"
#include <Drivers.h>
#include <util/kernel_cpp.h>

View File

@ -1,12 +1,18 @@
/* Journal - transaction and logging
*
* Copyright 2001-2005, Axel Dörfler, axeld@pinc-software.de
/*
* Copyright 2001-2008, Axel Dörfler, axeld@pinc-software.de
* This file may be used under the terms of the MIT License.
*/
#ifndef JOURNAL_H
#define JOURNAL_H
#include "Debug.h"
#include "Volume.h"
#include "Chain.h"
#include "Utility.h"
#include "cache.h"
#include <KernelExport.h>
#include <util/DoublyLinkedList.h>
@ -14,12 +20,6 @@
# include <stdio.h>
#endif
#include "cache.h"
#include "Volume.h"
#include "Chain.h"
#include "Utility.h"
struct run_array;
class LogEntry;

View File

@ -4,7 +4,7 @@
* by J. Kercheval, and on code written by Kenneth Almquist, though
* it shares no code.
*
* Copyright 2001-2007, Axel Dörfler, axeld@pinc-software.de.
* Copyright 2001-2008, Axel Dörfler, axeld@pinc-software.de.
* This file may be used under the terms of the MIT License.
*/
@ -1504,7 +1504,7 @@ Query::GetNextEntry(struct dirent *dirent, size_t size)
if (!fStack.Pop(&fCurrent)
|| fCurrent == NULL
|| fCurrent->PrepareQuery(fVolume, fIndex, &fIterator,
fFlags & B_QUERY_NON_INDEXED) < B_OK)
false/*fFlags & B_QUERY_NON_INDEXED*/) < B_OK)
return B_ENTRY_NOT_FOUND;
}
if (fCurrent == NULL)

View File

@ -1,5 +1,5 @@
/*
* Copyright 2001-2007, Axel Dörfler, axeld@pinc-software.de. All Rights Reserved.
* Copyright 2001-2008, Axel Dörfler, axeld@pinc-software.de. All Rights Reserved.
* This file may be used under the terms of the MIT License.
*/
@ -15,7 +15,6 @@
#include <util/kernel_cpp.h>
#include <KernelExport.h>
#include <Drivers.h>
#include <fs_volume.h>
#include <stdlib.h>
#include <stdio.h>
@ -232,7 +231,7 @@ disk_super_block::Initialize(const char *diskName, off_t numBlocks, uint32 block
// #pragma mark -
Volume::Volume(mount_id id)
Volume::Volume(dev_t id)
:
fID(id),
fBlockAllocator(this),

View File

@ -1,6 +1,5 @@
/* Volume - BFS super block, mounting, etc.
*
* Initial version by Axel Dörfler, axeld@pinc-software.de
/*
* Copyright 2001-2008, Axel Dörfler, axeld@pinc-software.de. All Rights Reserved.
* This file may be used under the terms of the MIT License.
*/
#ifndef VOLUME_H
@ -8,7 +7,7 @@
#include <KernelExport.h>
#include <fs_interface.h>
#include "fsproto.h"
#include "cache.h"
@ -31,7 +30,7 @@ enum volume_initialize_flags {
class Volume {
public:
Volume(mount_id id);
Volume(dev_t id);
~Volume();
status_t Mount(const char *device, uint32 flags);
@ -53,7 +52,7 @@ class Volume {
vint32 &LogEnd() { return fLogEnd; }
int Device() const { return fDevice; }
mount_id ID() const { return fID; }
dev_t ID() const { return fID; }
const char *Name() const { return fSuperBlock.name; }
off_t NumBlocks() const { return fSuperBlock.NumBlocks(); }
@ -112,7 +111,7 @@ class Volume {
static status_t Identify(int fd, disk_super_block *superBlock);
protected:
mount_id fID;
dev_t fID;
int fDevice;
disk_super_block fSuperBlock;

View File

@ -7,7 +7,7 @@
*/
#include <fs_interface.h>
#include "fsproto.h"
/* ioctl to check the version of BFS used - parameter is a uint32 *

View File

@ -238,19 +238,25 @@ typedef struct vnode_ops {
extern "C" {
#endif
extern _IMPEXP_KERNEL int new_path(const char *path, char **copy);
extern _IMPEXP_KERNEL void free_path(char *p);
extern _IMPEXP_KERNEL int new_path(const char *path, char **copy);
extern _IMPEXP_KERNEL void free_path(char *p);
extern _IMPEXP_KERNEL void notify_select_event(selectsync *sync, uint32 ref);
extern _IMPEXP_KERNEL status_t is_vnode_removed(nspace_id nsid, vnode_id vnid);
extern _IMPEXP_KERNEL void notify_select_event(selectsync *sync, uint32 ref);
extern _IMPEXP_KERNEL int notify_listener(int op, nspace_id nsid,
vnode_id vnida, vnode_id vnidb,
vnode_id vnidc, const char *name);
extern _IMPEXP_KERNEL status_t send_notification(port_id port, long token,
ulong what, long op, nspace_id device, nspace_id toDevice,
vnode_id parentNode, vnode_id toParentNode, vnode_id node,
const char *name);
// The missing prototypes can be found in the fs_interface.h file.
// That part of the VFS is still compatible with BeOS :)
extern _IMPEXP_KERNEL int get_vnode(nspace_id nsid, vnode_id vnid, void **data);
extern _IMPEXP_KERNEL int put_vnode(nspace_id nsid, vnode_id vnid);
extern _IMPEXP_KERNEL int new_vnode(nspace_id nsid, vnode_id vnid, void *data);
extern _IMPEXP_KERNEL int remove_vnode(nspace_id nsid, vnode_id vnid);
extern _IMPEXP_KERNEL int unremove_vnode(nspace_id nsid, vnode_id vnid);
extern _IMPEXP_KERNEL int is_vnode_removed(nspace_id nsid, vnode_id vnid);
#ifdef __cplusplus
}