From owner-p4-projects@FreeBSD.ORG Thu Jun 21 09:06:45 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7E24116A46B; Thu, 21 Jun 2007 09:06:45 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 361A616A468 for ; Thu, 21 Jun 2007 09:06:45 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 2786F13C457 for ; Thu, 21 Jun 2007 09:06:45 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l5L96jGm011201 for ; Thu, 21 Jun 2007 09:06:45 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l5L96iAN011198 for perforce@freebsd.org; Thu, 21 Jun 2007 09:06:44 GMT (envelope-from rdivacky@FreeBSD.org) Date: Thu, 21 Jun 2007 09:06:44 GMT Message-Id: <200706210906.l5L96iAN011198@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky To: Perforce Change Reviews Cc: Subject: PERFORCE change 122068 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2007 09:06:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=122068 Change 122068 by rdivacky@rdivacky_witten on 2007/06/21 09:06:06 Introduce fcntl.h part of POSIX Extended API: o remove __BSD_VISIBLE around O_NOFOLLOW, its POSIX now o add AT_FDCWD, AT_SYMLINK_NOFOLLOW, AT_SYMLINK_FOLLOW, AT_REMOVEDIR o add AT_EACCESS but ifdefed out for the moment o add O_DIRECTORY o add openat() prototype this is a WIP and commits to other files will follow Affected files ... .. //depot/projects/soc2007/rdivacky/linux_at/sys/sys/fcntl.h#4 edit Differences ... ==== //depot/projects/soc2007/rdivacky/linux_at/sys/sys/fcntl.h#4 (text+ko) ==== @@ -96,16 +96,24 @@ #define O_FSYNC 0x0080 /* synchronous writes */ #endif #define O_SYNC 0x0080 /* POSIX synonym for O_FSYNC */ -#if __BSD_VISIBLE #define O_NOFOLLOW 0x0100 /* don't follow symlinks */ -#endif #define O_CREAT 0x0200 /* create if nonexistent */ #define O_TRUNC 0x0400 /* truncate to zero length */ #define O_EXCL 0x0800 /* error if already exists */ #ifdef _KERNEL #define FHASLOCK 0x4000 /* descriptor holds advisory lock */ #endif -#define AT_FDCWD -100 /* CWD for *at syscals */ +/* Defined by POSIX Extended API ... TODO: number of the spec */ +#define AT_FDCWD -100 /* Use the current working directory + to determine the target of relative + file paths. + */ +#ifdef notyet +#define AT_EACCESS 0x100 /* Check access using effective user and group ID */ +#endif +#define AT_SYMLINK_NOFOLLOW 0x200 /* Do not follow symbolic links */ +#define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic link */ +#define AT_REMOVEDIR 0x800 /* Remove directory instead of file */ /* Defined by POSIX 1003.1; BSD default, but must be distinct from O_RDONLY. */ #define O_NOCTTY 0x8000 /* don't assign controlling terminal */ @@ -115,6 +123,9 @@ #define O_DIRECT 0x00010000 #endif +/* Defined by POSIX Extended API ... TODO: number of the spec */ +#define O_DIRECTORY 0x00020000 /* Fail if not directory */ + /* * XXX missing O_DSYNC, O_RSYNC. */ @@ -221,6 +232,7 @@ int open(const char *, int, ...); int creat(const char *, mode_t); int fcntl(int, int, ...); +int openat(int, const char *, int, ...); #if __BSD_VISIBLE int flock(int, int); #endif