aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2022-12-15 00:58:41 -0800
committerGao Xiang <hsiangkao@linux.alibaba.com>2022-12-15 17:56:29 +0800
commit08167e0c260864df37b2f2343265db45f6577573 (patch)
tree0e7d4096c0d84b63041fbc6d068c3160b20e1f65
parent7715b294087ee314554613436f9e421518c54791 (diff)
downloaderofs-utils-08167e0c260864df37b2f2343265db45f6577573.tar.gz
erofs-utils: replace [l]stat64 by equivalent [l]stat
Signed-off-by: Khem Raj <raj.khem@gmail.com> Link: https://lore.kernel.org/r/20221215085842.130804-2-raj.khem@gmail.com [ Gao Xiang: subject title fixup and code rebase. ] Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
-rw-r--r--lib/inode.c14
-rw-r--r--lib/xattr.c4
-rw-r--r--mkfs/main.c4
3 files changed, 11 insertions, 11 deletions
diff --git a/lib/inode.c b/lib/inode.c
index e675b45..87613c6 100644
--- a/lib/inode.c
+++ b/lib/inode.c
@@ -799,7 +799,7 @@ static u32 erofs_new_encode_dev(dev_t dev)
#ifdef WITH_ANDROID
int erofs_droid_inode_fsconfig(struct erofs_inode *inode,
- struct stat64 *st,
+ struct stat *st,
const char *path)
{
/* filesystem_config does not preserve file type bits */
@@ -847,14 +847,14 @@ int erofs_droid_inode_fsconfig(struct erofs_inode *inode,
}
#else
static int erofs_droid_inode_fsconfig(struct erofs_inode *inode,
- struct stat64 *st,
+ struct stat *st,
const char *path)
{
return 0;
}
#endif
-static int erofs_fill_inode(struct erofs_inode *inode, struct stat64 *st,
+static int erofs_fill_inode(struct erofs_inode *inode, struct stat *st,
const char *path)
{
int err = erofs_droid_inode_fsconfig(inode, st, path);
@@ -947,7 +947,7 @@ static struct erofs_inode *erofs_new_inode(void)
/* get the inode from the (source) path */
static struct erofs_inode *erofs_iget_from_path(const char *path, bool is_src)
{
- struct stat64 st;
+ struct stat st;
struct erofs_inode *inode;
int ret;
@@ -955,7 +955,7 @@ static struct erofs_inode *erofs_iget_from_path(const char *path, bool is_src)
if (!is_src)
return ERR_PTR(-EINVAL);
- ret = lstat64(path, &st);
+ ret = lstat(path, &st);
if (ret)
return ERR_PTR(-errno);
@@ -1192,7 +1192,7 @@ struct erofs_inode *erofs_mkfs_build_tree_from_path(struct erofs_inode *parent,
struct erofs_inode *erofs_mkfs_build_special_from_fd(int fd, const char *name)
{
- struct stat64 st;
+ struct stat st;
struct erofs_inode *inode;
int ret;
@@ -1200,7 +1200,7 @@ struct erofs_inode *erofs_mkfs_build_special_from_fd(int fd, const char *name)
if (ret < 0)
return ERR_PTR(-errno);
- ret = fstat64(fd, &st);
+ ret = fstat(fd, &st);
if (ret)
return ERR_PTR(-errno);
diff --git a/lib/xattr.c b/lib/xattr.c
index 8979dcc..0ca89a4 100644
--- a/lib/xattr.c
+++ b/lib/xattr.c
@@ -465,7 +465,7 @@ static int erofs_count_all_xattrs_from_path(const char *path)
{
int ret;
DIR *_dir;
- struct stat64 st;
+ struct stat st;
_dir = opendir(path);
if (!_dir) {
@@ -500,7 +500,7 @@ static int erofs_count_all_xattrs_from_path(const char *path)
goto fail;
}
- ret = lstat64(buf, &st);
+ ret = lstat(buf, &st);
if (ret) {
ret = -errno;
goto fail;
diff --git a/mkfs/main.c b/mkfs/main.c
index 77d635c..979b763 100644
--- a/mkfs/main.c
+++ b/mkfs/main.c
@@ -641,7 +641,7 @@ int main(int argc, char **argv)
struct erofs_buffer_head *sb_bh;
struct erofs_inode *root_inode, *packed_inode;
erofs_nid_t root_nid, packed_nid;
- struct stat64 st;
+ struct stat st;
erofs_blk_t nblocks;
struct timeval t;
char uuid_str[37] = "not available";
@@ -663,7 +663,7 @@ int main(int argc, char **argv)
return 1;
}
- err = lstat64(cfg.c_src_path, &st);
+ err = lstat(cfg.c_src_path, &st);
if (err)
return 1;
if (!S_ISDIR(st.st_mode)) {