aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSpegelius <spegelius@gmail.com>2014-11-23 15:19:10 +0200
committerSpegelius <spegelius@gmail.com>2014-11-23 15:19:10 +0200
commit81b1cc26b41b25afd2d8e09dce1bad4969016066 (patch)
treecae54d79331460e923279431582bce9ef405bbeb
parent04950575c363570aefba125fb774dbf91354844a (diff)
downloadandroid_external_fuse-cm-12.0.tar.gz
android_external_fuse-cm-12.0.tar.bz2
android_external_fuse-cm-12.0.zip
- off_t is long, loff_t is long long (32bit vs. 64bit) - loff_t required by exfat at least so fuse needs to have it also Change-Id: I76a4e4cc1af9b85cd0bed2bb220723e959b1a04f
-rw-r--r--include/cuse_lowlevel.h4
-rw-r--r--include/fuse.h34
-rw-r--r--include/fuse_common.h2
-rw-r--r--include/fuse_compat.h30
-rw-r--r--include/fuse_lowlevel.h20
-rw-r--r--include/fuse_lowlevel_compat.h14
-rw-r--r--lib/buffer.c8
-rw-r--r--lib/cuse_lowlevel.c4
-rw-r--r--lib/fuse.c34
-rw-r--r--lib/fuse_lowlevel.c10
-rw-r--r--lib/modules/iconv.c12
-rw-r--r--lib/modules/subdir.c10
-rw-r--r--lib/mount_util.c2
-rw-r--r--lib/mount_util.h2
-rw-r--r--lib/ulockmgr.c4
-rw-r--r--test/test.c8
-rw-r--r--util/fusermount.c2
17 files changed, 100 insertions, 100 deletions
diff --git a/include/cuse_lowlevel.h b/include/cuse_lowlevel.h
index e147fa2..fb445a7 100644
--- a/include/cuse_lowlevel.h
+++ b/include/cuse_lowlevel.h
@@ -51,9 +51,9 @@ struct cuse_lowlevel_ops {
void (*init_done) (void *userdata);
void (*destroy) (void *userdata);
void (*open) (fuse_req_t req, struct fuse_file_info *fi);
- void (*read) (fuse_req_t req, size_t size, off_t off,
+ void (*read) (fuse_req_t req, size_t size, loff_t off,
struct fuse_file_info *fi);
- void (*write) (fuse_req_t req, const char *buf, size_t size, off_t off,
+ void (*write) (fuse_req_t req, const char *buf, size_t size, loff_t off,
struct fuse_file_info *fi);
void (*flush) (fuse_req_t req, struct fuse_file_info *fi);
void (*release) (fuse_req_t req, struct fuse_file_info *fi);
diff --git a/include/fuse.h b/include/fuse.h
index 6ad8ee7..5aba010 100644
--- a/include/fuse.h
+++ b/include/fuse.h
@@ -59,7 +59,7 @@ struct fuse_cmd;
* @return 1 if buffer is full, zero otherwise
*/
typedef int (*fuse_fill_dir_t) (void *buf, const char *name,
- const struct stat *stbuf, off_t off);
+ const struct stat *stbuf, loff_t off);
/* Used by deprecated getdir() method */
typedef struct fuse_dirhandle *fuse_dirh_t;
@@ -148,7 +148,7 @@ struct fuse_operations {
int (*chown) (const char *, uid_t, gid_t);
/** Change the size of a file */
- int (*truncate) (const char *, off_t);
+ int (*truncate) (const char *, loff_t);
/** Change the access and/or modification times of a file
*
@@ -186,7 +186,7 @@ struct fuse_operations {
*
* Changed in version 2.2
*/
- int (*read) (const char *, char *, size_t, off_t,
+ int (*read) (const char *, char *, size_t, loff_t,
struct fuse_file_info *);
/** Write data to an open file
@@ -197,7 +197,7 @@ struct fuse_operations {
*
* Changed in version 2.2
*/
- int (*write) (const char *, const char *, size_t, off_t,
+ int (*write) (const char *, const char *, size_t, loff_t,
struct fuse_file_info *);
/** Get file system statistics
@@ -304,7 +304,7 @@ struct fuse_operations {
*
* Introduced in version 2.3
*/
- int (*readdir) (const char *, void *, fuse_fill_dir_t, off_t,
+ int (*readdir) (const char *, void *, fuse_fill_dir_t, loff_t,
struct fuse_file_info *);
/** Release directory
@@ -382,7 +382,7 @@ struct fuse_operations {
*
* Introduced in version 2.5
*/
- int (*ftruncate) (const char *, off_t, struct fuse_file_info *);
+ int (*ftruncate) (const char *, loff_t, struct fuse_file_info *);
/**
* Get attributes from an open file
@@ -536,7 +536,7 @@ struct fuse_operations {
*
* Introduced in version 2.9
*/
- int (*write_buf) (const char *, struct fuse_bufvec *buf, off_t off,
+ int (*write_buf) (const char *, struct fuse_bufvec *buf, loff_t off,
struct fuse_file_info *);
/** Store data from an open file in a buffer
@@ -556,7 +556,7 @@ struct fuse_operations {
* Introduced in version 2.9
*/
int (*read_buf) (const char *, struct fuse_bufvec **bufp,
- size_t size, off_t off, struct fuse_file_info *);
+ size_t size, loff_t off, struct fuse_file_info *);
/**
* Perform BSD file locking operation
*
@@ -589,7 +589,7 @@ struct fuse_operations {
*
* Introduced in version 2.9.1
*/
- int (*fallocate) (const char *, int, off_t, off_t,
+ int (*fallocate) (const char *, int, loff_t, loff_t,
struct fuse_file_info *);
};
@@ -829,14 +829,14 @@ int fuse_fs_release(struct fuse_fs *fs, const char *path,
int fuse_fs_open(struct fuse_fs *fs, const char *path,
struct fuse_file_info *fi);
int fuse_fs_read(struct fuse_fs *fs, const char *path, char *buf, size_t size,
- off_t off, struct fuse_file_info *fi);
+ loff_t off, struct fuse_file_info *fi);
int fuse_fs_read_buf(struct fuse_fs *fs, const char *path,
- struct fuse_bufvec **bufp, size_t size, off_t off,
+ struct fuse_bufvec **bufp, size_t size, loff_t off,
struct fuse_file_info *fi);
int fuse_fs_write(struct fuse_fs *fs, const char *path, const char *buf,
- size_t size, off_t off, struct fuse_file_info *fi);
+ size_t size, loff_t off, struct fuse_file_info *fi);
int fuse_fs_write_buf(struct fuse_fs *fs, const char *path,
- struct fuse_bufvec *buf, off_t off,
+ struct fuse_bufvec *buf, loff_t off,
struct fuse_file_info *fi);
int fuse_fs_fsync(struct fuse_fs *fs, const char *path, int datasync,
struct fuse_file_info *fi);
@@ -846,7 +846,7 @@ int fuse_fs_statfs(struct fuse_fs *fs, const char *path, struct statvfs *buf);
int fuse_fs_opendir(struct fuse_fs *fs, const char *path,
struct fuse_file_info *fi);
int fuse_fs_readdir(struct fuse_fs *fs, const char *path, void *buf,
- fuse_fill_dir_t filler, off_t off,
+ fuse_fill_dir_t filler, loff_t off,
struct fuse_file_info *fi);
int fuse_fs_fsyncdir(struct fuse_fs *fs, const char *path, int datasync,
struct fuse_file_info *fi);
@@ -860,8 +860,8 @@ int fuse_fs_flock(struct fuse_fs *fs, const char *path,
struct fuse_file_info *fi, int op);
int fuse_fs_chmod(struct fuse_fs *fs, const char *path, mode_t mode);
int fuse_fs_chown(struct fuse_fs *fs, const char *path, uid_t uid, gid_t gid);
-int fuse_fs_truncate(struct fuse_fs *fs, const char *path, off_t size);
-int fuse_fs_ftruncate(struct fuse_fs *fs, const char *path, off_t size,
+int fuse_fs_truncate(struct fuse_fs *fs, const char *path, loff_t size);
+int fuse_fs_ftruncate(struct fuse_fs *fs, const char *path, loff_t size,
struct fuse_file_info *fi);
int fuse_fs_utimens(struct fuse_fs *fs, const char *path,
const struct timespec tv[2]);
@@ -887,7 +887,7 @@ int fuse_fs_poll(struct fuse_fs *fs, const char *path,
struct fuse_file_info *fi, struct fuse_pollhandle *ph,
unsigned *reventsp);
int fuse_fs_fallocate(struct fuse_fs *fs, const char *path, int mode,
- off_t offset, off_t length, struct fuse_file_info *fi);
+ loff_t offset, loff_t length, struct fuse_file_info *fi);
void fuse_fs_init(struct fuse_fs *fs, struct fuse_conn_info *conn);
void fuse_fs_destroy(struct fuse_fs *fs);
diff --git a/include/fuse_common.h b/include/fuse_common.h
index a4d980d..f08778b 100644
--- a/include/fuse_common.h
+++ b/include/fuse_common.h
@@ -372,7 +372,7 @@ struct fuse_buf {
*
* Used if FUSE_BUF_FD_SEEK flag is set.
*/
- off_t pos;
+ loff_t pos;
};
/**
diff --git a/include/fuse_compat.h b/include/fuse_compat.h
index 3bfaa25..b825dee 100644
--- a/include/fuse_compat.h
+++ b/include/fuse_compat.h
@@ -24,12 +24,12 @@ struct fuse_operations_compat25 {
int (*link) (const char *, const char *);
int (*chmod) (const char *, mode_t);
int (*chown) (const char *, uid_t, gid_t);
- int (*truncate) (const char *, off_t);
+ int (*truncate) (const char *, loff_t);
int (*utime) (const char *, struct utimbuf *);
int (*open) (const char *, struct fuse_file_info *);
- int (*read) (const char *, char *, size_t, off_t,
+ int (*read) (const char *, char *, size_t, loff_t,
struct fuse_file_info *);
- int (*write) (const char *, const char *, size_t, off_t,
+ int (*write) (const char *, const char *, size_t, loff_t,
struct fuse_file_info *);
int (*statfs) (const char *, struct statvfs *);
int (*flush) (const char *, struct fuse_file_info *);
@@ -40,7 +40,7 @@ struct fuse_operations_compat25 {
int (*listxattr) (const char *, char *, size_t);
int (*removexattr) (const char *, const char *);
int (*opendir) (const char *, struct fuse_file_info *);
- int (*readdir) (const char *, void *, fuse_fill_dir_t, off_t,
+ int (*readdir) (const char *, void *, fuse_fill_dir_t, loff_t,
struct fuse_file_info *);
int (*releasedir) (const char *, struct fuse_file_info *);
int (*fsyncdir) (const char *, int, struct fuse_file_info *);
@@ -48,7 +48,7 @@ struct fuse_operations_compat25 {
void (*destroy) (void *);
int (*access) (const char *, int);
int (*create) (const char *, mode_t, struct fuse_file_info *);
- int (*ftruncate) (const char *, off_t, struct fuse_file_info *);
+ int (*ftruncate) (const char *, loff_t, struct fuse_file_info *);
int (*fgetattr) (const char *, struct stat *, struct fuse_file_info *);
};
@@ -83,12 +83,12 @@ struct fuse_operations_compat22 {
int (*link) (const char *, const char *);
int (*chmod) (const char *, mode_t);
int (*chown) (const char *, uid_t, gid_t);
- int (*truncate) (const char *, off_t);
+ int (*truncate) (const char *, loff_t);
int (*utime) (const char *, struct utimbuf *);
int (*open) (const char *, struct fuse_file_info_compat *);
- int (*read) (const char *, char *, size_t, off_t,
+ int (*read) (const char *, char *, size_t, loff_t,
struct fuse_file_info_compat *);
- int (*write) (const char *, const char *, size_t, off_t,
+ int (*write) (const char *, const char *, size_t, loff_t,
struct fuse_file_info_compat *);
int (*statfs) (const char *, struct statfs *);
int (*flush) (const char *, struct fuse_file_info_compat *);
@@ -99,7 +99,7 @@ struct fuse_operations_compat22 {
int (*listxattr) (const char *, char *, size_t);
int (*removexattr) (const char *, const char *);
int (*opendir) (const char *, struct fuse_file_info_compat *);
- int (*readdir) (const char *, void *, fuse_fill_dir_t, off_t,
+ int (*readdir) (const char *, void *, fuse_fill_dir_t, loff_t,
struct fuse_file_info_compat *);
int (*releasedir) (const char *, struct fuse_file_info_compat *);
int (*fsyncdir) (const char *, int, struct fuse_file_info_compat *);
@@ -134,11 +134,11 @@ struct fuse_operations_compat2 {
int (*link) (const char *, const char *);
int (*chmod) (const char *, mode_t);
int (*chown) (const char *, uid_t, gid_t);
- int (*truncate) (const char *, off_t);
+ int (*truncate) (const char *, loff_t);
int (*utime) (const char *, struct utimbuf *);
int (*open) (const char *, int);
- int (*read) (const char *, char *, size_t, off_t);
- int (*write) (const char *, const char *, size_t, off_t);
+ int (*read) (const char *, char *, size_t, loff_t);
+ int (*write) (const char *, const char *, size_t, loff_t);
int (*statfs) (const char *, struct statfs *);
int (*flush) (const char *);
int (*release) (const char *, int);
@@ -182,11 +182,11 @@ struct fuse_operations_compat1 {
int (*link) (const char *, const char *);
int (*chmod) (const char *, mode_t);
int (*chown) (const char *, uid_t, gid_t);
- int (*truncate) (const char *, off_t);
+ int (*truncate) (const char *, loff_t);
int (*utime) (const char *, struct utimbuf *);
int (*open) (const char *, int);
- int (*read) (const char *, char *, size_t, off_t);
- int (*write) (const char *, const char *, size_t, off_t);
+ int (*read) (const char *, char *, size_t, loff_t);
+ int (*write) (const char *, const char *, size_t, loff_t);
int (*statfs) (struct fuse_statfs_compat1 *);
int (*release) (const char *, int);
int (*fsync) (const char *, int);
diff --git a/include/fuse_lowlevel.h b/include/fuse_lowlevel.h
index 2036717..3ba3b4c 100644
--- a/include/fuse_lowlevel.h
+++ b/include/fuse_lowlevel.h
@@ -462,7 +462,7 @@ struct fuse_lowlevel_ops {
* @param off offset to read from
* @param fi file information
*/
- void (*read) (fuse_req_t req, fuse_ino_t ino, size_t size, off_t off,
+ void (*read) (fuse_req_t req, fuse_ino_t ino, size_t size, loff_t off,
struct fuse_file_info *fi);
/**
@@ -489,7 +489,7 @@ struct fuse_lowlevel_ops {
* @param fi file information
*/
void (*write) (fuse_req_t req, fuse_ino_t ino, const char *buf,
- size_t size, off_t off, struct fuse_file_info *fi);
+ size_t size, loff_t off, struct fuse_file_info *fi);
/**
* Flush method
@@ -612,7 +612,7 @@ struct fuse_lowlevel_ops {
* @param off offset to continue reading the directory stream
* @param fi file information
*/
- void (*readdir) (fuse_req_t req, fuse_ino_t ino, size_t size, off_t off,
+ void (*readdir) (fuse_req_t req, fuse_ino_t ino, size_t size, loff_t off,
struct fuse_file_info *fi);
/**
@@ -941,7 +941,7 @@ struct fuse_lowlevel_ops {
* @param fi file information
*/
void (*write_buf) (fuse_req_t req, fuse_ino_t ino,
- struct fuse_bufvec *bufv, off_t off,
+ struct fuse_bufvec *bufv, loff_t off,
struct fuse_file_info *fi);
/**
@@ -959,7 +959,7 @@ struct fuse_lowlevel_ops {
* @param bufv the buffer containing the returned data
*/
void (*retrieve_reply) (fuse_req_t req, void *cookie, fuse_ino_t ino,
- off_t offset, struct fuse_bufvec *bufv);
+ loff_t offset, struct fuse_bufvec *bufv);
/**
* Forget about multiple inodes
@@ -1015,7 +1015,7 @@ struct fuse_lowlevel_ops {
* see fallocate(2)
*/
void (*fallocate) (fuse_req_t req, fuse_ino_t ino, int mode,
- off_t offset, off_t length, struct fuse_file_info *fi);
+ loff_t offset, loff_t length, struct fuse_file_info *fi);
};
/**
@@ -1249,7 +1249,7 @@ int fuse_reply_bmap(fuse_req_t req, uint64_t idx);
*/
size_t fuse_add_direntry(fuse_req_t req, char *buf, size_t bufsize,
const char *name, const struct stat *stbuf,
- off_t off);
+ loff_t off);
/**
* Reply to ask for data fetch and output buffer preparation. ioctl
@@ -1329,7 +1329,7 @@ int fuse_lowlevel_notify_poll(struct fuse_pollhandle *ph);
* @return zero for success, -errno for failure
*/
int fuse_lowlevel_notify_inval_inode(struct fuse_chan *ch, fuse_ino_t ino,
- off_t off, off_t len);
+ loff_t off, loff_t len);
/**
* Notify to invalidate parent attributes and the dentry matching
@@ -1382,7 +1382,7 @@ int fuse_lowlevel_notify_delete(struct fuse_chan *ch,
* @return zero for success, -errno for failure
*/
int fuse_lowlevel_notify_store(struct fuse_chan *ch, fuse_ino_t ino,
- off_t offset, struct fuse_bufvec *bufv,
+ loff_t offset, struct fuse_bufvec *bufv,
enum fuse_buf_copy_flags flags);
/**
* Retrieve data from the kernel buffers
@@ -1410,7 +1410,7 @@ int fuse_lowlevel_notify_store(struct fuse_chan *ch, fuse_ino_t ino,
* @return zero for success, -errno for failure
*/
int fuse_lowlevel_notify_retrieve(struct fuse_chan *ch, fuse_ino_t ino,
- size_t size, off_t offset, void *cookie);
+ size_t size, loff_t offset, void *cookie);
/* ----------------------------------------------------------- *
diff --git a/include/fuse_lowlevel_compat.h b/include/fuse_lowlevel_compat.h
index 4fff57a..f13adbd 100644
--- a/include/fuse_lowlevel_compat.h
+++ b/include/fuse_lowlevel_compat.h
@@ -35,10 +35,10 @@ struct fuse_lowlevel_ops_compat25 {
const char *newname);
void (*open) (fuse_req_t req, fuse_ino_t ino,
struct fuse_file_info *fi);
- void (*read) (fuse_req_t req, fuse_ino_t ino, size_t size, off_t off,
+ void (*read) (fuse_req_t req, fuse_ino_t ino, size_t size, loff_t off,
struct fuse_file_info *fi);
void (*write) (fuse_req_t req, fuse_ino_t ino, const char *buf,
- size_t size, off_t off, struct fuse_file_info *fi);
+ size_t size, loff_t off, struct fuse_file_info *fi);
void (*flush) (fuse_req_t req, fuse_ino_t ino,
struct fuse_file_info *fi);
void (*release) (fuse_req_t req, fuse_ino_t ino,
@@ -47,7 +47,7 @@ struct fuse_lowlevel_ops_compat25 {
struct fuse_file_info *fi);
void (*opendir) (fuse_req_t req, fuse_ino_t ino,
struct fuse_file_info *fi);
- void (*readdir) (fuse_req_t req, fuse_ino_t ino, size_t size, off_t off,
+ void (*readdir) (fuse_req_t req, fuse_ino_t ino, size_t size, loff_t off,
struct fuse_file_info *fi);
void (*releasedir) (fuse_req_t req, fuse_ino_t ino,
struct fuse_file_info *fi);
@@ -72,7 +72,7 @@ struct fuse_session *fuse_lowlevel_new_compat25(struct fuse_args *args,
size_t fuse_dirent_size(size_t namelen);
char *fuse_add_dirent(char *buf, const char *name, const struct stat *stbuf,
- off_t off);
+ loff_t off);
#if !defined(__FreeBSD__) && !defined(__NetBSD__)
@@ -102,10 +102,10 @@ struct fuse_lowlevel_ops_compat {
const char *newname);
void (*open) (fuse_req_t req, fuse_ino_t ino,
struct fuse_file_info_compat *fi);
- void (*read) (fuse_req_t req, fuse_ino_t ino, size_t size, off_t off,
+ void (*read) (fuse_req_t req, fuse_ino_t ino, size_t size, loff_t off,
struct fuse_file_info_compat *fi);
void (*write) (fuse_req_t req, fuse_ino_t ino, const char *buf,
- size_t size, off_t off, struct fuse_file_info_compat *fi);
+ size_t size, loff_t off, struct fuse_file_info_compat *fi);
void (*flush) (fuse_req_t req, fuse_ino_t ino,
struct fuse_file_info_compat *fi);
void (*release) (fuse_req_t req, fuse_ino_t ino,
@@ -114,7 +114,7 @@ struct fuse_lowlevel_ops_compat {
struct fuse_file_info_compat *fi);
void (*opendir) (fuse_req_t req, fuse_ino_t ino,
struct fuse_file_info_compat *fi);
- void (*readdir) (fuse_req_t req, fuse_ino_t ino, size_t size, off_t off,
+ void (*readdir) (fuse_req_t req, fuse_ino_t ino, size_t size, loff_t off,
struct fuse_file_info_compat *fi);
void (*releasedir) (fuse_req_t req, fuse_ino_t ino,
struct fuse_file_info_compat *fi);
diff --git a/lib/buffer.c b/lib/buffer.c
index 0078e11..6fa55c9 100644
--- a/lib/buffer.c
+++ b/lib/buffer.c
@@ -160,10 +160,10 @@ static ssize_t fuse_buf_splice(const struct fuse_buf *dst, size_t dst_off,
size_t len, enum fuse_buf_copy_flags flags)
{
int splice_flags = 0;
- off_t *srcpos = NULL;
- off_t *dstpos = NULL;
- off_t srcpos_val;
- off_t dstpos_val;
+ loff_t *srcpos = NULL;
+ loff_t *dstpos = NULL;
+ loff_t srcpos_val;
+ loff_t dstpos_val;
ssize_t res;
size_t copied = 0;
diff --git a/lib/cuse_lowlevel.c b/lib/cuse_lowlevel.c
index 402cf4b..ae08ed4 100644
--- a/lib/cuse_lowlevel.c
+++ b/lib/cuse_lowlevel.c
@@ -43,14 +43,14 @@ static void cuse_fll_open(fuse_req_t req, fuse_ino_t ino,
}
static void cuse_fll_read(fuse_req_t req, fuse_ino_t ino, size_t size,
- off_t off, struct fuse_file_info *fi)
+ loff_t off, struct fuse_file_info *fi)
{
(void)ino;
req_clop(req)->read(req, size, off, fi);
}
static void cuse_fll_write(fuse_req_t req, fuse_ino_t ino, const char *buf,
- size_t size, off_t off, struct fuse_file_info *fi)
+ size_t size, loff_t off, struct fuse_file_info *fi)
{
(void)ino;
req_clop(req)->write(req, buf, size, off, fi);
diff --git a/lib/fuse.c b/lib/fuse.c
index 913f190..9bdedec 100644
--- a/lib/fuse.c
+++ b/lib/fuse.c
@@ -159,8 +159,8 @@ struct fuse {
struct lock {
int type;
- off_t start;
- off_t end;
+ loff_t start;
+ loff_t end;
pid_t pid;
uint64_t owner;
struct lock *next;
@@ -178,7 +178,7 @@ struct node {
int open_count;
struct timespec stat_updated;
struct timespec mtime;
- off_t size;
+ loff_t size;
struct lock *locks;
unsigned int is_hidden : 1;
unsigned int cache_valid : 1;
@@ -1765,7 +1765,7 @@ static void fuse_free_buf(struct fuse_bufvec *buf)
}
int fuse_fs_read_buf(struct fuse_fs *fs, const char *path,
- struct fuse_bufvec **bufp, size_t size, off_t off,
+ struct fuse_bufvec **bufp, size_t size, loff_t off,
struct fuse_file_info *fi)
{
fuse_get_context()->private_data = fs->user_data;
@@ -1820,7 +1820,7 @@ int fuse_fs_read_buf(struct fuse_fs *fs, const char *path,
}
int fuse_fs_read(struct fuse_fs *fs, const char *path, char *mem, size_t size,
- off_t off, struct fuse_file_info *fi)
+ loff_t off, struct fuse_file_info *fi)
{
int res;
struct fuse_bufvec *buf = NULL;
@@ -1838,7 +1838,7 @@ int fuse_fs_read(struct fuse_fs *fs, const char *path, char *mem, size_t size,
}
int fuse_fs_write_buf(struct fuse_fs *fs, const char *path,
- struct fuse_bufvec *buf, off_t off,
+ struct fuse_bufvec *buf, loff_t off,
struct fuse_file_info *fi)
{
fuse_get_context()->private_data = fs->user_data;
@@ -1902,7 +1902,7 @@ out:
}
int fuse_fs_write(struct fuse_fs *fs, const char *path, const char *mem,
- size_t size, off_t off, struct fuse_file_info *fi)
+ size_t size, loff_t off, struct fuse_file_info *fi)
{
struct fuse_bufvec bufv = FUSE_BUFVEC_INIT(size);
@@ -2001,7 +2001,7 @@ static int fill_dir_old(struct fuse_dirhandle *dh, const char *name, int type,
}
int fuse_fs_readdir(struct fuse_fs *fs, const char *path, void *buf,
- fuse_fill_dir_t filler, off_t off,
+ fuse_fill_dir_t filler, loff_t off,
struct fuse_file_info *fi)
{
fuse_get_context()->private_data = fs->user_data;
@@ -2112,7 +2112,7 @@ int fuse_fs_chown(struct fuse_fs *fs, const char *path, uid_t uid, gid_t gid)
}
}
-int fuse_fs_truncate(struct fuse_fs *fs, const char *path, off_t size)
+int fuse_fs_truncate(struct fuse_fs *fs, const char *path, loff_t size)
{
fuse_get_context()->private_data = fs->user_data;
if (fs->op.truncate) {
@@ -2126,7 +2126,7 @@ int fuse_fs_truncate(struct fuse_fs *fs, const char *path, off_t size)
}
}
-int fuse_fs_ftruncate(struct fuse_fs *fs, const char *path, off_t size,
+int fuse_fs_ftruncate(struct fuse_fs *fs, const char *path, loff_t size,
struct fuse_file_info *fi)
{
fuse_get_context()->private_data = fs->user_data;
@@ -2344,7 +2344,7 @@ int fuse_fs_poll(struct fuse_fs *fs, const char *path,
}
int fuse_fs_fallocate(struct fuse_fs *fs, const char *path, int mode,
- off_t offset, off_t length, struct fuse_file_info *fi)
+ loff_t offset, loff_t length, struct fuse_file_info *fi)
{
fuse_get_context()->private_data = fs->user_data;
if (fs->op.fallocate) {
@@ -3245,7 +3245,7 @@ static void fuse_lib_open(fuse_req_t req, fuse_ino_t ino,
}
static void fuse_lib_read(fuse_req_t req, fuse_ino_t ino, size_t size,
- off_t off, struct fuse_file_info *fi)
+ loff_t off, struct fuse_file_info *fi)
{
struct fuse *f = req_fuse_prepare(req);
struct fuse_bufvec *buf = NULL;
@@ -3271,7 +3271,7 @@ static void fuse_lib_read(fuse_req_t req, fuse_ino_t ino, size_t size,
}
static void fuse_lib_write_buf(fuse_req_t req, fuse_ino_t ino,
- struct fuse_bufvec *buf, off_t off,
+ struct fuse_bufvec *buf, loff_t off,
struct fuse_file_info *fi)
{
struct fuse *f = req_fuse_prepare(req);
@@ -3400,7 +3400,7 @@ static int extend_contents(struct fuse_dh *dh, unsigned minsize)
}
static int fill_dir(void *dh_, const char *name, const struct stat *statp,
- off_t off)
+ loff_t off)
{
struct fuse_dh *dh = (struct fuse_dh *) dh_;
struct stat stbuf;
@@ -3450,7 +3450,7 @@ static int fill_dir(void *dh_, const char *name, const struct stat *statp,
}
static int readdir_fill(struct fuse *f, fuse_req_t req, fuse_ino_t ino,
- size_t size, off_t off, struct fuse_dh *dh,
+ size_t size, loff_t off, struct fuse_dh *dh,
struct fuse_file_info *fi)
{
char *path;
@@ -3482,7 +3482,7 @@ static int readdir_fill(struct fuse *f, fuse_req_t req, fuse_ino_t ino,
}
static void fuse_lib_readdir(fuse_req_t req, fuse_ino_t ino, size_t size,
- off_t off, struct fuse_file_info *llfi)
+ loff_t off, struct fuse_file_info *llfi)
{
struct fuse *f = req_fuse_prepare(req);
struct fuse_file_info fi;
@@ -4072,7 +4072,7 @@ static void fuse_lib_poll(fuse_req_t req, fuse_ino_t ino,
}
static void fuse_lib_fallocate(fuse_req_t req, fuse_ino_t ino, int mode,
- off_t offset, off_t length, struct fuse_file_info *fi)
+ loff_t offset, loff_t length, struct fuse_file_info *fi)
{
struct fuse *f = req_fuse_prepare(req);
struct fuse_intr_data d;
diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c
index 01efc6a..48501bf 100644
--- a/lib/fuse_lowlevel.c
+++ b/lib/fuse_lowlevel.c
@@ -247,7 +247,7 @@ size_t fuse_dirent_size(size_t namelen)
}
char *fuse_add_dirent(char *buf, const char *name, const struct stat *stbuf,
- off_t off)
+ loff_t off)
{
unsigned namelen = strlen(name);
unsigned entlen = FUSE_NAME_OFFSET + namelen;
@@ -267,7 +267,7 @@ char *fuse_add_dirent(char *buf, const char *name, const struct stat *stbuf,
}
size_t fuse_add_direntry(fuse_req_t req, char *buf, size_t bufsize,
- const char *name, const struct stat *stbuf, off_t off)
+ const char *name, const struct stat *stbuf, loff_t off)
{
size_t entsize;
@@ -1979,7 +1979,7 @@ int fuse_lowlevel_notify_poll(struct fuse_pollhandle *ph)
}
int fuse_lowlevel_notify_inval_inode(struct fuse_chan *ch, fuse_ino_t ino,
- off_t off, off_t len)
+ loff_t off, loff_t len)
{
struct fuse_notify_inval_inode_out outarg;
struct fuse_ll *f;
@@ -2060,7 +2060,7 @@ int fuse_lowlevel_notify_delete(struct fuse_chan *ch,
}
int fuse_lowlevel_notify_store(struct fuse_chan *ch, fuse_ino_t ino,
- off_t offset, struct fuse_bufvec *bufv,
+ loff_t offset, struct fuse_bufvec *bufv,
enum fuse_buf_copy_flags flags)
{
struct fuse_out_header out;
@@ -2144,7 +2144,7 @@ out:
}
int fuse_lowlevel_notify_retrieve(struct fuse_chan *ch, fuse_ino_t ino,
- size_t size, off_t offset, void *cookie)
+ size_t size, loff_t offset, void *cookie)
{
struct fuse_notify_retrieve_out outarg;
struct fuse_ll *f;
diff --git a/lib/modules/iconv.c b/lib/modules/iconv.c
index 89b22e4..9b78cfd 100644
--- a/lib/modules/iconv.c
+++ b/lib/modules/iconv.c
@@ -170,7 +170,7 @@ static int iconv_opendir(const char *path, struct fuse_file_info *fi)
}
static int iconv_dir_fill(void *buf, const char *name,
- const struct stat *stbuf, off_t off)
+ const struct stat *stbuf, loff_t off)
{
struct iconv_dh *dh = buf;
char *newname;
@@ -183,7 +183,7 @@ static int iconv_dir_fill(void *buf, const char *name,
}
static int iconv_readdir(const char *path, void *buf, fuse_fill_dir_t filler,
- off_t offset, struct fuse_file_info *fi)
+ loff_t offset, struct fuse_file_info *fi)
{
struct iconv *ic = iconv_get();
char *newpath;
@@ -335,7 +335,7 @@ static int iconv_chown(const char *path, uid_t uid, gid_t gid)
return err;
}
-static int iconv_truncate(const char *path, off_t size)
+static int iconv_truncate(const char *path, loff_t size)
{
struct iconv *ic = iconv_get();
char *newpath;
@@ -347,7 +347,7 @@ static int iconv_truncate(const char *path, off_t size)
return err;
}
-static int iconv_ftruncate(const char *path, off_t size,
+static int iconv_ftruncate(const char *path, loff_t size,
struct fuse_file_info *fi)
{
struct iconv *ic = iconv_get();
@@ -398,7 +398,7 @@ static int iconv_open_file(const char *path, struct fuse_file_info *fi)
}
static int iconv_read_buf(const char *path, struct fuse_bufvec **bufp,
- size_t size, off_t offset, struct fuse_file_info *fi)
+ size_t size, loff_t offset, struct fuse_file_info *fi)
{
struct iconv *ic = iconv_get();
char *newpath;
@@ -411,7 +411,7 @@ static int iconv_read_buf(const char *path, struct fuse_bufvec **bufp,
}
static int iconv_write_buf(const char *path, struct fuse_bufvec *buf,
- off_t offset, struct fuse_file_info *fi)
+ loff_t offset, struct fuse_file_info *fi)
{
struct iconv *ic = iconv_get();
char *newpath;
diff --git a/lib/modules/subdir.c b/lib/modules/subdir.c
index 76a53fa..05b3379 100644
--- a/lib/modules/subdir.c
+++ b/lib/modules/subdir.c
@@ -178,7 +178,7 @@ static int subdir_opendir(const char *path, struct fuse_file_info *fi)
}
static int subdir_readdir(const char *path, void *buf,
- fuse_fill_dir_t filler, off_t offset,
+ fuse_fill_dir_t filler, loff_t offset,
struct fuse_file_info *fi)
{
struct subdir *d = subdir_get();
@@ -322,7 +322,7 @@ static int subdir_chown(const char *path, uid_t uid, gid_t gid)
return err;
}
-static int subdir_truncate(const char *path, off_t size)
+static int subdir_truncate(const char *path, loff_t size)
{
struct subdir *d = subdir_get();
char *newpath;
@@ -334,7 +334,7 @@ static int subdir_truncate(const char *path, off_t size)
return err;
}
-static int subdir_ftruncate(const char *path, off_t size,
+static int subdir_ftruncate(const char *path, loff_t size,
struct fuse_file_info *fi)
{
struct subdir *d = subdir_get();
@@ -385,7 +385,7 @@ static int subdir_open(const char *path, struct fuse_file_info *fi)
}
static int subdir_read_buf(const char *path, struct fuse_bufvec **bufp,
- size_t size, off_t offset, struct fuse_file_info *fi)
+ size_t size, loff_t offset, struct fuse_file_info *fi)
{
struct subdir *d = subdir_get();
char *newpath;
@@ -398,7 +398,7 @@ static int subdir_read_buf(const char *path, struct fuse_bufvec **bufp,
}
static int subdir_write_buf(const char *path, struct fuse_bufvec *buf,
- off_t offset, struct fuse_file_info *fi)
+ loff_t offset, struct fuse_file_info *fi)
{
struct subdir *d = subdir_get();
char *newpath;
diff --git a/lib/mount_util.c b/lib/mount_util.c
index e8bd538..080ab3a 100644
--- a/lib/mount_util.c
+++ b/lib/mount_util.c
@@ -306,7 +306,7 @@ char *fuse_mnt_resolve_path(const char *progname, const char *orig)
}
int fuse_mnt_check_empty(const char *progname, const char *mnt,
- mode_t rootmode, off_t rootsize)
+ mode_t rootmode, loff_t rootsize)
{
int isempty = 1;
diff --git a/lib/mount_util.h b/lib/mount_util.h
index dc5c916..0e0f564 100644
--- a/lib/mount_util.h
+++ b/lib/mount_util.h
@@ -15,5 +15,5 @@ int fuse_mnt_umount(const char *progname, const char *abs_mnt,
const char *rel_mnt, int lazy);
char *fuse_mnt_resolve_path(const char *progname, const char *orig);
int fuse_mnt_check_empty(const char *progname, const char *mnt,
- mode_t rootmode, off_t rootsize);
+ mode_t rootmode, loff_t rootsize);
int fuse_mnt_check_fuseblk(void);
diff --git a/lib/ulockmgr.c b/lib/ulockmgr.c
index b875c50..ebd68c6 100644
--- a/lib/ulockmgr.c
+++ b/lib/ulockmgr.c
@@ -356,10 +356,10 @@ static uint32_t owner_hash(const unsigned char *id, size_t id_len)
static int ulockmgr_canonicalize(int fd, struct flock *lock)
{
- off_t offset;
+ loff_t offset;
if (lock->l_whence == SEEK_CUR) {
offset = lseek(fd, 0, SEEK_CUR);
- if (offset == (off_t) -1)
+ if (offset == (loff_t) -1)
return -errno;
} else if (lock->l_whence == SEEK_END) {
struct stat stbuf;
diff --git a/test/test.c b/test/test.c
index c421cda..10ed45a 100644
--- a/test/test.c
+++ b/test/test.c
@@ -286,7 +286,7 @@ static int check_data(const char *path, const char *data, int offset,
PERROR("open");
return -1;
}
- if (lseek(fd, offset, SEEK_SET) == (off_t) -1) {
+ if (lseek(fd, offset, SEEK_SET) == (loff_t) -1) {
PERROR("lseek");
close(fd);
return -1;
@@ -324,7 +324,7 @@ static int fcheck_data(int fd, const char *data, int offset,
{
char buf[4096];
int res;
- if (lseek(fd, offset, SEEK_SET) == (off_t) -1) {
+ if (lseek(fd, offset, SEEK_SET) == (loff_t) -1) {
PERROR("lseek");
return -1;
}
@@ -829,7 +829,7 @@ static int do_test_open(int exist, int flags, const char *flags_str, int mode)
int err = 0;
int res;
int fd;
- off_t off;
+ loff_t off;
start_test("open(%s, %s, 0%03o)", exist ? "+" : "-", flags_str, mode);
unlink(testfile);
@@ -910,7 +910,7 @@ static int do_test_open(int exist, int flags, const char *flags_str, int mode)
}
}
off = lseek(fd, SEEK_SET, 0);
- if (off == (off_t) -1) {
+ if (off == (loff_t) -1) {
PERROR("lseek");
err--;
} else if (off != 0) {
diff --git a/util/fusermount.c b/util/fusermount.c
index b2e87d9..ed11185 100644
--- a/util/fusermount.c
+++ b/util/fusermount.c
@@ -713,7 +713,7 @@ static int get_string_opt(const char *s, unsigned len, const char *opt,
static int do_mount(const char *mnt, char **typep, mode_t rootmode,
int fd, const char *opts, const char *dev, char **sourcep,
- char **mnt_optsp, off_t rootsize)
+ char **mnt_optsp, loff_t rootsize)
{
int res;
int flags = MS_NOSUID | MS_NODEV;