svn commit: r192590 - stable/7/sys/sys

John Baldwin jhb at freebsd.org
Fri May 22 19:13:02 UTC 2009


On Friday 22 May 2009 1:54:03 pm Kip Macy wrote:
> Author: kmacy
> Date: Fri May 22 17:54:02 2009
> New Revision: 192590
> URL: http://svn.freebsd.org/changeset/base/192590
> 
> Log:
>   some ports erroneously use the existence of AT_FDCWD to check for
>   the availability of the *at system calls so s/AT_FDCWD/AT_FDCWD_notyet/g
>   
>   Reported by: Dimitry Andric

I wonder if it wouldn't be appropriate to just remove the dirfd bits entirely 
from 7.x for now.  I.e. remove NDINIT_AT(), AT_FDCWD_notyet, the 'dirfd' 
member from the structure, the 'dirfd' parameter from NDINIT_ALL(), etc.  ZFS 
only really needed NDINIT_ATVP(), yes?

> Modified:
>   stable/7/sys/sys/fcntl.h
>   stable/7/sys/sys/namei.h
> 
> Modified: stable/7/sys/sys/fcntl.h
> 
==============================================================================
> --- stable/7/sys/sys/fcntl.h	Fri May 22 16:46:01 2009	(r192589)
> +++ stable/7/sys/sys/fcntl.h	Fri May 22 17:54:02 2009	(r192590)
> @@ -110,7 +110,7 @@ typedef	__pid_t		pid_t;
>   * to determine the target of relative file paths in the openat() and
>   * similar syscalls.
>   */
> -#define	AT_FDCWD		-100
> +#define	AT_FDCWD_notyet		-100
>  
>  /* Defined by POSIX 1003.1; BSD default, but must be distinct from 
O_RDONLY. */
>  #define	O_NOCTTY	0x8000		/* don't assign controlling terminal */
> 
> Modified: stable/7/sys/sys/namei.h
> 
==============================================================================
> --- stable/7/sys/sys/namei.h	Fri May 22 16:46:01 2009	(r192589)
> +++ stable/7/sys/sys/namei.h	Fri May 22 17:54:02 2009	(r192590)
> @@ -154,11 +154,11 @@ struct nameidata {
>   * Initialization of a nameidata structure.
>   */
>  #define	NDINIT(ndp, op, flags, segflg, namep, td)			\
> -	NDINIT_ALL(ndp, op, flags, segflg, namep, AT_FDCWD, NULL, td)
> +	NDINIT_ALL(ndp, op, flags, segflg, namep, AT_FDCWD_notyet, NULL, td)
>  #define	NDINIT_AT(ndp, op, flags, segflg, namep, dirfd, td)		\
>  	NDINIT_ALL(ndp, op, flags, segflg, namep, dirfd, NULL, td)
>  #define	NDINIT_ATVP(ndp, op, flags, segflg, namep, vp, td)		\
> -	NDINIT_ALL(ndp, op, flags, segflg, namep, AT_FDCWD, vp, td)
> +	NDINIT_ALL(ndp, op, flags, segflg, namep, AT_FDCWD_notyet, vp, td)
>  
>  static __inline void
>  NDINIT_ALL(struct nameidata *ndp,
> 



-- 
John Baldwin


More information about the svn-src-stable-7 mailing list