Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/sys/compat/netbsd32 Pull up following revision(s) (reques...
details: https://anonhg.NetBSD.org/src/rev/d0335d4c26f5
branches: netbsd-8
changeset: 435202:d0335d4c26f5
user: martin <martin%NetBSD.org@localhost>
date: Sat Aug 25 11:13:05 2018 +0000
description:
Pull up following revision(s) (requested by mrg in ticket #977):
sys/compat/netbsd32/netbsd32_fs.c: revision 1.81
sys/compat/netbsd32/netbsd32.h: revision 1.119
support nullfs in netbsd32.
diffstat:
sys/compat/netbsd32/netbsd32.h | 17 +++++++++++++----
sys/compat/netbsd32/netbsd32_fs.c | 28 ++++++++++++++++++++++++++--
2 files changed, 39 insertions(+), 6 deletions(-)
diffs (122 lines):
diff -r c8cfcc804397 -r d0335d4c26f5 sys/compat/netbsd32/netbsd32.h
--- a/sys/compat/netbsd32/netbsd32.h Sat Aug 25 07:06:48 2018 +0000
+++ b/sys/compat/netbsd32/netbsd32.h Sat Aug 25 11:13:05 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32.h,v 1.114.8.2 2018/04/14 03:04:06 snj Exp $ */
+/* $NetBSD: netbsd32.h,v 1.114.8.3 2018/08/25 11:13:05 martin Exp $ */
/*
* Copyright (c) 1998, 2001, 2008, 2015 Matthew R. Green
@@ -958,7 +958,7 @@
/* from <fs/cd9660/cd9660_mount.h> */
struct netbsd32_iso_args {
netbsd32_charp fspec;
- struct export_args30 _pad1;
+ struct netbsd32_export_args30 _pad1;
int flags;
};
@@ -1014,8 +1014,6 @@
netbsd32_export_argsp mel_exports;
};
-/* no struct export_args30 yet */
-
/* from <nfs/nfsmount,h> */
struct netbsd32_nfs_args {
int32_t version; /* args structure version number */
@@ -1053,6 +1051,17 @@
int gmtoff; /* v3: offset from UTC in seconds */
};
+/* from <miscfs/genfs/layer.h> */
+struct netbsd32_layer_args {
+ netbsd32_charp target; /* Target of loopback */
+ struct netbsd32_export_args30 _pad1; /* compat with old userland tools */
+};
+
+/* from <miscfs/nullfs/null.h> */
+struct netbsd32_null_args {
+ struct netbsd32_layer_args la; /* generic layerfs args */
+};
+
struct netbsd32_posix_spawn_file_actions_entry {
enum { FAE32_OPEN, FAE32_DUP2, FAE32_CLOSE } fae_action;
diff -r c8cfcc804397 -r d0335d4c26f5 sys/compat/netbsd32/netbsd32_fs.c
--- a/sys/compat/netbsd32/netbsd32_fs.c Sat Aug 25 07:06:48 2018 +0000
+++ b/sys/compat/netbsd32/netbsd32_fs.c Sat Aug 25 11:13:05 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_fs.c,v 1.80 2017/06/01 02:45:08 chs Exp $ */
+/* $NetBSD: netbsd32_fs.c,v 1.80.2.1 2018/08/25 11:13:05 martin Exp $ */
/*
* Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_fs.c,v 1.80 2017/06/01 02:45:08 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_fs.c,v 1.80.2.1 2018/08/25 11:13:05 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -54,6 +54,7 @@
#include <fs/msdosfs/bpb.h>
#include <fs/msdosfs/msdosfsmount.h>
#include <ufs/ufs/ufsmount.h>
+#include <miscfs/nullfs/null.h>
#define NFS_ARGS_ONLY
#include <nfs/nfsmount.h>
@@ -799,6 +800,7 @@
struct netbsd32_nfs_args nfs_args;
struct netbsd32_msdosfs_args msdosfs_args;
struct netbsd32_tmpfs_args tmpfs_args;
+ struct netbsd32_null_args null_args;
} fs_args32;
union {
struct ufs_args ufs_args;
@@ -807,6 +809,7 @@
struct nfs_args nfs_args;
struct msdosfs_args msdosfs_args;
struct tmpfs_args tmpfs_args;
+ struct null_args null_args;
} fs_args;
const char *type = SCARG_P32(uap, type);
const char *path = SCARG_P32(uap, path);
@@ -953,6 +956,20 @@
data_seg = UIO_SYSSPACE;
data = &fs_args.nfs_args;
data_len = sizeof(fs_args.nfs_args);
+ } else if (strcmp(mtype, MOUNT_NULL) == 0) {
+ if (data_len > sizeof(fs_args32.null_args))
+ return EINVAL;
+ if ((flags & MNT_GETARGS) == 0) {
+ error = copyin(data, &fs_args32.null_args,
+ sizeof(fs_args32.null_args));
+ if (error)
+ return error;
+ fs_args.null_args.la.target =
+ NETBSD32PTR64(fs_args32.null_args.la.target);
+ }
+ data_seg = UIO_SYSSPACE;
+ data = &fs_args.null_args;
+ data_len = sizeof(fs_args.null_args);
} else {
data_seg = UIO_USERSPACE;
}
@@ -1032,6 +1049,13 @@
fs_args.nfs_args.hostname);
error = copyout(&fs_args32.nfs_args, data,
sizeof(fs_args32.nfs_args));
+ } else if (strcmp(mtype, MOUNT_NULL) == 0) {
+ if (data_len != sizeof(fs_args.null_args))
+ return EINVAL;
+ NETBSD32PTR32(fs_args32.null_args.la.target,
+ fs_args.null_args.la.target);
+ error = copyout(&fs_args32.null_args, data,
+ sizeof(fs_args32.null_args));
}
}
return error;
Home |
Main Index |
Thread Index |
Old Index