summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/kern/vfs_mount.c
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/sys/kern/vfs_mount.c')
-rw-r--r--freebsd/sys/kern/vfs_mount.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/freebsd/sys/kern/vfs_mount.c b/freebsd/sys/kern/vfs_mount.c
index 3610763f..4635857e 100644
--- a/freebsd/sys/kern/vfs_mount.c
+++ b/freebsd/sys/kern/vfs_mount.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-kernel-space.h>
+
/*-
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -796,16 +798,22 @@ sys_mount(struct thread *td, struct mount_args *uap)
*/
flags &= ~MNT_ROOTFS;
+#ifndef __rtems__
fstype = malloc(MFSNAMELEN, M_TEMP, M_WAITOK);
error = copyinstr(uap->type, fstype, MFSNAMELEN, NULL);
if (error) {
free(fstype, M_TEMP);
return (error);
}
+#else /* __rtems__ */
+ fstype = uap->type;
+#endif /* __rtems__ */
AUDIT_ARG_TEXT(fstype);
vfsp = vfs_byname_kld(fstype, td, &error);
+#ifndef __rtems__
free(fstype, M_TEMP);
+#endif /* __rtems__ */
if (vfsp == NULL)
return (ENOENT);
if (vfsp->vfc_vfsops->vfs_cmount == NULL)