mirror of
https://github.com/falk-werner/webfuse
synced 2024-10-27 20:34:10 +00:00
added fuse low level operation stubs
This commit is contained in:
parent
ee97af3519
commit
32e325e72f
@ -49,6 +49,12 @@ add_library(fuse-wsfs
|
|||||||
src/wsfs/operation/open.c
|
src/wsfs/operation/open.c
|
||||||
src/wsfs/operation/close.c
|
src/wsfs/operation/close.c
|
||||||
src/wsfs/operation/read.c
|
src/wsfs/operation/read.c
|
||||||
|
src/wsfs/operation/ll_lookup.c
|
||||||
|
src/wsfs/operation/ll_getattr.c
|
||||||
|
src/wsfs/operation/ll_readdir.c
|
||||||
|
src/wsfs/operation/ll_open.c
|
||||||
|
src/wsfs/operation/ll_close.c
|
||||||
|
src/wsfs/operation/ll_read.c
|
||||||
src/wsfs/response_parser.c
|
src/wsfs/response_parser.c
|
||||||
src/wsfs/server.c
|
src/wsfs/server.c
|
||||||
src/wsfs/protocol.c
|
src/wsfs/protocol.c
|
||||||
|
11
src/wsfs/operation/ll_close.c
Normal file
11
src/wsfs/operation/ll_close.c
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "wsfs/operations.h"
|
||||||
|
#include <errno.h>
|
||||||
|
#include "wsfs/util.h"
|
||||||
|
|
||||||
|
void wsfs_operation_ll_close(
|
||||||
|
fuse_req_t request,
|
||||||
|
fuse_ino_t WSFS_UNUSED_PARAM(inode),
|
||||||
|
struct fuse_file_info * WSFS_UNUSED_PARAM(file_info))
|
||||||
|
{
|
||||||
|
fuse_reply_err(request, ENOENT);
|
||||||
|
}
|
11
src/wsfs/operation/ll_getattr.c
Normal file
11
src/wsfs/operation/ll_getattr.c
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "wsfs/operations.h"
|
||||||
|
#include <errno.h>
|
||||||
|
#include "wsfs/util.h"
|
||||||
|
|
||||||
|
extern void wsfs_operation_ll_getattr (
|
||||||
|
fuse_req_t request,
|
||||||
|
fuse_ino_t WSFS_UNUSED_PARAM(inode),
|
||||||
|
struct fuse_file_info * WSFS_UNUSED_PARAM(file_info))
|
||||||
|
{
|
||||||
|
fuse_reply_err(request, ENOENT);
|
||||||
|
}
|
11
src/wsfs/operation/ll_lookup.c
Normal file
11
src/wsfs/operation/ll_lookup.c
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "wsfs/operations.h"
|
||||||
|
#include <errno.h>
|
||||||
|
#include "wsfs/util.h"
|
||||||
|
|
||||||
|
void wsfs_operation_ll_lookup (
|
||||||
|
fuse_req_t request,
|
||||||
|
fuse_ino_t WSFS_UNUSED_PARAM(parent),
|
||||||
|
char const * WSFS_UNUSED_PARAM(name))
|
||||||
|
{
|
||||||
|
fuse_reply_err(request, ENOENT);
|
||||||
|
}
|
11
src/wsfs/operation/ll_open.c
Normal file
11
src/wsfs/operation/ll_open.c
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "wsfs/operations.h"
|
||||||
|
#include <errno.h>
|
||||||
|
#include "wsfs/util.h"
|
||||||
|
|
||||||
|
void wsfs_operation_ll_open(
|
||||||
|
fuse_req_t request,
|
||||||
|
fuse_ino_t WSFS_UNUSED_PARAM(inode),
|
||||||
|
struct fuse_file_info * WSFS_UNUSED_PARAM(file_info))
|
||||||
|
{
|
||||||
|
fuse_reply_err(request, ENOENT);
|
||||||
|
}
|
13
src/wsfs/operation/ll_read.c
Normal file
13
src/wsfs/operation/ll_read.c
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#include "wsfs/operations.h"
|
||||||
|
#include <errno.h>
|
||||||
|
#include "wsfs/util.h"
|
||||||
|
|
||||||
|
void wsfs_operation_ll_read(
|
||||||
|
fuse_req_t request,
|
||||||
|
fuse_ino_t WSFS_UNUSED_PARAM(inode),
|
||||||
|
size_t WSFS_UNUSED_PARAM(size),
|
||||||
|
off_t WSFS_UNUSED_PARAM(offset),
|
||||||
|
struct fuse_file_info * WSFS_UNUSED_PARAM(file_info))
|
||||||
|
{
|
||||||
|
fuse_reply_err(request, ENOENT);
|
||||||
|
}
|
13
src/wsfs/operation/ll_readdir.c
Normal file
13
src/wsfs/operation/ll_readdir.c
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#include "wsfs/operations.h"
|
||||||
|
#include <errno.h>
|
||||||
|
#include "wsfs/util.h"
|
||||||
|
|
||||||
|
void wsfs_operation_ll_readdir (
|
||||||
|
fuse_req_t request,
|
||||||
|
fuse_ino_t WSFS_UNUSED_PARAM(inode),
|
||||||
|
size_t WSFS_UNUSED_PARAM(size),
|
||||||
|
off_t WSFS_UNUSED_PARAM(offset),
|
||||||
|
struct fuse_file_info * WSFS_UNUSED_PARAM(file_info))
|
||||||
|
{
|
||||||
|
fuse_reply_err(request, ENOENT);
|
||||||
|
}
|
@ -39,3 +39,20 @@ int wsfs_operations_loop(
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int wsfs_operations_loop_ll(
|
||||||
|
char * WSFS_UNUSED_PARAM(mount_point),
|
||||||
|
struct wsfs_jsonrpc * WSFS_UNUSED_PARAM(rpc))
|
||||||
|
{
|
||||||
|
struct fuse_lowlevel_ops operations;
|
||||||
|
memset(&operations, 0, sizeof(struct fuse_lowlevel_ops));
|
||||||
|
operations.lookup = &wsfs_operation_ll_lookup;
|
||||||
|
operations.getattr = &wsfs_operation_ll_getattr;
|
||||||
|
operations.readdir = &wsfs_operation_ll_readdir;
|
||||||
|
operations.open = &wsfs_operation_ll_open;
|
||||||
|
operations.release = &wsfs_operation_ll_close;
|
||||||
|
operations.read = &wsfs_operation_ll_read;
|
||||||
|
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
@ -41,6 +41,44 @@ extern int wsfs_operation_read(
|
|||||||
off_t offset,
|
off_t offset,
|
||||||
struct fuse_file_info * file_info);
|
struct fuse_file_info * file_info);
|
||||||
|
|
||||||
|
// low level operations
|
||||||
|
|
||||||
|
extern int wsfs_operations_loop_ll(
|
||||||
|
char * mount_point,
|
||||||
|
struct wsfs_jsonrpc * rpc);
|
||||||
|
|
||||||
|
extern void wsfs_operation_ll_lookup (
|
||||||
|
fuse_req_t req,
|
||||||
|
fuse_ino_t parent,
|
||||||
|
char const * name);
|
||||||
|
|
||||||
|
extern void wsfs_operation_ll_getattr (
|
||||||
|
fuse_req_t request,
|
||||||
|
fuse_ino_t inode,
|
||||||
|
struct fuse_file_info *file_info);
|
||||||
|
|
||||||
|
extern void wsfs_operation_ll_readdir (
|
||||||
|
fuse_req_t request,
|
||||||
|
fuse_ino_t inode,
|
||||||
|
size_t size,
|
||||||
|
off_t offset,
|
||||||
|
struct fuse_file_info *file_info);
|
||||||
|
|
||||||
|
extern void wsfs_operation_ll_open(
|
||||||
|
fuse_req_t request,
|
||||||
|
fuse_ino_t inode,
|
||||||
|
struct fuse_file_info * file_info);
|
||||||
|
|
||||||
|
extern void wsfs_operation_ll_close(
|
||||||
|
fuse_req_t request,
|
||||||
|
fuse_ino_t inode,
|
||||||
|
struct fuse_file_info * file_info);
|
||||||
|
|
||||||
|
extern void wsfs_operation_ll_read(
|
||||||
|
fuse_req_t request,
|
||||||
|
fuse_ino_t ino, size_t size, off_t off,
|
||||||
|
struct fuse_file_info *fi);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user