]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
libfrog: take over platform headers
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 1 Nov 2019 20:38:35 +0000 (16:38 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Fri, 1 Nov 2019 20:38:35 +0000 (16:38 -0400)
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>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
include/libxfs.h
libfrog/platform.h [new file with mode: 0644]
libfrog/topology.c
libxfs/init.c
libxfs/init.h
repair/xfs_repair.c

index 0cc0820b5da3b0fbe2d25a4cffee9b4d8bd330fd..85ced52a29767eda5396232cb20c16be5e70a766 100644 (file)
@@ -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 (file)
index 0000000..76887e5
--- /dev/null
@@ -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__ */
index e2f8741556a107e424bb61b1525e3d4e1593a2a6..b1b470c9b6d32d67d8d1b100a62390c40c5762b9 100644 (file)
@@ -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)))
index 537b73bd96de971094887d5499825cca4494182d..a0d4b7f4d42531ef4ad9a4e569f70f4059774428 100644 (file)
@@ -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 */
 
index b23e493c8ddccdbc3106983b1f8a3639d4c474d3..df49a99ab5109bf6c60a864f3e9cb36d24314fb1 100644 (file)
@@ -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 */
index df65b6c586e19a12a9eb6e313b26c04fad007747..3338a7b8c97fec254cb2a5a3b2998273e1812f09 100644 (file)
@@ -23,6 +23,7 @@
 #include "slab.h"
 #include "rmap.h"
 #include "libfrog/fsgeom.h"
+#include "libfrog/platform.h"
 
 /*
  * option tables for getsubopt calls