mirror of
https://github.com/TurboGit/hubicfuse.git
synced 2026-08-01 18:32:23 +02:00
Fix use of fd in debug_print_descriptor
This commit is contained in:
@@ -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
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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[],
|
||||
|
||||
Reference in New Issue
Block a user