前情提要:/t/693941
int (*read) (const char *, char *, size_t, off_t,
struct fuse_file_info *);
int (*fallocate) (const char *, int, off_t, off_t,
struct fuse_file_info *);
ssize_t (*copy_file_range) (const char *path_in,
struct fuse_file_info *fi_in,
off_t offset_in, const char *path_out,
struct fuse_file_info *fi_out,
off_t offset_out, size_t size, int flags);
都是在 fuse_operations 接口中的方法,我想如果让我波兰的同事来提 cr 肯定是一万个 commons
- 为什么 read 用 size_t 表示 size,在 fallocate 用 off_t 表示 size 啊?
- 为什么有些地方参数有名字,有些地方不加啊?
- 为什么注释格式不一样啊?
- 为什么不用返回值啊?
手动狗头保命。纯吐槽