1
0
mirror of https://github.com/falk-werner/webfuse synced 2024-10-27 20:34:10 +00:00
falk-werner_webfuse/lib/wsfs/adapter/impl/operation/close.c

22 lines
593 B
C
Raw Normal View History

#include "wsfs/adapter/impl/operations.h"
2019-01-29 22:47:08 +00:00
#include <limits.h>
2019-02-03 18:10:05 +00:00
#include <errno.h>
2019-01-29 22:47:08 +00:00
#include <jansson.h>
2019-02-03 18:10:05 +00:00
#include "wsfs/adapter/impl/jsonrpc/server.h"
2019-02-03 18:10:05 +00:00
#include "wsfs/util.h"
2019-01-29 22:47:08 +00:00
2019-03-24 17:02:28 +00:00
void wsfs_impl_operation_close(
2019-02-03 18:10:05 +00:00
fuse_req_t request,
fuse_ino_t inode,
2019-01-29 22:47:08 +00:00
struct fuse_file_info * file_info)
{
2019-03-24 17:02:28 +00:00
struct wsfs_impl_operations_context * user_data = fuse_req_userdata(request);
struct wsfs_impl_jsonrpc_server * rpc = user_data->rpc;
2019-01-29 22:47:08 +00:00
int handle = (int) (file_info->fh & INT_MAX);
2019-03-24 17:02:28 +00:00
wsfs_impl_jsonrpc_server_notify(rpc, "close", "iii", inode, handle, file_info->flags);
fuse_reply_err(request, 0);
2019-01-29 22:47:08 +00:00
}