66/*
77 * must be included before including <fuse.h>
88 */
9- #define FUSE_USE_VERSION 26
9+ #define FUSE_USE_VERSION 30
1010#include <fuse.h>
1111
1212#include <errno.h>
1313#include <string.h>
1414#include <unistd.h>
1515
16- static void * fs_init (struct fuse_conn_info * conn )
16+ static void * fs_init (struct fuse_conn_info * conn , struct fuse_config * cfg )
1717{
1818 (void ) conn ;
19+ (void ) cfg ;
1920 return NULL ;
2021}
2122
@@ -31,8 +32,10 @@ static int fs_release(const char *path, struct fuse_file_info *fi)
3132}
3233
3334/** \brief return the attributes for a single file indicated by path */
34- static int fs_getattr (const char * path , struct stat * stbuf )
35+ static int fs_getattr (const char * path , struct stat * stbuf ,
36+ struct fuse_file_info * ffi_buf )
3537{
38+ (void ) ffi_buf ;
3639 int res = 0 ;
3740 memset (stbuf , 0 , sizeof (struct stat ));
3841
@@ -138,10 +141,11 @@ static int fs_open(const char *path, struct fuse_file_info *fi)
138141 */
139142static int
140143fs_readdir (const char * path , void * buf , fuse_fill_dir_t dir_add ,
141- off_t offset , struct fuse_file_info * fi )
144+ off_t offset , struct fuse_file_info * fi , enum fuse_readdir_flags fr_flags )
142145{
143146 (void ) offset ;
144147 (void ) fi ;
148+ (void ) fr_flags ;
145149 LinkTable * linktbl ;
146150
147151#ifdef DEBUG
@@ -159,13 +163,13 @@ fs_readdir(const char *path, void *buf, fuse_fill_dir_t dir_add,
159163 /*
160164 * start adding the links
161165 */
162- dir_add (buf , "." , NULL , 0 );
163- dir_add (buf , ".." , NULL , 0 );
166+ dir_add (buf , "." , NULL , 0 , 0 );
167+ dir_add (buf , ".." , NULL , 0 , 0 );
164168 /* We skip the head link */
165169 for (int i = 1 ; i < linktbl -> num ; i ++ ) {
166170 Link * link = linktbl -> links [i ];
167171 if (link -> type != LINK_INVALID ) {
168- dir_add (buf , link -> linkname , NULL , 0 );
172+ dir_add (buf , link -> linkname , NULL , 0 , 0 );
169173 }
170174 }
171175
0 commit comments