diff mbox series

[v2,15/29] xfsprogs: Stop using platform_mntent_open()

Message ID 20210806212318.440144-16-preichl@redhat.com (mailing list archive)
State Deferred, archived
Headers show
Series xfsprogs: Drop the 'platform_' prefix | expand

Commit Message

Pavel Reichl Aug. 6, 2021, 9:23 p.m. UTC
---
 fsr/xfs_fsr.c   | 2 +-
 include/linux.h | 7 ++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/fsr/xfs_fsr.c b/fsr/xfs_fsr.c
index 25eb2e12..38afafb1 100644
--- a/fsr/xfs_fsr.c
+++ b/fsr/xfs_fsr.c
@@ -314,7 +314,7 @@  initallfs(char *mtab)
 	mi = 0;
 	fs = fsbase;
 
-	if (platform_mntent_open(&cursor, mtab) != 0){
+	if (mntent_open(&cursor, mtab) != 0){
 		fprintf(stderr, "Error: can't get mntent entries.\n");
 		exit(1);
 	}
diff --git a/include/linux.h b/include/linux.h
index ae32f0e0..b6249284 100644
--- a/include/linux.h
+++ b/include/linux.h
@@ -166,7 +166,7 @@  struct mntent_cursor {
 	FILE *mtabp;
 };
 
-static inline int platform_mntent_open(struct mntent_cursor * cursor, char *mtab)
+static inline int mntent_open(struct mntent_cursor * cursor, char *mtab)
 {
 	cursor->mtabp = setmntent(mtab, "r");
 	if (!cursor->mtabp) {
@@ -176,6 +176,11 @@  static inline int platform_mntent_open(struct mntent_cursor * cursor, char *mtab
 	return 0;
 }
 
+static inline int platform_mntent_open(struct mntent_cursor * cursor, char *mtab)
+{
+	return mntent_open(cursor, mtab);
+}
+
 static inline struct mntent * platform_mntent_next(struct mntent_cursor * cursor)
 {
 	return getmntent(cursor->mtabp);