Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Apr 2007 12:39:22 GMT
From:      Roman Divacky <rdivacky@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 118826 for review
Message-ID:  <200704261239.l3QCdMwe011047@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=118826

Change 118826 by rdivacky@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
  */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200704261239.l3QCdMwe011047>