Thread (33 messages) 33 messages, 2 authors, 2021-08-07
STALE1777d

[PATCH v2 16/29] xfsprogs: Stop using platform_mntent_next()

From: Pavel Reichl <hidden>
Date: 2021-08-06 21:23:46
Subsystem: the rest · Maintainer: Linus Torvalds

---
 fsr/xfs_fsr.c   | 2 +-
 include/linux.h | 7 ++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/fsr/xfs_fsr.c b/fsr/xfs_fsr.c
index 38afafb1..825ec395 100644
--- a/fsr/xfs_fsr.c
+++ b/fsr/xfs_fsr.c
@@ -319,7 +319,7 @@ initallfs(char *mtab)
 		exit(1);
 	}
 
-	while ((mnt = platform_mntent_next(&cursor)) != NULL) {
+	while ((mnt = mntent_next(&cursor)) != NULL) {
 		int rw = 0;
 
 		if (strcmp(mnt->mnt_type, MNTTYPE_XFS ) != 0 ||
diff --git a/include/linux.h b/include/linux.h
index b6249284..07121e2b 100644
--- a/include/linux.h
+++ b/include/linux.h
@@ -181,11 +181,16 @@ 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)
+static inline struct mntent * mntent_next(struct mntent_cursor * cursor)
 {
 	return getmntent(cursor->mtabp);
 }
 
+static inline struct mntent * platform_mntent_next(struct mntent_cursor * cursor)
+{
+	return mntent_next(cursor);
+}
+
 static inline void platform_mntent_close(struct mntent_cursor * cursor)
 {
 	endmntent(cursor->mtabp);
-- 
2.31.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help