xfs
[Top] [All Lists]

[PATCH 10/11] xfsprogs: add dummy mntent for OS X

To: xfs@xxxxxxxxxxx
Subject: [PATCH 10/11] xfsprogs: add dummy mntent for OS X
From: Jan Tulak <jtulak@xxxxxxxxxx>
Date: Wed, 26 Aug 2015 14:02:34 +0200
Cc: david@xxxxxxxxxxxxx, hch@xxxxxxxxxxxxx, Jan Tulak <jtulak@xxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1440590555-20463-1-git-send-email-jtulak@xxxxxxxxxx>
References: <1440590449-20372-1-git-send-email-jtulak@xxxxxxxxxx> <1440590555-20463-1-git-send-email-jtulak@xxxxxxxxxx>
Because these calls are used only by xfs_fsr, which can't
work on OS X unless a way how to mount XFS is found,
there is not use in implementing these calls.

Signed-off-by: Jan Tulak <jtulak@xxxxxxxxxx>
---
 include/darwin.h | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/include/darwin.h b/include/darwin.h
index c8fcb3c..d47c96c 100644
--- a/include/darwin.h
+++ b/include/darwin.h
@@ -244,6 +244,41 @@ struct statvfs64
        int __f_spare[6];
 };
 
+struct mntent
+{
+       char *mnt_fsname;               /* Device or server for filesystem.  */
+       char *mnt_dir;          /* Directory mounted on.  */
+       char *mnt_type;         /* Type of filesystem: ufs, nfs, etc.  */
+       char *mnt_opts;         /* Comma-separated options for fs.  */
+       int mnt_freq;           /* Dump frequency (in days).  */
+       int mnt_passno;         /* Pass number for `fsck'.  */
+};
+
+static inline FILE *setmntent(const char *filename, const char *type)
+{
+       return NULL;
+}
+
+static inline int endmntent(FILE *fp)
+{
+       return 0;
+}
+
+static inline struct mntent *getmntent(FILE *fp)
+{
+       return NULL;
+}
+
+static inline int addmntent(FILE *fp, const struct mntent *mnt)
+{
+       return 0;
+}
+
+static inline char *hasmntopt(const struct mntent *mnt, const char *opt)
+{
+       return NULL;
+}
+
 static inline int statvfs64 (const char *__restrict __file,
                                                         struct statfs 
*__restrict __buf)
 {
-- 
2.4.5

<Prev in Thread] Current Thread [Next in Thread>