1919 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
2020 */
2121
22- #define FUSE_USE_VERSION 26
22+ #define FUSE_USE_VERSION 30
2323
2424#ifdef HAVE_CONFIG_H
2525#include <config.h>
@@ -205,7 +205,7 @@ static int get_afc_file_mode(afc_file_mode_t *afc_mode, int flags)
205205 return 0 ;
206206}
207207
208- static int ifuse_getattr (const char * path , struct stat * stbuf )
208+ static int ifuse_getattr (const char * path , struct stat * stbuf , struct fuse_file_info * fi )
209209{
210210 int i ;
211211 int res = 0 ;
@@ -275,7 +275,7 @@ static int ifuse_getattr(const char *path, struct stat *stbuf)
275275 return res ;
276276}
277277
278- static int ifuse_readdir (const char * path , void * buf , fuse_fill_dir_t filler , off_t offset , struct fuse_file_info * fi )
278+ static int ifuse_readdir (const char * path , void * buf , fuse_fill_dir_t filler , off_t offset , struct fuse_file_info * fi , enum fuse_readdir_flags flags )
279279{
280280 int i ;
281281 char * * dirs = NULL ;
@@ -287,7 +287,7 @@ static int ifuse_readdir(const char *path, void *buf, fuse_fill_dir_t filler, of
287287 return - ENOENT ;
288288
289289 for (i = 0 ; dirs [i ]; i ++ ) {
290- filler (buf , dirs [i ], NULL , 0 );
290+ filler (buf , dirs [i ], NULL , 0 , 0 );
291291 }
292292
293293 free_dictionary (dirs );
@@ -366,7 +366,7 @@ static int ifuse_write(const char *path, const char *buf, size_t size, off_t off
366366 return bytes ;
367367}
368368
369- static int ifuse_utimens (const char * path , const struct timespec tv [2 ])
369+ static int ifuse_utimens (const char * path , const struct timespec tv [2 ], struct fuse_file_info * fi )
370370{
371371 afc_client_t afc = fuse_get_context ()-> private_data ;
372372 uint64_t mtime = (uint64_t )tv [1 ].tv_sec * (uint64_t )1000000000 + (uint64_t )tv [1 ].tv_nsec ;
@@ -398,11 +398,11 @@ static int ifuse_release(const char *path, struct fuse_file_info *fi)
398398 return 0 ;
399399}
400400
401- void * ifuse_init (struct fuse_conn_info * conn )
401+ void * ifuse_init (struct fuse_conn_info * conn , struct fuse_config * cfg )
402402{
403403 afc_client_t afc = NULL ;
404404
405- conn -> async_read = 0 ;
405+ conn -> want &= FUSE_CAP_ASYNC_READ ;
406406
407407 if (house_arrest ) {
408408 afc_client_new_from_house_arrest_client (house_arrest , & afc );
@@ -482,7 +482,7 @@ int ifuse_statfs(const char *path, struct statvfs *stats)
482482 return 0 ;
483483}
484484
485- int ifuse_truncate (const char * path , off_t size )
485+ int ifuse_truncate (const char * path , off_t size , struct fuse_file_info * fi )
486486{
487487 afc_client_t afc = fuse_get_context ()-> private_data ;
488488 afc_error_t err = afc_truncate (afc , path , size );
@@ -493,18 +493,6 @@ int ifuse_truncate(const char *path, off_t size)
493493 return 0 ;
494494}
495495
496- int ifuse_ftruncate (const char * path , off_t size , struct fuse_file_info * fi )
497- {
498- afc_client_t afc = fuse_get_context ()-> private_data ;
499-
500- afc_error_t err = afc_file_truncate (afc , fi -> fh , size );
501- if (err != AFC_E_SUCCESS ) {
502- int res = get_afc_error_as_errno (err );
503- return - res ;
504- }
505- return 0 ;
506- }
507-
508496int ifuse_readlink (const char * path , char * linktarget , size_t buflen )
509497{
510498 int i , ret ;
@@ -566,7 +554,7 @@ int ifuse_unlink(const char *path)
566554 return - get_afc_error_as_errno (err );
567555}
568556
569- int ifuse_rename (const char * from , const char * to )
557+ int ifuse_rename (const char * from , const char * to , unsigned int flags )
570558{
571559 afc_client_t afc = fuse_get_context ()-> private_data ;
572560
@@ -599,7 +587,6 @@ static struct fuse_operations ifuse_oper = {
599587 .read = ifuse_read ,
600588 .write = ifuse_write ,
601589 .truncate = ifuse_truncate ,
602- .ftruncate = ifuse_ftruncate ,
603590 .readlink = ifuse_readlink ,
604591 .symlink = ifuse_symlink ,
605592 .link = ifuse_link ,
0 commit comments