socsvn commit: r223088 - in soc2011/gk/ino64-head: lib/libc/include sys/compat/freebsd32 sys/kern sys/sys

gk at FreeBSD.org gk at FreeBSD.org
Fri Jun 10 20:55:55 UTC 2011


Author: gk
Date: Fri Jun 10 20:55:53 2011
New Revision: 223088
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=223088

Log:
  Move nstat* syscalls under COMPAT8
  
  Mark nstat* syscalls OBSOL for freebsd32 as they've never actually worked.

Modified:
  soc2011/gk/ino64-head/lib/libc/include/compat.h
  soc2011/gk/ino64-head/sys/compat/freebsd32/syscalls.master
  soc2011/gk/ino64-head/sys/kern/kern_descrip.c
  soc2011/gk/ino64-head/sys/kern/syscalls.master
  soc2011/gk/ino64-head/sys/kern/vfs_syscalls.c
  soc2011/gk/ino64-head/sys/sys/vnode.h

Modified: soc2011/gk/ino64-head/lib/libc/include/compat.h
==============================================================================
--- soc2011/gk/ino64-head/lib/libc/include/compat.h	Fri Jun 10 20:55:37 2011	(r223087)
+++ soc2011/gk/ino64-head/lib/libc/include/compat.h	Fri Jun 10 20:55:53 2011	(r223088)
@@ -42,6 +42,10 @@
 __sym_compat(msgctl, freebsd7_msgctl, FBSD_1.0);
 __sym_compat(shmctl, freebsd7_shmctl, FBSD_1.0);
 
+__sym_compat(nfstat, freebsd8_nfstat, FBSD_1.0);
+__sym_compat(nlstat, freebsd8_nlstat, FBSD_1.0);
+__sym_compat(nstat, freebsd8_nstat, FBSD_1.0);
+
 #undef __sym_compat
 
 #endif	/* __LIBC_COMPAT_H__ */

Modified: soc2011/gk/ino64-head/sys/compat/freebsd32/syscalls.master
==============================================================================
--- soc2011/gk/ino64-head/sys/compat/freebsd32/syscalls.master	Fri Jun 10 20:55:37 2011	(r223087)
+++ soc2011/gk/ino64-head/sys/compat/freebsd32/syscalls.master	Fri Jun 10 20:55:53 2011	(r223088)
@@ -496,9 +496,9 @@
 				    struct timeval32 *tptr); }
 277	AUE_MSYNC	NOPROTO	{ int msync(void *addr, size_t len, \
 				    int flags); } netbsd_msync msync_args int
-278	AUE_STAT	NOPROTO	{ int nstat(char *path, struct nstat *ub); }
-279	AUE_FSTAT	NOPROTO	{ int nfstat(int fd, struct nstat *sb); }
-280	AUE_LSTAT	NOPROTO	{ int nlstat(char *path, struct nstat *ub); }
+278	AUE_STAT	OBSOL	nstat
+279	AUE_FSTAT	OBSOL	nfstat
+280	AUE_LSTAT	OBSOL	nlstat
 281	AUE_NULL	UNIMPL	nosys
 282	AUE_NULL	UNIMPL	nosys
 283	AUE_NULL	UNIMPL	nosys

Modified: soc2011/gk/ino64-head/sys/kern/kern_descrip.c
==============================================================================
--- soc2011/gk/ino64-head/sys/kern/kern_descrip.c	Fri Jun 10 20:55:37 2011	(r223087)
+++ soc2011/gk/ino64-head/sys/kern/kern_descrip.c	Fri Jun 10 20:55:53 2011	(r223088)
@@ -1315,18 +1315,21 @@
 	return (error);
 }
 
+#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \
+    defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) || \
+    defined(COMPAT_FREEBSD8)
 /*
  * Return status information about a file descriptor.
  */
 #ifndef _SYS_SYSPROTO_H_
