From cbca88095dc76d991be1e72056a2eb5bed70f821 Mon Sep 17 00:00:00 2001 From: jpandre Date: Sun, 21 Sep 2008 17:27:21 +0000 Subject: [PATCH] Fixed type of argument for file creation --- include/ntfs-3g/dir.h | 4 ++-- libntfs-3g/dir.c | 6 +++--- src/ntfs-3g.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/ntfs-3g/dir.h b/include/ntfs-3g/dir.h index 3905970c..68e47b3c 100644 --- a/include/ntfs-3g/dir.h +++ b/include/ntfs-3g/dir.h @@ -65,9 +65,9 @@ extern u64 ntfs_inode_lookup_by_name(ntfs_inode *dir_ni, extern ntfs_inode *ntfs_pathname_to_inode(ntfs_volume *vol, ntfs_inode *parent, const char *pathname); extern ntfs_inode *ntfs_create(ntfs_inode *dir_ni, le32 securid, - ntfschar *name, u8 name_len, dev_t type); + ntfschar *name, u8 name_len, mode_t type); extern 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, mode_t type, dev_t dev); extern ntfs_inode *ntfs_create_symlink(ntfs_inode *dir_ni, le32 securid, ntfschar *name, u8 name_len, ntfschar *target, int target_len); extern int ntfs_check_empty_dir(ntfs_inode *ni); diff --git a/libntfs-3g/dir.c b/libntfs-3g/dir.c index 2377efdc..e2ed1a43 100644 --- a/libntfs-3g/dir.c +++ b/libntfs-3g/dir.c @@ -1153,7 +1153,7 @@ err_out: * on error with errno set to the error code. */ static ntfs_inode *__ntfs_create(ntfs_inode *dir_ni, le32 securid, - ntfschar *name, u8 name_len, dev_t type, dev_t dev, + ntfschar *name, u8 name_len, mode_t type, dev_t dev, ntfschar *target, int target_len) { ntfs_inode *ni; @@ -1396,7 +1396,7 @@ err_out: */ ntfs_inode *ntfs_create(ntfs_inode *dir_ni, le32 securid, ntfschar *name, - u8 name_len, dev_t type) + u8 name_len, mode_t type) { if (type != S_IFREG && type != S_IFDIR && type != S_IFIFO && type != S_IFSOCK) { @@ -1407,7 +1407,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, mode_t type, dev_t dev) { if (type != S_IFCHR && type != S_IFBLK) { ntfs_log_error("Invalid arguments.\n"); diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c index e52bef24..4c164442 100644 --- a/src/ntfs-3g.c +++ b/src/ntfs-3g.c @@ -1072,7 +1072,7 @@ static int ntfs_fuse_access(const char *path, int type) #endif -static int ntfs_fuse_create(const char *org_path, dev_t typemode, dev_t dev, +static int ntfs_fuse_create(const char *org_path, mode_t typemode, dev_t dev, const char *target) { char *name; @@ -1083,7 +1083,7 @@ static int ntfs_fuse_create(const char *org_path, dev_t typemode, dev_t dev, char *path; ntfschar *stream_name; int stream_name_len; - dev_t type = typemode & ~07777; + mode_t type = typemode & ~07777; mode_t perm; struct SECURITY_CONTEXT security; int res = 0, uname_len, utarget_len;