Diff

Differences From Artifact [3805f48036]:

To Artifact [343214a386]:


   778    778   		return(-EIO);
   779    779   	}
   780    780   
   781    781   	fi->fh = fh;
   782    782   
   783    783   	return(0);
   784    784   }
          785  +
          786  +static int appfs_fuse_close(const char *path, struct fuse_file_info *fi) {
          787  +	int close_ret;
          788  +
          789  +	close_ret = close(fi->fh);
          790  +	if (close_ret != 0) {
          791  +		return(-EIO);
          792  +	}
          793  +
          794  +	return(0);
          795  +}
   785    796   
   786    797   static int appfs_fuse_read(const char *path, char *buf, size_t size, off_t offset, struct fuse_file_info *fi) {
   787    798   	off_t lseek_ret;
   788    799   	ssize_t read_ret;
   789    800   
   790    801   	APPFS_DEBUG("Enter (path = %s, ...)", path);
   791    802   
................................................................................
   796    807   
   797    808   	read_ret = read(fi->fh, buf, size);
   798    809   
   799    810   	return(read_ret);
   800    811   }
   801    812   
   802    813   static struct fuse_operations appfs_oper = {
   803         -	.getattr	= appfs_fuse_getattr,
   804         -	.readdir	= appfs_fuse_readdir,
   805         -	.open		= appfs_fuse_open,
   806         -	.read		= appfs_fuse_read
          814  +	.getattr   = appfs_fuse_getattr,
          815  +	.readdir   = appfs_fuse_readdir,
          816  +	.open      = appfs_fuse_open,
          817  +	.release   = appfs_fuse_close,
          818  +	.read      = appfs_fuse_read
   807    819   };
   808    820   
   809    821   int main(int argc, char **argv) {
   810    822   	const char *cachedir = APPFS_CACHEDIR;
   811    823   	char dbfilename[1024];
   812    824   	int pthread_ret, snprintf_ret, sqlite_ret;
   813    825