PERFORCE change 118826 for review

Roman Divacky rdivacky at FreeBSD.org
Thu Apr 26 12:39:23 UTC 2007


http://perforce.freebsd.org/chv.cgi?CH=118826

Change 118826 by rdivacky at rdivacky_witten on 2007/04/26 12:38:54

	Introduce AT_SYMLINK_NOFOLLOW and it's strange semantics. Add linux_file.h
	and move the AT_FDCWD definition there.

Affected files ...

.. //depot/projects/soc2007/rdivacky/linux_at/sys/amd64/linux32/linux.h#2 edit
.. //depot/projects/soc2007/rdivacky/linux_at/sys/compat/linux/linux_file.c#3 edit
.. //depot/projects/soc2007/rdivacky/linux_at/sys/compat/linux/linux_file.h#1 add
.. //depot/projects/soc2007/rdivacky/linux_at/sys/compat/linux/linux_stats.c#3 edit
.. //depot/projects/soc2007/rdivacky/linux_at/sys/i386/linux/linux.h#2 edit

Differences ...

==== //depot/projects/soc2007/rdivacky/linux_at/sys/amd64/linux32/linux.h#2 (text+ko) ====

@@ -566,8 +566,6 @@
 #define	LINUX_F_WRLCK		1
 #define	LINUX_F_UNLCK		2
 
-#define	LINUX_AT_FDCWD		-100
-
 /*
  * mount flags
  */

==== //depot/projects/soc2007/rdivacky/linux_at/sys/compat/linux/linux_file.c#3 (text+ko) ====

@@ -67,6 +67,7 @@
 #include <machine/../linux/linux_proto.h>
 #endif
 #include <compat/linux/linux_util.h>
+#include <compat/linux/linux_file.h>
 
 int
 linux_creat(struct thread *td, struct linux_creat_args *args)

==== //depot/projects/soc2007/rdivacky/linux_at/sys/compat/linux/linux_stats.c#3 (text+ko) ====

@@ -57,6 +57,7 @@
 #endif
 
 #include <compat/linux/linux_util.h>
+#include <compat/linux/linux_file.h>
 
 #include <security/mac/mac_framework.h>
 
@@ -587,6 +588,9 @@
 	int fd, dfd;
 	struct stat buf;
 
+	if (args->flag & ~LINUX_AT_SYMLINK_NOFOLLOW)
+		return (EINVAL);
+
 	/* open the file */
 	path = malloc(MAXPATHLEN, M_TEMP, M_WAITOK);
 	error = copyinstr(args->pathname, path, MAXPATHLEN, NULL);

==== //depot/projects/soc2007/rdivacky/linux_at/sys/i386/linux/linux.h#2 (text+ko) ====

@@ -537,8 +537,6 @@
 #define	LINUX_F_WRLCK		1
 #define	LINUX_F_UNLCK		2
 
-#define	LINUX_AT_FDCWD		-100
-
 /*
  * mount flags
  */


More information about the p4-projects mailing list