Fix use of fd in debug_print_descriptor

This commit is contained in:
Pascal Obry
2016-06-13 19:41:10 +02:00
parent 16bdc5a9d0
commit 7f79da96c5
3 changed files with 10 additions and 9 deletions
-6
View File
@@ -32,12 +32,6 @@ extern bool option_enable_chown;
extern bool option_enable_chmod;
extern size_t file_buffer_size;
typedef struct
{
int fd;
int flags;
} openfile;
static int cfs_getattr(const char* path, struct stat* stbuf)
{
debugf(DBG_LEVEL_NORM, KBLU "cfs_getattr(%s)", path);
+4 -3
View File
@@ -237,9 +237,10 @@ void debug_print_flags(int flags)
void debug_print_descriptor(struct fuse_file_info* info)
{
char file_path[MAX_PATH_SIZE];
get_file_path_from_fd(info->fh, file_path, sizeof(file_path));
debugf(DBG_LEVEL_EXT, KCYN "descriptor localfile=[%s] fd=%d", file_path,
info->fh);
openfile* of = (openfile *)info->fh;
get_file_path_from_fd(of->fd, file_path, sizeof(file_path));
debugf(DBG_LEVEL_EXT, KCYN "descriptor localfile=[%s] fd=%lld", file_path,
of->fd);
debug_print_flags(info->flags);
}
+6
View File
@@ -80,6 +80,12 @@ typedef struct dir_cache
struct dir_cache* next, *prev;
} dir_cache;
typedef struct
{
int fd;
int flags;
} openfile;
time_t my_timegm(struct tm* tm);
time_t get_time_from_str_as_gmt(char* time_str);
time_t get_time_as_local(time_t time_t_val, char time_str[],