hide some debug messages

This commit is contained in:
Fufu Fang 2018-07-23 03:23:15 +01:00
parent 6cbb7af9af
commit c9a1737000
1 changed files with 7 additions and 2 deletions

9
main.c
View File

@ -111,7 +111,10 @@ static int fs_readdir(const char *path, void *buf, fuse_fill_dir_t dir_add,
}
linktbl = link->next_table;
if (!linktbl) {
#ifdef HTTPDIRFS_DEBUG
fprintf(stderr, "LinkTable_new(): %s\n", link->f_url);
fflush(stderr);
#endif
linktbl = LinkTable_new(link->f_url);
if(!linktbl) {
return -ENOENT;
@ -151,13 +154,15 @@ static int fs_read(const char *path, char *buf, size_t size, off_t offset,
struct fuse_file_info *fi)
{
(void) fi;
#ifdef HTTPDIRFS_DEBUG
fprintf(stderr, "fs_read(): path: %s, offset: %ld, size: %lu\n",
path, offset, size);
fflush(stderr);
#endif
long received = Link_download(path, buf, size, offset);
#ifdef HTTPDIRFS_DEBUG
fprintf(stderr, "fs_read(): received %ld bytes.\n", received);
fflush(stderr);
#endif
return received;
}