Adapted to ntfs-3g.1.2412

This commit is contained in:
jpandre 2008-04-14 15:49:28 +00:00
parent c2591fcd10
commit 75a9b157f3
3 changed files with 11 additions and 20 deletions

View File

@ -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;
}

View File

@ -1423,7 +1423,8 @@ ntfs_inode *ntfs_create_symlink(ntfs_inode *dir_ni, le32 securid,
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,

View File

@ -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;