All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: sandeen@sandeen.net, darrick.wong@oracle.com
Cc: linux-xfs@vger.kernel.org
Subject: [PATCH 4/4] libfrog: take over platform headers
Date: Tue, 22 Oct 2019 11:48:31 -0700	[thread overview]
Message-ID: <157177011182.1460186.9452615454342854032.stgit@magnolia> (raw)
In-Reply-To: <157177008495.1460186.12329293699422541895.stgit@magnolia>

From: Darrick J. Wong <darrick.wong@oracle.com>

Move all the declarations for platform-specific functions into
libfrog/platform.h, since they're a part of libfrog now.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 include/libxfs.h    |    1 -
 libfrog/platform.h  |   26 ++++++++++++++++++++++++++
 libfrog/topology.c  |    1 +
 libxfs/init.c       |    1 +
 libxfs/init.h       |   14 --------------
 repair/xfs_repair.c |    1 +
 6 files changed, 29 insertions(+), 15 deletions(-)
 create mode 100644 libfrog/platform.h


diff --git a/include/libxfs.h b/include/libxfs.h
index 0cc0820b..85ced52a 100644
--- a/include/libxfs.h
+++ b/include/libxfs.h
@@ -134,7 +134,6 @@ extern dev_t	libxfs_device_open (char *, int, int, int);
 extern void	libxfs_device_close (dev_t);
 extern int	libxfs_device_alignment (void);
 extern void	libxfs_report(FILE *);
-extern void	platform_findsizes(char *path, int fd, long long *sz, int *bsz);
 
 /* check or write log footer: specify device, log size in blocks & uuid */
 typedef char	*(libxfs_get_block_t)(char *, int, void *);
diff --git a/libfrog/platform.h b/libfrog/platform.h
new file mode 100644
index 00000000..76887e5e
--- /dev/null
+++ b/libfrog/platform.h
@@ -0,0 +1,26 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (c) 2000-2006 Silicon Graphics, Inc.
+ * All Rights Reserved.
+ */
+
+#ifndef __LIBFROG_PLATFORM_H__
+#define __LIBFROG_PLATFORM_H__
+
+int platform_check_ismounted(char *path, char *block, struct stat *sptr,
+		int verbose);
+int platform_check_iswritable(char *path, char *block, struct stat *sptr);
+int platform_set_blocksize(int fd, char *path, dev_t device, int bsz,
+		int fatal);
+void platform_flush_device(int fd, dev_t device);
+char *platform_findrawpath(char *path);
+char *platform_findblockpath(char *path);
+int platform_direct_blockdev(void);
+int platform_align_blockdev(void);
+unsigned long platform_physmem(void);	/* in kilobytes */
+void platform_findsizes(char *path, int fd, long long *sz, int *bsz);
+int platform_nproc(void);
+
+void platform_findsizes(char *path, int fd, long long *sz, int *bsz);
+
+#endif /* __LIBFROG_PLATFORM_H__ */
diff --git a/libfrog/topology.c b/libfrog/topology.c
index e2f87415..b1b470c9 100644
--- a/libfrog/topology.c
+++ b/libfrog/topology.c
@@ -11,6 +11,7 @@
 #endif /* ENABLE_BLKID */
 #include "xfs_multidisk.h"
 #include "topology.h"
+#include "platform.h"
 
 #define TERABYTES(count, blog)	((uint64_t)(count) << (40 - (blog)))
 #define GIGABYTES(count, blog)	((uint64_t)(count) << (30 - (blog)))
diff --git a/libxfs/init.c b/libxfs/init.c
index 537b73bd..a0d4b7f4 100644
--- a/libxfs/init.c
+++ b/libxfs/init.c
@@ -21,6 +21,7 @@
 #include "xfs_trans.h"
 #include "xfs_rmap_btree.h"
 #include "xfs_refcount_btree.h"
+#include "libfrog/platform.h"
 
 #include "libxfs.h"		/* for now */
 
diff --git a/libxfs/init.h b/libxfs/init.h
index b23e493c..df49a99a 100644
--- a/libxfs/init.h
+++ b/libxfs/init.h
@@ -9,18 +9,4 @@
 struct stat;
 extern int     use_xfs_buf_lock;
 
-extern int platform_check_ismounted (char *path, char *block,
-					struct stat *sptr, int verbose);
-extern int platform_check_iswritable (char *path, char *block, struct stat *sptr);
-extern int platform_set_blocksize (int fd, char *path, dev_t device, int bsz, int fatal);
-extern void platform_flush_device (int fd, dev_t device);
-extern char *platform_findrawpath(char *path);
-extern char *platform_findrawpath (char *path);
-extern char *platform_findblockpath (char *path);
-extern int platform_direct_blockdev (void);
-extern int platform_align_blockdev (void);
-extern unsigned long platform_physmem(void);	/* in kilobytes */
-extern void platform_findsizes(char *path, int fd, long long *sz, int *bsz);
-extern int platform_nproc(void);
-
 #endif	/* LIBXFS_INIT_H */
diff --git a/repair/xfs_repair.c b/repair/xfs_repair.c
index df65b6c5..3338a7b8 100644
--- a/repair/xfs_repair.c
+++ b/repair/xfs_repair.c
@@ -23,6 +23,7 @@
 #include "slab.h"
 #include "rmap.h"
 #include "libfrog/fsgeom.h"
+#include "libfrog/platform.h"
 
 /*
  * option tables for getsubopt calls


  parent reply	other threads:[~2019-10-22 18:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-22 18:48 [PATCH 0/4] libfrog: take over platform code headers Darrick J. Wong
2019-10-22 18:48 ` [PATCH 1/4] libfrog: clean up platform_nproc Darrick J. Wong
2019-11-01 20:35   ` Eric Sandeen
2019-10-22 18:48 ` [PATCH 2/4] libxfs: remove libxfs_nproc Darrick J. Wong
2019-11-01 20:35   ` Eric Sandeen
2019-10-22 18:48 ` [PATCH 3/4] libxfs: remove libxfs_physmem Darrick J. Wong
2019-11-01 20:35   ` Eric Sandeen
2019-10-22 18:48 ` Darrick J. Wong [this message]
2019-11-01 20:36   ` [PATCH 4/4] libfrog: take over platform headers Eric Sandeen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=157177011182.1460186.9452615454342854032.stgit@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@sandeen.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.