mirror of
https://git.code.sf.net/p/ntfs-3g/ntfs-3g.git
synced 2024-11-23 10:04:00 +08:00
Adapted to ntfs-3g.1.2412
This commit is contained in:
parent
c2591fcd10
commit
75a9b157f3
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user