diff mbox series

[v2,05/29] xfsprogs: Stop using platform_getoptreset()

Message ID 20210806212318.440144-6-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:22 p.m. UTC
---
 db/command.c      | 2 +-
 include/linux.h   | 7 ++++++-
 libxcmd/command.c | 2 +-
 3 files changed, 8 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/db/command.c b/db/command.c
index 02f778b9..65d8a056 100644
--- a/db/command.c
+++ b/db/command.c
@@ -84,7 +84,7 @@  command(
 		dbprintf(_(" arguments\n"));
 		return 0;
 	}
-	platform_getoptreset();
+	getoptreset();
 	return ct->cfunc(argc, argv);
 }
 
diff --git a/include/linux.h b/include/linux.h
index 1617174c..ae32f0e0 100644
--- a/include/linux.h
+++ b/include/linux.h
@@ -89,12 +89,17 @@  static __inline__ int platform_fstatfs(int fd, struct statfs *buf)
 	return fstatfs(fd, buf);
 }
 
-static __inline__ void platform_getoptreset(void)
+static __inline__ void getoptreset(void)
 {
 	extern int optind;
 	optind = 0;
 }
 
+static __inline__ void platform_getoptreset(void)
+{
+	platform_getoptreset();
+}
+
 static __inline__ int platform_uuid_compare(uuid_t *uu1, uuid_t *uu2)
 {
 	return uuid_compare(*uu1, *uu2);
diff --git a/libxcmd/command.c b/libxcmd/command.c
index a76d1515..3fa3d6e6 100644
--- a/libxcmd/command.c
+++ b/libxcmd/command.c
@@ -92,7 +92,7 @@  command(
 			argc-1, cmd, ct->argmin, ct->argmax);
 		return 0;
 	}
-	platform_getoptreset();
+	getoptreset();
 	return ct->cfunc(argc, argv);
 }