diff --git a/.gitignore b/.gitignore index 2b751a3..0069b2a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,15 @@ -*.o -*.kate-swp +# Binaries httpdirfs +sonicfs + +# Intermediates +*.o .depend -doc/html + +# Documentation +doc + +# Editor related .vscode httpdirfs.code-workspace +*.kate-swp \ No newline at end of file diff --git a/Doxyfile b/Doxyfile index 56a01a6..44b100e 100644 --- a/Doxyfile +++ b/Doxyfile @@ -901,7 +901,7 @@ EXCLUDE_PATTERNS = # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories use the pattern */test/* -EXCLUDE_SYMBOLS = +EXCLUDE_SYMBOLS = CALLOC exit_failure # The EXAMPLE_PATH tag can be used to specify one or more files or directories # that contain example code fragments that are included (see the \include diff --git a/src/fuse_local.c b/src/fuse_local.c index a427dac..0948897 100644 --- a/src/fuse_local.c +++ b/src/fuse_local.c @@ -113,14 +113,23 @@ static int fs_open(const char *path, struct fuse_file_info *fi) return 0; } -/** \brief read the directory indicated by the path*/ +/** + * \brief read the directory indicated by the path + * \note + * - releasedir() is not implemented, because I don't see why anybody want + * the LinkTables to be evicted from the memory during the runtime of this + * program. If you want to evict LinkTables, just unmount the filesystem. + * - There is no real need to associate the LinkTable with the fi of each + * directory data structure. If you want a deep level directory, you need to + * generate the LinkTables for previous level directories. We might + * as well maintain our own tree structure. + */ static int fs_readdir(const char *path, void *buf, fuse_fill_dir_t dir_add, off_t offset, struct fuse_file_info *fi) { (void) offset; (void) fi; - Link *link; LinkTable *linktbl; if (!strcmp(path, "/")) { @@ -136,7 +145,7 @@ static int fs_readdir(const char *path, void *buf, fuse_fill_dir_t dir_add, dir_add(buf, ".", NULL, 0); dir_add(buf, "..", NULL, 0); for (int i = 1; i < linktbl->num; i++) { - link = linktbl->links[i]; + Link *link = linktbl->links[i]; if (link->type != LINK_INVALID) { dir_add(buf, link->linkname, NULL, 0); } diff --git a/src/util.c b/src/util.c index f2141bd..2ee2046 100644 --- a/src/util.c +++ b/src/util.c @@ -86,8 +86,6 @@ void Config_init(void) CONFIG.max_segbc = DEFAULT_MAX_SEGBC; /*-------------- Sonic related -------------*/ - CONFIG.sonic_mode = 0; - CONFIG.sonic_username = NULL; CONFIG.sonic_password = NULL; diff --git a/src/util.h b/src/util.h index d7c7c15..9b15cc3 100644 --- a/src/util.h +++ b/src/util.h @@ -26,11 +26,6 @@ */ #define DEFAULT_USER_AGENT "HTTPDirFS-" VERSION - - - - - /** * \brief configuration data structure * \note The opening curly bracket should be at line 39, so the code belong