summaryrefslogtreecommitdiff
path: root/sys/compat/linux/linux_getcwd.c
diff options
context:
space:
mode:
authorJean-Francois Brousseau <jfb@cvs.openbsd.org>2004-06-22 23:52:19 +0000
committerJean-Francois Brousseau <jfb@cvs.openbsd.org>2004-06-22 23:52:19 +0000
commit68fe655b77ab978f8d03f8feec46801220bd46c5 (patch)
treecf71e1513645d4dd977c3b1b4a92d6ec1578c8f6 /sys/compat/linux/linux_getcwd.c
parent5557b30319fbfe74844a640472fa29a826d1be8b (diff)
Replace a whole bunch of scary uses of strncpy() with strlcpy() and
use compat-specific MAXNAMLEN values where appropriate ok millert@, pedro@
Diffstat (limited to 'sys/compat/linux/linux_getcwd.c')
-rw-r--r--sys/compat/linux/linux_getcwd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/compat/linux/linux_getcwd.c b/sys/compat/linux/linux_getcwd.c
index 1f799433c4e..09ffc5404b7 100644
--- a/sys/compat/linux/linux_getcwd.c
+++ b/sys/compat/linux/linux_getcwd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: linux_getcwd.c,v 1.3 2002/03/14 01:26:50 millert Exp $ */
+/* $OpenBSD: linux_getcwd.c,v 1.4 2004/06/22 23:52:18 jfb Exp $ */
/* $NetBSD: vfs_getcwd.c,v 1.3.2.3 1999/07/11 10:24:09 sommerfeld Exp $ */
/*-
@@ -59,6 +59,7 @@ int proc_isunder(struct proc *, struct proc*); /* missing from proc.h */
#include <compat/linux/linux_signal.h>
#include <compat/linux/linux_syscallargs.h>
#include <compat/linux/linux_util.h>
+#include <compat/linux/linux_dirent.h>
#include <machine/linux_machdep.h>
@@ -75,7 +76,7 @@ linux_getcwd_common(struct vnode *, struct vnode *,
static int
linux_vn_isunder(struct vnode *, struct vnode *, struct proc *);
-#define DIRENT_MINSIZE (sizeof(struct dirent) - (MAXNAMLEN+1) + 4)
+#define DIRENT_MINSIZE (sizeof(struct dirent) - (LINUX_MAXNAMLEN+1) + 4)
/*
* Vnode variable naming conventions in this file: