blob: d12bebbf8705c64dbd228a9a795722c727511740 [file] [log] [blame]
Andrew Geissler517393d2023-01-13 08:55:19 -06001From 856189c324834b838f0e9cfc0d2e05f12518f264 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 7 Dec 2022 22:17:35 -0800
4Subject: [PATCH v3 2/3] erofs: replace [l]stat64 by equivalent [l]stat
5
6Upstream-Status: Submitted [https://lore.kernel.org/linux-erofs/20221215064758.93821-2-raj.khem@gmail.com/T/#u]
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8---
9 lib/inode.c | 10 +++++-----
10 lib/xattr.c | 4 ++--
11 mkfs/main.c | 4 ++--
12 3 files changed, 9 insertions(+), 9 deletions(-)
13
14diff --git a/lib/inode.c b/lib/inode.c
15index f192510..38003fc 100644
16--- a/lib/inode.c
17+++ b/lib/inode.c
18@@ -773,7 +773,7 @@ static u32 erofs_new_encode_dev(dev_t dev)
19
20 #ifdef WITH_ANDROID
21 int erofs_droid_inode_fsconfig(struct erofs_inode *inode,
22- struct stat64 *st,
23+ struct stat *st,
24 const char *path)
25 {
26 /* filesystem_config does not preserve file type bits */
27@@ -818,7 +818,7 @@ int erofs_droid_inode_fsconfig(struct erofs_inode *inode,
28 }
29 #else
30 static int erofs_droid_inode_fsconfig(struct erofs_inode *inode,
31- struct stat64 *st,
32+ struct stat *st,
33 const char *path)
34 {
35 return 0;
36@@ -826,7 +826,7 @@ static int erofs_droid_inode_fsconfig(struct erofs_inode *inode,
37 #endif
38
39 static int erofs_fill_inode(struct erofs_inode *inode,
40- struct stat64 *st,
41+ struct stat *st,
42 const char *path)
43 {
44 int err = erofs_droid_inode_fsconfig(inode, st, path);
45@@ -910,7 +910,7 @@ static struct erofs_inode *erofs_new_inode(void)
46 /* get the inode from the (source) path */
47 static struct erofs_inode *erofs_iget_from_path(const char *path, bool is_src)
48 {
49- struct stat64 st;
50+ struct stat st;
51 struct erofs_inode *inode;
52 int ret;
53
54@@ -918,7 +918,7 @@ static struct erofs_inode *erofs_iget_from_path(const char *path, bool is_src)
55 if (!is_src)
56 return ERR_PTR(-EINVAL);
57
58- ret = lstat64(path, &st);
59+ ret = lstat(path, &st);
60 if (ret)
61 return ERR_PTR(-errno);
62
63diff --git a/lib/xattr.c b/lib/xattr.c
64index 71ffe3e..fd0e728 100644
65--- a/lib/xattr.c
66+++ b/lib/xattr.c
67@@ -467,7 +467,7 @@ static int erofs_count_all_xattrs_from_path(const char *path)
68 {
69 int ret;
70 DIR *_dir;
71- struct stat64 st;
72+ struct stat st;
73
74 _dir = opendir(path);
75 if (!_dir) {
76@@ -502,7 +502,7 @@ static int erofs_count_all_xattrs_from_path(const char *path)
77 goto fail;
78 }
79
80- ret = lstat64(buf, &st);
81+ ret = lstat(buf, &st);
82 if (ret) {
83 ret = -errno;
84 goto fail;
85diff --git a/mkfs/main.c b/mkfs/main.c
86index d2c9830..5279805 100644
87--- a/mkfs/main.c
88+++ b/mkfs/main.c
89@@ -581,7 +581,7 @@ int main(int argc, char **argv)
90 struct erofs_buffer_head *sb_bh;
91 struct erofs_inode *root_inode;
92 erofs_nid_t root_nid;
93- struct stat64 st;
94+ struct stat st;
95 erofs_blk_t nblocks;
96 struct timeval t;
97 char uuid_str[37] = "not available";
98@@ -609,7 +609,7 @@ int main(int argc, char **argv)
99 return 1;
100 }
101
102- err = lstat64(cfg.c_src_path, &st);
103+ err = lstat(cfg.c_src_path, &st);
104 if (err)
105 return 1;
106 if (!S_ISDIR(st.st_mode)) {
107--
1082.39.0
109