[PATCH v2 12/29] xfsprogs: Stop using platform_check_mount()

Pavel Reichl
2021-08-06T21:23:40Z

---
libfrog/linux.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/libfrog/linux.c b/libfrog/linux.c
index a45d99ab..f7fac2c8 100644
--- a/libfrog/linux.c
+++ b/libfrog/linux.c
@@ -40,7 +40,7 @@ static int max_block_alignment;
#define CHECK_MOUNT_WRITABLE 0x2

static int
-platform_check_mount(char *name, char *block, struct stat *s, int flags)
+check_mount(char *name, char *block, struct stat *s, int flags)
{
FILE *f;
struct stat st, mst;
@@ -107,13 +107,19 @@ _("%s: %s contains a mounted filesystem\n"),
return 1;
}

+static int
+platform_check_mount(char *name, char *block, struct stat *s, int flags)
+{
+ return check_mount(name, block, s, flags);
+}
+
int
platform_check_ismounted(char *name, char *block, struct stat *s, int verbose)
{
int flags;

flags = verbose ? CHECK_MOUNT_VERBOSE : 0;
- return platform_check_mount(name, block, s, flags);
+ return check_mount(name, block, s, flags);
}

int
@@ -123,7 +129,7 @@ platform_check_iswritable(char *name, char *block, struct stat *s)

/* Writable checks are always verbose */
flags = CHECK_MOUNT_WRITABLE | CHECK_MOUNT_VERBOSE;
- return platform_check_mount(name, block, s, flags);
+ return check_mount(name, block, s, flags);
}

int
--
2.31.1