From 791cfdb7268e0bcb4efb5d85c8117fca5009572c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 3 Mar 1999 00:31:05 +0000 Subject: 1999-03-03 Roland McGrath * sysdeps/mach/hurd/bits/fcntl.h [__USE_GNU] (O_NOFOLLOW, O_DIRECTORY): New macros. * hurd/hurdlookup.c (__hurd_file_name_lookup): If O_NOFOLLOW is set, set O_NOTRANS as well. (__hurd_file_name_lookup_retry): At successful end of lookup, if O_NOFOLLOW set, io_stat the resultant port and fail with ENOENT if it is a translated node not owned by root. (__hurd_file_name_lookup): If O_DIRECTORY is set, put a trailing slash on the file name passed to LOOKUP. --- sysdeps/mach/hurd/bits/fcntl.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sysdeps') diff --git a/sysdeps/mach/hurd/bits/fcntl.h b/sysdeps/mach/hurd/bits/fcntl.h index 962e772..9195d8c 100644 --- a/sysdeps/mach/hurd/bits/fcntl.h +++ b/sysdeps/mach/hurd/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for GNU. - Copyright (C) 1993, 1994, 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1993,94,96,97,98,99 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -52,6 +52,9 @@ #ifdef __USE_GNU # define O_NOLINK 0x0040 /* No name mappings on final component. */ # define O_NOTRANS 0x0080 /* No translator on final component. */ + +# define O_NOFOLLOW 0x00100000 /* Produce ENOENT if file is a symlink. */ +# define O_DIRECTORY 0x00200000 /* Produce ENOTDIR if not a directory. */ #endif -- cgit v1.1