Added missing functions from fs_query.h and fs_info.h, both not yet implemented.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8217 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2004-06-28 12:36:13 +00:00
parent e5948ee29a
commit 5ab2a9e4b4
3 changed files with 122 additions and 0 deletions
+2
View File
@@ -7,6 +7,8 @@ KernelMergeObject os_main.o :
<$(SOURCE_GRIST)>driver_settings.c
<$(SOURCE_GRIST)>fs_attr.c
<$(SOURCE_GRIST)>fs_index.c
<$(SOURCE_GRIST)>fs_info.c
<$(SOURCE_GRIST)>fs_query.c
<$(SOURCE_GRIST)>image.c
<$(SOURCE_GRIST)>port.c
<$(SOURCE_GRIST)>sem.c
+56
View File
@@ -0,0 +1,56 @@
/*
** Copyright 2004, Axel Dörfler, [email protected]. All rights reserved.
** Distributed under the terms of the Haiku License.
*/
#include <fs_info.h>
#include <stdlib.h>
#include <fcntl.h>
#include <errno.h>
#include "syscalls.h"
// ToDo: implement these for real - the VFS functions are still missing!
#define RETURN_AND_SET_ERRNO(status) \
{ \
if (status < 0) { \
errno = status; \
return -1; \
} \
return status; \
}
dev_t
dev_for_path(const char *path)
{
struct stat stat;
int status = _kern_read_path_stat(path, false, &stat, sizeof(struct stat));
if (status == B_OK)
return stat.st_dev;
RETURN_AND_SET_ERRNO(status);
}
dev_t
next_dev(int32 *pos)
{
status_t status = B_ERROR;
RETURN_AND_SET_ERRNO(status)
}
int
fs_stat_dev(dev_t dev, fs_info *info)
{
status_t status = B_ERROR;
RETURN_AND_SET_ERRNO(status)
}
+64
View File
@@ -0,0 +1,64 @@
/*
** Copyright 2004, Axel Dörfler, [email protected]. All rights reserved.
** Distributed under the terms of the Haiku License.
*/
#include <fs_query.h>
#include <stdlib.h>
#include <fcntl.h>
#include <errno.h>
#include "syscalls.h"
// ToDo: implement these for real - the VFS functions are still missing!
#define RETURN_AND_SET_ERRNO(status) \
{ \
if (status < 0) { \
errno = status; \
return -1; \
} \
return status; \
}
// for the DIR structure
#define BUFFER_SIZE 2048
DIR *
fs_open_query(dev_t device, const char *query, uint32 flags)
{
return NULL;
}
DIR *
fs_open_live_query(dev_t device, const char *query,
uint32 flags, port_id port, int32 token)
{
return NULL;
}
int
fs_close_query(DIR *d)
{
return 0;
}
struct dirent *
fs_read_query(DIR *d)
{
return NULL;
}
status_t
get_path_for_dirent(struct dirent *dent, char *buf, size_t len)
{
return B_ERROR;
}