*** empty log message ***
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11568 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
efaa1f0e73
commit
105d7373e9
@ -1,11 +1,9 @@
|
||||
|
||||
#define _FS_INTERFACE_H
|
||||
// don't include that file
|
||||
#include "compat.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <StorageDefs.h>
|
||||
|
||||
#include "compat.h"
|
||||
#include "fsproto.h"
|
||||
#include "kprotos.h"
|
||||
#include "bfs_control.h"
|
||||
@ -17,7 +15,7 @@ static int
|
||||
do_chkbfs(int argc, char **argv)
|
||||
{
|
||||
struct check_control result;
|
||||
off_t files = 0, directories = 0, indices = 0, attributeDirectories = 0, attributes = 0;
|
||||
fs_off_t files = 0, directories = 0, indices = 0, attributeDirectories = 0, attributes = 0;
|
||||
int counter = 0;
|
||||
|
||||
int fd = sys_open(1, -1, "/myfs/.", O_RDONLY, S_IFREG, 0);
|
||||
@ -40,7 +38,7 @@ do_chkbfs(int argc, char **argv)
|
||||
}
|
||||
|
||||
// check all files and report errors
|
||||
while (sys_ioctl(1, fd, BFS_IOCTL_CHECK_NEXT_NODE, &result, sizeof(result)) == B_OK) {
|
||||
while (sys_ioctl(1, fd, BFS_IOCTL_CHECK_NEXT_NODE, &result, sizeof(result)) == FS_OK) {
|
||||
if (++counter % 50 == 0)
|
||||
printf(" %7d nodes processed\x1b[1A\n", counter);
|
||||
|
||||
@ -60,18 +58,18 @@ do_chkbfs(int argc, char **argv)
|
||||
printf(", names don't match");
|
||||
putchar('\n');
|
||||
}
|
||||
if ((result.mode & (S_INDEX_DIR | 0777)) == S_INDEX_DIR)
|
||||
if ((result.mode & (MY_S_INDEX_DIR | 0777)) == MY_S_INDEX_DIR)
|
||||
indices++;
|
||||
else if (result.mode & S_ATTR_DIR)
|
||||
else if (result.mode & MY_S_ATTR_DIR)
|
||||
attributeDirectories++;
|
||||
else if (result.mode & S_ATTR)
|
||||
else if (result.mode & MY_S_ATTR)
|
||||
attributes++;
|
||||
else if (result.mode & S_IFDIR)
|
||||
else if (result.mode & MY_S_IFDIR)
|
||||
directories++;
|
||||
else
|
||||
files++;
|
||||
}
|
||||
if (result.status != B_ENTRY_NOT_FOUND)
|
||||
if (result.status != FS_ENTRY_NOT_FOUND)
|
||||
printf("chkbfs: error occured during scan: %s\n", strerror(result.status));
|
||||
|
||||
// stop checking
|
||||
|
@ -242,8 +242,8 @@ class BPlusTree {
|
||||
void RemoveIterator(TreeIterator *iterator);
|
||||
|
||||
private:
|
||||
friend TreeIterator;
|
||||
friend CachedNode;
|
||||
friend struct TreeIterator;
|
||||
friend class CachedNode;
|
||||
|
||||
Inode *fStream;
|
||||
bplustree_header *fHeader;
|
||||
@ -292,8 +292,8 @@ class TreeIterator {
|
||||
bool fIsFragment;
|
||||
|
||||
private:
|
||||
friend Chain<TreeIterator>;
|
||||
friend BPlusTree;
|
||||
friend class Chain<TreeIterator>;
|
||||
friend class BPlusTree;
|
||||
|
||||
void Update(off_t offset, off_t nextOffset, uint16 keyIndex, uint16 splitAt, int8 change);
|
||||
void Stop();
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
#include <KernelExport.h>
|
||||
#ifdef USER
|
||||
# include "myfs.h"
|
||||
//# include "myfs.h"
|
||||
# include <stdio.h>
|
||||
#endif
|
||||
|
||||
@ -186,8 +186,8 @@ class Inode : public CachedBlock {
|
||||
// no implementation
|
||||
|
||||
friend void dump_inode(Inode &inode);
|
||||
friend AttributeIterator;
|
||||
friend InodeAllocator;
|
||||
friend class AttributeIterator;
|
||||
friend class InodeAllocator;
|
||||
|
||||
void Initialize();
|
||||
|
||||
@ -283,8 +283,8 @@ class AttributeIterator {
|
||||
void *fBuffer;
|
||||
|
||||
private:
|
||||
friend Chain<AttributeIterator>;
|
||||
friend Inode;
|
||||
friend class Chain<AttributeIterator>;
|
||||
friend class Inode;
|
||||
|
||||
void Update(uint16 index, int8 change);
|
||||
AttributeIterator *fNext;
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include <KernelExport.h>
|
||||
|
||||
#ifdef USER
|
||||
# include "myfs.h"
|
||||
//# include "myfs.h"
|
||||
# include <stdio.h>
|
||||
#endif
|
||||
|
||||
@ -68,7 +68,7 @@ class Journal {
|
||||
inline uint32 FreeLogBlocks() const;
|
||||
|
||||
private:
|
||||
friend log_entry;
|
||||
friend struct log_entry;
|
||||
|
||||
static void blockNotify(off_t blockNumber, size_t numBlocks, void *arg);
|
||||
status_t TransactionDone(bool success);
|
||||
|
@ -70,7 +70,7 @@ class Query {
|
||||
int32 fToken;
|
||||
|
||||
private:
|
||||
friend Chain<Query>;
|
||||
friend class Chain<Query>;
|
||||
Query *fNext;
|
||||
};
|
||||
|
||||
|
@ -21,6 +21,13 @@
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
// fs_shell support for build platforms whose struct stat is not compatible with ours
|
||||
#ifdef build_platform_fstat
|
||||
extern "C" int build_platform_fstat(int fd, struct stat *st);
|
||||
#else
|
||||
# define build_platform_fstat fstat
|
||||
#endif
|
||||
|
||||
|
||||
static const int32 kDesiredAllocationGroups = 56;
|
||||
// This is the number of allocation groups that will be tried
|
||||
@ -122,7 +129,7 @@ DeviceOpener::GetSize(off_t *_size, uint32 *_blockSize)
|
||||
if (ioctl(fDevice, B_GET_GEOMETRY, &geometry) < 0) {
|
||||
// maybe it's just a file
|
||||
struct stat stat;
|
||||
if (fstat(fDevice, &stat) < 0)
|
||||
if (build_platform_fstat(fDevice, &stat) < 0)
|
||||
return B_ERROR;
|
||||
|
||||
if (_size)
|
||||
@ -288,7 +295,7 @@ Volume::Mount(const char *deviceName, uint32 flags)
|
||||
// check if it's a regular file, and if so, disable the cache for the
|
||||
// underlaying file system
|
||||
struct stat stat;
|
||||
if (fstat(fDevice, &stat) < 0)
|
||||
if (build_platform_fstat(fDevice, &stat) < 0)
|
||||
RETURN_ERROR(B_ERROR);
|
||||
|
||||
#ifndef NO_FILE_UNCACHED_IO
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include <sys/param.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <iovec.h>
|
||||
//#include <iovec.h>
|
||||
|
||||
#include <OS.h>
|
||||
#include <NodeMonitor.h>
|
||||
|
Loading…
Reference in New Issue
Block a user