Skip to content

Commit cf21ccd

Browse files
committed
use off64_t instead of loff_t
1 parent 2cf5333 commit cf21ccd

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

open-vm-tools/vmhgfs-fuse/file.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ static int
547547
HgfsDoRead(HgfsHandle handle, // IN: Handle for this file
548548
char *buf, // OUT: Buffer to copy data into
549549
size_t count, // IN: Number of bytes to read
550-
loff_t offset) // IN: Offset at which to read
550+
off64_t offset) // IN: Offset at which to read
551551
{
552552
HgfsReq *req;
553553
HgfsOp opUsed;
@@ -708,11 +708,11 @@ ssize_t
708708
HgfsRead(struct fuse_file_info *fi, // IN: File info struct
709709
char *buf, // OUT: User buffer to copy data into
710710
size_t count, // IN: Number of bytes to read
711-
loff_t offset) // IN: Offset at which to read
711+
off64_t offset) // IN: Offset at which to read
712712
{
713713
int result = 0;
714714
char *buffer = buf;
715-
loff_t curOffset = offset;
715+
off64_t curOffset = offset;
716716
size_t nextCount, remainingCount = count;
717717
uint32 maxIOSize = HgfsMaxIOSize();
718718

@@ -769,7 +769,7 @@ static int
769769
HgfsDoWrite(HgfsHandle handle, // IN: Handle for the file
770770
const char *buf, // IN: Buffer containing data
771771
size_t count, // IN: Number of bytes to write
772-
loff_t offset) // IN: Offset to begin writing at
772+
off64_t offset) // IN: Offset to begin writing at
773773
{
774774
HgfsReq *req;
775775
int result = 0;
@@ -893,11 +893,11 @@ ssize_t
893893
HgfsWrite(struct fuse_file_info *fi, // IN: File info structure
894894
const char *buf, // OUT: User buffer to copy data into
895895
size_t count, // IN: Number of bytes to read
896-
loff_t offset) // IN: Offset at which to read
896+
off64_t offset) // IN: Offset at which to read
897897
{
898898
int result;
899899
const char *buffer = buf;
900-
loff_t curOffset = offset;
900+
off64_t curOffset = offset;
901901
size_t nextCount, remainingCount = count;
902902
ssize_t bytesWritten = 0;
903903
uint32 maxIOSize = HgfsMaxIOSize();

open-vm-tools/vmhgfs-fuse/fsutil.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ HgfsStatusConvertToLinux(HgfsStatus hgfsStatus) // IN: Status code to convert
694694
unsigned long
695695
HgfsCalcBlockSize(uint64 tsize)
696696
{
697-
loff_t used = (tsize + 511) >> 9;
697+
off64_t used = (tsize + 511) >> 9;
698698
return (used > ULONG_MAX) ? ULONG_MAX : used;
699699
}
700700

open-vm-tools/vmhgfs-fuse/fsutil.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@
3232
#include "hgfsProto.h"
3333
#include <fuse.h>
3434

35-
#if defined(__FreeBSD__) || defined(__SOLARIS__) || defined(__APPLE__)
36-
typedef long long loff_t;
37-
#endif
38-
3935
/*
4036
* Struct used to pass around attributes.
4137
* These aren't just the attributes seen in HgfsAttr[V2]; we add a filename
@@ -73,7 +69,7 @@ ssize_t
7369
HgfsWrite(struct fuse_file_info *fi,
7470
const char *buf,
7571
size_t count,
76-
loff_t offset);
72+
off64_t offset);
7773

7874
int
7975
HgfsRename(const char* from, const char* to);
@@ -93,7 +89,7 @@ ssize_t
9389
HgfsRead(struct fuse_file_info *fi,
9490
char *buf,
9591
size_t count,
96-
loff_t offset);
92+
off64_t offset);
9793

9894
int
9995
HgfsSetattr(const char* path,

0 commit comments

Comments
 (0)