mirror of
https://github.com/falk-werner/webfuse-provider
synced 2026-03-02 04:09:18 +00:00
refactor: renamed getter functions of json node
This commit is contained in:
@@ -19,9 +19,9 @@ void wfp_impl_close(
|
||||
wfp_impl_json_is_int(handle_holder) &&
|
||||
wfp_impl_json_is_int(flags_holder))
|
||||
{
|
||||
ino_t inode = (ino_t) wfp_impl_json_get_int(inode_holder);
|
||||
uint32_t handle = (uint32_t) (wfp_impl_json_get_int(handle_holder) & UINT32_MAX);
|
||||
int flags = wfp_impl_json_get_int(flags_holder);
|
||||
ino_t inode = (ino_t) wfp_impl_json_int_get(inode_holder);
|
||||
uint32_t handle = (uint32_t) (wfp_impl_json_int_get(handle_holder) & UINT32_MAX);
|
||||
int flags = wfp_impl_json_int_get(flags_holder);
|
||||
|
||||
context->provider->close(inode, handle, flags, context->user_data);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ void wfp_impl_getattr(
|
||||
|
||||
if (wfp_impl_json_is_int(inode_holder))
|
||||
{
|
||||
ino_t inode = (ino_t) wfp_impl_json_get_int(inode_holder);
|
||||
ino_t inode = (ino_t) wfp_impl_json_int_get(inode_holder);
|
||||
struct wfp_request * request = wfp_impl_request_create(context->request, id);
|
||||
|
||||
context->provider->getattr(request, inode, context->user_data);
|
||||
|
||||
@@ -22,8 +22,8 @@ void wfp_impl_lookup(
|
||||
if (wfp_impl_json_is_int(inode_holder) &&
|
||||
wfp_impl_json_is_string(name_holder))
|
||||
{
|
||||
ino_t inode = wfp_impl_json_get_int(inode_holder);
|
||||
char const * name = wfp_impl_json_get_string(name_holder);
|
||||
ino_t inode = wfp_impl_json_int_get(inode_holder);
|
||||
char const * name = wfp_impl_json_string_get(name_holder);
|
||||
|
||||
struct wfp_request * request = wfp_impl_request_create(context->request, id);
|
||||
context->provider->lookup(request, inode, name, context->user_data);
|
||||
|
||||
@@ -19,8 +19,8 @@ void wfp_impl_open(
|
||||
if (wfp_impl_json_is_int(inode_holder) &&
|
||||
wfp_impl_json_is_int(flags_holder))
|
||||
{
|
||||
ino_t inode = (ino_t) wfp_impl_json_get_int(inode_holder);
|
||||
int flags = (ino_t) wfp_impl_json_get_int(flags_holder);
|
||||
ino_t inode = (ino_t) wfp_impl_json_int_get(inode_holder);
|
||||
int flags = (ino_t) wfp_impl_json_int_get(flags_holder);
|
||||
|
||||
struct wfp_request * request = wfp_impl_request_create(context->request, id);
|
||||
|
||||
|
||||
@@ -26,10 +26,10 @@ void wfp_impl_read(
|
||||
wfp_impl_json_is_int(offset_holder) &&
|
||||
wfp_impl_json_is_int(length_holder))
|
||||
{
|
||||
ino_t inode = (ino_t) wfp_impl_json_get_int(inode_holder);
|
||||
int handle = wfp_impl_json_get_int(handle_holder);
|
||||
size_t offset = wfp_impl_json_get_int(offset_holder);
|
||||
size_t length = wfp_impl_json_get_int(length_holder);
|
||||
ino_t inode = (ino_t) wfp_impl_json_int_get(inode_holder);
|
||||
int handle = wfp_impl_json_int_get(handle_holder);
|
||||
size_t offset = wfp_impl_json_int_get(offset_holder);
|
||||
size_t length = wfp_impl_json_int_get(length_holder);
|
||||
struct wfp_request * request = wfp_impl_request_create(context->request, id);
|
||||
|
||||
context->provider->read(request, inode, handle, offset, length, context->user_data);
|
||||
|
||||
@@ -18,7 +18,7 @@ void wfp_impl_readdir(
|
||||
|
||||
if (wfp_impl_json_is_int(inode_holder))
|
||||
{
|
||||
ino_t inode = (ino_t) wfp_impl_json_get_int(inode_holder);
|
||||
ino_t inode = (ino_t) wfp_impl_json_int_get(inode_holder);
|
||||
struct wfp_request * request = wfp_impl_request_create(context->request, id);
|
||||
|
||||
context->provider->readdir(request, inode, context->user_data);
|
||||
|
||||
Reference in New Issue
Block a user