Skip to content

Commit

Permalink
fixup: dfsv2: seq: aligned proto of lseek to manual
Browse files Browse the repository at this point in the history
In manual, the prototype of lseek is

`off_t lseek(int fd, off_t offset, int whence);`

where the return type is `off_t` but not ssize_t.

Signed-off-by: Shell <[email protected]>
  • Loading branch information
polarvid authored and mysterywolf committed Sep 14, 2024
1 parent cadcd81 commit 2cbd588
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/dfs/dfs_v2/include/dfs_seq_file.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ static inline void dfs_seq_setwidth(struct dfs_seq_file *seq, size_t size)

int dfs_seq_open(struct dfs_file *file, const struct dfs_seq_ops *ops);
ssize_t dfs_seq_read(struct dfs_file *file, void *buf, size_t size, off_t *pos);
ssize_t dfs_seq_lseek(struct dfs_file *file, off_t offset, int whence);
off_t dfs_seq_lseek(struct dfs_file *file, off_t offset, int whence);
int dfs_seq_release(struct dfs_file *file);
int dfs_seq_write(struct dfs_seq_file *seq, const void *data, size_t len);

Expand Down
2 changes: 1 addition & 1 deletion components/dfs/dfs_v2/src/dfs_seq_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ ssize_t dfs_seq_read(struct dfs_file *file, void *buf, size_t size, off_t *pos)
goto Done;
}

ssize_t dfs_seq_lseek(struct dfs_file *file, off_t offset, int whence)
off_t dfs_seq_lseek(struct dfs_file *file, off_t offset, int whence)
{
struct dfs_seq_file *seq = file->data;
off_t retval = -EINVAL;
Expand Down

0 comments on commit 2cbd588

Please sign in to comment.