Skip to content

Commit ad34ae0

Browse files
committed
updated support from libfuse2 to libfuse3
1 parent 63c03a5 commit ad34ae0

5 files changed

Lines changed: 33 additions & 25 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
- name: Install dependencies
5454
run: |
5555
sudo apt-get update
56-
sudo apt-get install libgumbo-dev libfuse-dev libssl-dev \
56+
sudo apt-get install libgumbo-dev libfuse3-dev libssl-dev \
5757
libcurl4-openssl-dev uuid-dev help2man libexpat1-dev pkg-config \
5858
meson
5959

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ For important development related documentation, please refer
5454
Under Debian 12 "Bookworm" and newer versions, you need the following
5555
dependencies:
5656

57-
libgumbo-dev libfuse-dev libssl-dev libcurl4-openssl-dev uuid-dev help2man
57+
libgumbo-dev libfuse3-dev libssl-dev libcurl4-openssl-dev uuid-dev help2man
5858
libexpat1-dev pkg-config meson
5959

6060
You can then compile the program similar to how you compile a typical program
@@ -72,6 +72,10 @@ To uninstall the program, do the following:
7272

7373
sudo ninja uninstall
7474

75+
To clean the build directory, run:
76+
77+
ninja clean
78+
7579
For more information, please refer to this
7680
[tutorial](https://mesonbuild.com/Tutorial.html).
7781

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ c_args = [
3030

3131
gumbo_dep = dependency('gumbo')
3232
libcurl_dep = dependency('libcurl')
33-
fuse_dep = dependency('fuse')
33+
fuse_dep = dependency('fuse3')
3434
uuid_dep = dependency('uuid')
3535
expat_dep = dependency('expat')
3636
openssl_dep = dependency('openssl')

src/fuse_local.c

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,17 @@
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
*/
139142
static int
140143
fs_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

src/link.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -504,21 +504,21 @@ static void LinkTable_fill(LinkTable *linktbl)
504504
LinkTable_uninitialised_fill(linktbl);
505505
}
506506

507-
/**
508-
* \brief Reset invalid links in the link table
509-
*/
510-
static void LinkTable_invalid_reset(LinkTable *linktbl)
511-
{
512-
int j = 0;
513-
for (int i = 0; i < linktbl->num; i++) {
514-
Link *this_link = linktbl->links[i];
515-
if (this_link->type == LINK_INVALID) {
516-
this_link->type = LINK_UNINITIALISED_FILE;
517-
j++;
518-
}
519-
}
520-
lprintf(debug, "%d invalid links\n", j);
521-
}
507+
// /**
508+
// * \brief Reset invalid links in the link table
509+
// */
510+
// static void LinkTable_invalid_reset(LinkTable *linktbl)
511+
// {
512+
// int j = 0;
513+
// for (int i = 0; i < linktbl->num; i++) {
514+
// Link *this_link = linktbl->links[i];
515+
// if (this_link->type == LINK_INVALID) {
516+
// this_link->type = LINK_UNINITIALISED_FILE;
517+
// j++;
518+
// }
519+
// }
520+
// lprintf(debug, "%d invalid links\n", j);
521+
// }
522522

523523
void LinkTable_free(LinkTable *linktbl)
524524
{

0 commit comments

Comments
 (0)