Module Name: src
Committed By: perseant
Date: Mon Aug 12 22:32:11 UTC 2024
Modified Files:
src/sbin/mount_exfatfs [perseant-exfatfs]: mount_exfatfs.c
mount_exfatfs.h
src/sys/fs/exfatfs [perseant-exfatfs]: exfatfs.h exfatfs_mount.h
Log Message:
Move struct exfatfs_args into <fs/exfatfs/exfatfs_mount.h> so mount programs
don't need to include the entire exfatfs.h.
To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sbin/mount_exfatfs/mount_exfatfs.c \
src/sbin/mount_exfatfs/mount_exfatfs.h
cvs rdiff -u -r1.1.2.6 -r1.1.2.7 src/sys/fs/exfatfs/exfatfs.h
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/fs/exfatfs/exfatfs_mount.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sbin/mount_exfatfs/mount_exfatfs.c
diff -u src/sbin/mount_exfatfs/mount_exfatfs.c:1.1.2.1 src/sbin/mount_exfatfs/mount_exfatfs.c:1.1.2.2
--- src/sbin/mount_exfatfs/mount_exfatfs.c:1.1.2.1 Sat Jun 29 19:43:25 2024
+++ src/sbin/mount_exfatfs/mount_exfatfs.c Mon Aug 12 22:32:11 2024
@@ -3,8 +3,7 @@
#include <sys/param.h>
#include <sys/mount.h>
#include <sys/stat.h>
-#include <fs/exfatfs/exfatfs.h>
-/*#include <fs/exfatfs/exfatfs_mount.h>*/
+#include <fs/exfatfs/exfatfs_mount.h>
#include <err.h>
#include <grp.h>
#include <pwd.h>
@@ -15,7 +14,7 @@
#include <unistd.h>
#include <util.h>
-#define EXFATFSMNT_BITS "\177\20" /* XXX */
+#define EXFATFSMNT_BITS "\177\20" /* XXX there are no flags yet */
#include <mntopts.h>
Index: src/sbin/mount_exfatfs/mount_exfatfs.h
diff -u src/sbin/mount_exfatfs/mount_exfatfs.h:1.1.2.1 src/sbin/mount_exfatfs/mount_exfatfs.h:1.1.2.2
--- src/sbin/mount_exfatfs/mount_exfatfs.h:1.1.2.1 Sat Jun 29 19:43:25 2024
+++ src/sbin/mount_exfatfs/mount_exfatfs.h Mon Aug 12 22:32:11 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: mount_exfatfs.h,v 1.1.2.1 2024/06/29 19:43:25 perseant Exp $ */
+/* $NetBSD: mount_exfatfs.h,v 1.1.2.2 2024/08/12 22:32:11 perseant Exp $ */
/*
* Copyright (c) 2008 The NetBSD Foundation. All Rights Reserved.
@@ -28,8 +28,7 @@
#ifndef _SBIN_MOUNT_EXFATFS_MOUNT_EXFATFS_H_
#define _SBIN_MOUNT_EXFATFS_MOUNT_EXFATFS_H_
-#include <fs/exfatfs/exfatfs.h>
-/*#include <fs/exfatfs/exfatfs_mount.h>*/
+#include <fs/exfatfs/exfatfs_mount.h>
int mount_exfatfs(int, char **);
void mount_exfatfs_parseargs(int, char **, struct exfatfs_args *, int *,
Index: src/sys/fs/exfatfs/exfatfs.h
diff -u src/sys/fs/exfatfs/exfatfs.h:1.1.2.6 src/sys/fs/exfatfs/exfatfs.h:1.1.2.7
--- src/sys/fs/exfatfs/exfatfs.h:1.1.2.6 Fri Aug 2 00:16:55 2024
+++ src/sys/fs/exfatfs/exfatfs.h Mon Aug 12 22:32:11 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: exfatfs.h,v 1.1.2.6 2024/08/02 00:16:55 perseant Exp $ */
+/* $NetBSD: exfatfs.h,v 1.1.2.7 2024/08/12 22:32:11 perseant Exp $ */
/*-
* Copyright (c) 2022, 2024 The NetBSD Foundation, Inc.
@@ -145,23 +145,6 @@ struct exfatfs {
<< ((fs)->xf_BytesPerSectorShift - DEV_BSHIFT))
#endif
-/*
- * Arguments to mount EXFAT filesystems.
- */
-struct exfatfs_args {
- char *fspec; /* blocks special holding the fs to mount */
- uid_t uid; /* uid that owns msdosfs files */
- gid_t gid; /* gid that owns msdosfs files */
- mode_t mask; /* mask to be applied for msdosfs perms */
- int flags; /* see below */
-
- /* Following items added after versioning support */
- int version; /* version of the struct */
-#define EXFATFSMNT_VERSION 1
- mode_t dirmask; /* mask to be applied for msdosfs perms */
- int gmtoff; /* offset from UTC in seconds */
-};
-
#define EXFATFS_LABELMAX 11
#define EXFATFS_NAMEMAX 255
Index: src/sys/fs/exfatfs/exfatfs_mount.h
diff -u src/sys/fs/exfatfs/exfatfs_mount.h:1.1.2.2 src/sys/fs/exfatfs/exfatfs_mount.h:1.1.2.3
--- src/sys/fs/exfatfs/exfatfs_mount.h:1.1.2.2 Mon Jul 1 22:15:21 2024
+++ src/sys/fs/exfatfs/exfatfs_mount.h Mon Aug 12 22:32:11 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: exfatfs_mount.h,v 1.1.2.2 2024/07/01 22:15:21 perseant Exp $ */
+/* $NetBSD: exfatfs_mount.h,v 1.1.2.3 2024/08/12 22:32:11 perseant Exp $ */
/*-
* Copyright (c) 2022, 2024 The NetBSD Foundation, Inc.
@@ -29,11 +29,27 @@
#ifndef EXFATFS_MOUNT_H_
#define EXFATFS_MOUNT_H_
+#include <sys/types.h>
+
+/*
+ * Arguments to mount EXFAT filesystems.
+ */
+struct exfatfs_args {
+ char *fspec; /* blocks special holding the fs to mount */
+ uid_t uid; /* uid that owns files */
+ gid_t gid; /* gid that owns files */
+ mode_t mask; /* mask to be applied for file perms */
+ int flags; /* see below */
+ int version; /* version of the struct */
+#define EXFATFSMNT_VERSION 1
+ mode_t dirmask; /* mask to be applied for directory perms */
+ int gmtoff; /* offset from UTC in seconds */
+};
+
+#ifdef _KERNEL
#define MPTOXMP(mp) ((struct exfatfs_mount *)(mp)->mnt_data)
#define XMPTOMP(xmp) ((xmp)->xm_mp)
-#include <sys/types.h>
-
struct exfatfs_mount {
struct mount *xm_mp;
u_int32_t xm_flags;
@@ -44,5 +60,6 @@ struct exfatfs_mount {
};
#define EXFATFSMNT_MNTOPT 0x0
+#endif /* _KERNEL */
#endif /* EXFATFS_MOUNT_H_ */