-struct nfstat_args {
+struct freebsd8_nfstat_args {
 	int	fd;
 	struct	nstat *sb;
 };
 #endif
 /* ARGSUSED */
 int
-nfstat(struct thread *td, struct nfstat_args *uap)
+freebsd8_nfstat(struct thread *td, struct freebsd8_nfstat_args *uap)
 {
 	struct nstat nub;
 	struct stat ub;
@@ -1334,11 +1337,12 @@
 
 	error = kern_fstat(td, uap->fd, &ub);
 	if (error == 0) {
-		cvtnstat(&ub, &nub);
+		freebsd8_cvtnstat(&ub, &nub);
 		error = copyout(&nub, uap->sb, sizeof(nub));
 	}
 	return (error);
 }
+#endif /* COMPAT_FREEBSD8 */
 
 /*
  * Return pathconf information about a file descriptor.

Modified: soc2011/gk/ino64-head/sys/kern/syscalls.master
==============================================================================
--- soc2011/gk/ino64-head/sys/kern/syscalls.master	Fri Jun 10 20:55:37 2011	(r223087)
+++ soc2011/gk/ino64-head/sys/kern/syscalls.master	Fri Jun 10 20:55:53 2011	(r223088)
@@ -504,9 +504,9 @@
 				    struct timeval *tptr); }
 277	AUE_MSYNC	NOPROTO	{ int msync(void *addr, size_t len, \
 				    int flags); } netbsd_msync msync_args int
-278	AUE_STAT	STD	{ int nstat(char *path, struct nstat *ub); }
-279	AUE_FSTAT	STD	{ int nfstat(int fd, struct nstat *sb); }
-280	AUE_LSTAT	STD	{ int nlstat(char *path, struct nstat *ub); }
+278	AUE_STAT	COMPAT8	{ int nstat(char *path, struct nstat *ub); }
+279	AUE_FSTAT	COMPAT8	{ int nfstat(int fd, struct nstat *sb); }
+280	AUE_LSTAT	COMPAT8	{ int nlstat(char *path, struct nstat *ub); }
 281	AUE_NULL	UNIMPL	nosys
 282	AUE_NULL	UNIMPL	nosys
 283	AUE_NULL	UNIMPL	nosys

Modified: soc2011/gk/ino64-head/sys/kern/vfs_syscalls.c
==============================================================================
--- soc2011/gk/ino64-head/sys/kern/vfs_syscalls.c	Fri Jun 10 20:55:37 2011	(r223087)
+++ soc2011/gk/ino64-head/sys/kern/vfs_syscalls.c	Fri Jun 10 20:55:53 2011	(r223088)
@@ -2407,11 +2407,14 @@
 	    sbp));
 }
 
+#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \
+    defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) || \
+    defined(COMPAT_FREEBSD8)
 /*
  * Implementation of the NetBSD [l]stat() functions.
  */
 void
-cvtnstat(sb, nsb)
+freebsd8_cvtnstat(sb, nsb)
 	struct stat *sb;
 	struct nstat *nsb;
 {
@@ -2435,15 +2438,15 @@
 }
 
 #ifndef _SYS_SYSPROTO_H_
-struct nstat_args {
+struct freebsd8_nstat_args {
 	char	*path;
 	struct nstat *ub;
 };
 #endif
 int
-nstat(td, uap)
+freebsd8_nstat(td, uap)
 	struct thread *td;
-	register struct nstat_args /* {
+	register struct freebsd8_nstat_args /* {
 		char *path;
 		struct nstat *ub;
 	} */ *uap;
@@ -2455,7 +2458,7 @@
 	error = kern_stat(td, uap->path, UIO_USERSPACE, &sb);
 	if (error)
 		return (error);
-	cvtnstat(&sb, &nsb);
+	freebsd8_cvtnstat(&sb, &nsb);
 	error = copyout(&nsb, uap->ub, sizeof (nsb));
 	return (error);
 }
@@ -2464,15 +2467,15 @@
  * NetBSD lstat.  Get file status; this version does not follow links.
  */
 #ifndef _SYS_SYSPROTO_H_
-struct lstat_args {
+struct freebsd8_nlstat_args {
 	char	*path;
 	struct stat *ub;
 };
 #endif
 int
-nlstat(td, uap)
+freebsd8_nlstat(td, uap)
 	struct thread *td;
-	register struct nlstat_args /* {
+	register struct freebsd8_nlstat_args /* {
 		char *path;
 		struct nstat *ub;
 	} */ *uap;
@@ -2484,10 +2487,11 @@
 	error = kern_lstat(td, uap->path, UIO_USERSPACE, &sb);
 	if (error)
 		return (error);
-	cvtnstat(&sb, &nsb);
+	freebsd8_cvtnstat(&sb, &nsb);
 	error = copyout(&nsb, uap->ub, sizeof (nsb));
 	return (error);
 }
+#endif /* COMPAT_FREEBSD8 */
 
 /*
  * Get configurable pathname variables.

Modified: soc2011/gk/ino64-head/sys/sys/vnode.h
==============================================================================
--- soc2011/gk/ino64-head/sys/sys/vnode.h	Fri Jun 10 20:55:37 2011	(r223087)
+++ soc2011/gk/ino64-head/sys/sys/vnode.h	Fri Jun 10 20:55:53 2011	(r223088)
@@ -589,7 +589,7 @@
 int	change_dir(struct vnode *vp, struct thread *td);
 int	change_root(struct vnode *vp, struct thread *td);
 void	cvtstat(struct stat *st, struct ostat *ost);
-void	cvtnstat(struct stat *sb, struct nstat *nsb);
+void	freebsd8_cvtnstat(struct stat *sb, struct nstat *nsb);
 int	getnewvnode(const char *tag, struct mount *mp, struct vop_vector *vops,
 	    struct vnode **vpp);
 int	insmntque1(struct vnode *vp, struct mount *mp,


More information about the svn-soc-all mailing list