Skip to content

Commit

Permalink
In C language, keyword 'struct' must be used.
Browse files Browse the repository at this point in the history
When this header file is included by C code, keyword 'struct'
must be used.
  • Loading branch information
yfxu authored and cw123 committed Nov 9, 2021
1 parent 8109bfe commit 96c6c72
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions nebd/src/part1/libnebd.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,23 +119,23 @@ int nebd_lib_pwrite(int fd, const void* buf, off_t offset, size_t length);
* context:异步请求的上下文,包含请求所需的信息以及回调
* @return 成功返回0,失败返回错误码
*/
int nebd_lib_discard(int fd, NebdClientAioContext* context);
int nebd_lib_discard(int fd, struct NebdClientAioContext* context);

/**
* @brief 读文件,异步函数
* @param fd:文件的fd
* context:异步请求的上下文,包含请求所需的信息以及回调
* @return 成功返回0,失败返回错误码
*/
int nebd_lib_aio_pread(int fd, NebdClientAioContext* context);
int nebd_lib_aio_pread(int fd, struct NebdClientAioContext* context);

/**
* @brief 写文件,异步函数
* @param fd:文件的fd
* context:异步请求的上下文,包含请求所需的信息以及回调
* @return 成功返回0,失败返回错误码
*/
int nebd_lib_aio_pwrite(int fd, NebdClientAioContext* context);
int nebd_lib_aio_pwrite(int fd, struct NebdClientAioContext* context);

/**
* @brief sync文件
Expand Down Expand Up @@ -165,7 +165,7 @@ int nebd_lib_resize(int fd, int64_t size);
* context:异步请求的上下文,包含请求所需的信息以及回调
* @return 成功返回0,失败返回错误码
*/
int nebd_lib_flush(int fd, NebdClientAioContext* context);
int nebd_lib_flush(int fd, struct NebdClientAioContext* context);

/**
* @brief 获取文件info
Expand Down

0 comments on commit 96c6c72

Please sign in to comment.