From 75a9b157f3525d2c6ca63ee6c2451e6f775bd3c3 Mon Sep 17 00:00:00 2001 From: jpandre Date: Mon, 14 Apr 2008 15:49:28 +0000 Subject: [PATCH] Adapted to ntfs-3g.1.2412 --- libntfs-3g/attrib.c | 2 -- libntfs-3g/dir.c | 7 ++++--- src/ntfs-3g.c | 22 +++++++--------------- 3 files changed, 11 insertions(+), 20 deletions(-) diff --git a/libntfs-3g/attrib.c b/libntfs-3g/attrib.c index 137d8048..a2a74f96 100644 --- a/libntfs-3g/attrib.c +++ b/libntfs-3g/attrib.c @@ -2653,8 +2653,6 @@ int ntfs_resident_attr_record_add(ntfs_inode *ni, ATTR_TYPES type, if (!ni || (!name && name_len)) { errno = EINVAL; - ntfs_log_perror("%s: ni=%p, name=%p, len=%d", __FUNCTION__, ni, - name, name_len); return -1; } diff --git a/libntfs-3g/dir.c b/libntfs-3g/dir.c index 4eeab822..7b75de00 100644 --- a/libntfs-3g/dir.c +++ b/libntfs-3g/dir.c @@ -1410,7 +1410,7 @@ ntfs_inode *ntfs_create(ntfs_inode *dir_ni, le32 securid, ntfschar *name, } ntfs_inode *ntfs_create_device(ntfs_inode *dir_ni, le32 securid, - ntfschar *name, u8 name_len, dev_t type, dev_t dev) + ntfschar *name, u8 name_len, dev_t type, dev_t dev) { if (type != S_IFCHR && type != S_IFBLK) { ntfs_log_error("Invalid arguments.\n"); @@ -1420,10 +1420,11 @@ ntfs_inode *ntfs_create_device(ntfs_inode *dir_ni, le32 securid, } ntfs_inode *ntfs_create_symlink(ntfs_inode *dir_ni, le32 securid, - ntfschar *name, u8 name_len, ntfschar *target, int target_len) + ntfschar *name, u8 name_len, ntfschar *target, int target_len) { if (!target || !target_len) { - ntfs_log_error("Invalid arguments.\n"); + ntfs_log_error("%s: Invalid argument (%p, %d)\n", __FUNCTION__, + target, target_len); return NULL; } return __ntfs_create(dir_ni, securid, name, name_len, S_IFLNK, 0, diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c index e9a3bdfc..f109cd93 100644 --- a/src/ntfs-3g.c +++ b/src/ntfs-3g.c @@ -438,11 +438,12 @@ static int ntfs_fuse_getattr(const char *org_path, struct stat *stbuf) * Check whether it's Interix symbolic link, block or * character device. */ - if (((size_t)na->data_size <= sizeof(INTX_FILE_TYPES) - + sizeof(ntfschar) * PATH_MAX) - && ((size_t)na->data_size > - sizeof(INTX_FILE_TYPES)) && - !stream_name_len) { + if ((size_t)na->data_size <= sizeof(INTX_FILE_TYPES) + + sizeof(ntfschar) * PATH_MAX + && (size_t)na->data_size > + sizeof(INTX_FILE_TYPES) + && !stream_name_len) { + INTX_FILE *intx_file; intx_file = ntfs_malloc(na->data_size); @@ -2511,17 +2512,8 @@ static struct fuse *mount_fuse(char *parsed_options) if (fuse_opt_add_arg(&args, "") == -1) goto err; - if (fuse_opt_add_arg(&args, "-ouse_ino,kernel_cache") == -1) + if (fuse_opt_add_arg(&args, "-ouse_ino,kernel_cache,attr_timeout=0") == -1) goto err; -#if CACHE_INODE_SIZE - /* - * JPA fuse attribute cacheing is not useful if we - * cache inodes, and this avoids hard link problems - */ - if (fuse_opt_add_arg(&args, - "-oattr_timeout=0,ac_attr_timeout=0") == -1) - goto err; -#endif if (ctx->debug) if (fuse_opt_add_arg(&args, "-odebug") == -1) goto err;