diff options
author | FredyVia <942513309@qq.com> | 2024-03-20 23:08:04 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-20 16:08:04 +0100 |
commit | c021e910a5592756f7c3fa47f89d83e41c8a3505 (patch) | |
tree | 533e0e2d83802b7007b30b2b21cad9ec7928f8d2 /example/invalidate_path.c | |
parent | 9a823df6d91869960b733581dc71ccefcbe92cc3 (diff) | |
download | libfuse-c021e910a5592756f7c3fa47f89d83e41c8a3505.tar.gz |
Add FUSE_FILL_DIR_DEFAULTS enum (#903)
In order to use the fuse_fill_dir_t function in a C++ program, add the enum item:
FUSE_FILL_DIR_DEFAULTS
Without this change g++ compilation failed with
example/hello.c:94:35: error: invalid conversion from ‘int’ to ‘fuse_fill_dir_flags’ [-fpermissive]
94 | filler(buf, ".", NULL, 0, 0);
| ^
| |
| int
Diffstat (limited to 'example/invalidate_path.c')
-rw-r--r-- | example/invalidate_path.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/example/invalidate_path.c b/example/invalidate_path.c index 9159b2f..0e8d77f 100644 --- a/example/invalidate_path.c +++ b/example/invalidate_path.c @@ -117,9 +117,9 @@ static int xmp_readdir(const char *path, void *buf, fuse_fill_dir_t filler, (void) buf; struct stat file_stat; xmp_getattr("/" TIME_FILE_NAME, &file_stat, NULL); - filler(buf, TIME_FILE_NAME, &file_stat, 0, 0); + filler(buf, TIME_FILE_NAME, &file_stat, 0, FUSE_FILL_DIR_DEFAULTS); xmp_getattr("/" GROW_FILE_NAME, &file_stat, NULL); - filler(buf, GROW_FILE_NAME, &file_stat, 0, 0); + filler(buf, GROW_FILE_NAME, &file_stat, 0, FUSE_FILL_DIR_DEFAULTS); return 0; } } |