summary refs log tree commit diff
path: root/manual/filesys.texi
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-04-09 04:55:59 +0000
committerUlrich Drepper <drepper@redhat.com>2001-04-09 04:55:59 +0000
commiteacde9d0818dac743bc5c2562e35f0a6e949327e (patch)
treed117012b09ea03667334e4fb4be8ab15c41509d5 /manual/filesys.texi
parent4c4505561671f07c4f1b9e39cc0a0fa271a6c8be (diff)
downloadglibc-eacde9d0818dac743bc5c2562e35f0a6e949327e.tar.gz
glibc-eacde9d0818dac743bc5c2562e35f0a6e949327e.tar.xz
glibc-eacde9d0818dac743bc5c2562e35f0a6e949327e.zip
Update.
2001-04-08  Hans-Peter Nilsson  <hp@axis.com>

	* sysdeps/unix/sysv/linux/cris/Dist: New file.
	* sysdeps/unix/sysv/linux/cris/Makefile: New file.
	* sysdeps/unix/sysv/linux/cris/_G_config.h: New file.
	* sysdeps/unix/sysv/linux/cris/bits/fcntl.h: New file.
	* sysdeps/unix/sysv/linux/cris/bits/mman.h: New file.
	* sysdeps/unix/sysv/linux/cris/bits/resource.h: New file.
	* sysdeps/unix/sysv/linux/cris/brk.c: New file.
	* sysdeps/unix/sysv/linux/cris/chown.c: New file.
	* sysdeps/unix/sysv/linux/cris/clone.S: New file.
	* sysdeps/unix/sysv/linux/cris/fchown.c: New file.
	* sysdeps/unix/sysv/linux/cris/fcntl.c: New file.
	* sysdeps/unix/sysv/linux/cris/fxstat.c: New file.
	* sysdeps/unix/sysv/linux/cris/getegid.c: New file.
	* sysdeps/unix/sysv/linux/cris/geteuid.c: New file.
	* sysdeps/unix/sysv/linux/cris/getgid.c: New file.
	* sysdeps/unix/sysv/linux/cris/getgroups.c: New file.
	* sysdeps/unix/sysv/linux/cris/getresgid.c: New file.
	* sysdeps/unix/sysv/linux/cris/getresuid.c: New file.
	* sysdeps/unix/sysv/linux/cris/getrlimit.c: New file.
	* sysdeps/unix/sysv/linux/cris/getrlimit64.c: New file.
	* sysdeps/unix/sysv/linux/cris/getuid.c: New file.
	* sysdeps/unix/sysv/linux/cris/lchown.c: New file.
	* sysdeps/unix/sysv/linux/cris/lockf64.c: New file.
	* sysdeps/unix/sysv/linux/cris/lxstat.c: New file.
	* sysdeps/unix/sysv/linux/cris/mmap.S: New file.
	* sysdeps/unix/sysv/linux/cris/mmap64.S: New file.
	* sysdeps/unix/sysv/linux/cris/msgctl.c: New file.
	* sysdeps/unix/sysv/linux/cris/profil-counter.h: New file.
	* sysdeps/unix/sysv/linux/cris/register-dump.h: New file.
	* sysdeps/unix/sysv/linux/cris/semctl.c: New file.
	* sysdeps/unix/sysv/linux/cris/setegid.c: New file.
	* sysdeps/unix/sysv/linux/cris/seteuid.c: New file.
	* sysdeps/unix/sysv/linux/cris/setfsgid.c: New file.
	* sysdeps/unix/sysv/linux/cris/setfsuid.c: New file.
	* sysdeps/unix/sysv/linux/cris/setgid.c: New file.
	* sysdeps/unix/sysv/linux/cris/setgroups.c: New file.
	* sysdeps/unix/sysv/linux/cris/setregid.c: New file.
	* sysdeps/unix/sysv/linux/cris/setresgid.c: New file.
	* sysdeps/unix/sysv/linux/cris/setresuid.c: New file.
	* sysdeps/unix/sysv/linux/cris/setreuid.c: New file.
	* sysdeps/unix/sysv/linux/cris/setrlimit.c: New file.
	* sysdeps/unix/sysv/linux/cris/setuid.c: New file.
	* sysdeps/unix/sysv/linux/cris/shmctl.c: New file.
	* sysdeps/unix/sysv/linux/cris/socket.S: New file.
	* sysdeps/unix/sysv/linux/cris/sys/ucontext.h: New file.
	* sysdeps/unix/sysv/linux/cris/syscall.S: New file.
	* sysdeps/unix/sysv/linux/cris/sysdep.S: New file.
	* sysdeps/unix/sysv/linux/cris/sysdep.h: New file.
	* sysdeps/unix/sysv/linux/cris/vfork.S: New file.
	* sysdeps/unix/sysv/linux/cris/xstat.c: New file.

2001-04-08  Hans-Peter Nilsson  <hp@axis.com>

	* sysdeps/cris/Dist: New file.
	* sysdeps/cris/Implies: New file.
	* sysdeps/cris/Makefile: New file.
	* sysdeps/cris/__longjmp.S: New file.
	* sysdeps/cris/_mcount.S: New file.
	* sysdeps/cris/bits/endian.h: New file.
	* sysdeps/cris/bits/setjmp.h: New file.
	* sysdeps/cris/bits/string.h: New file.
	* sysdeps/cris/dl-machine.h: New file.
	* sysdeps/cris/elf/start.S: New file.
	* sysdeps/cris/machine-gmon.h: New file.
	* sysdeps/cris/memcopy.h: New file.
	* sysdeps/cris/memusage.h: New file.
	* sysdeps/cris/setjmp.S: New file.
	* sysdeps/cris/sysdep.h: New file.
	* sysdeps/cris/wordcopy.c: New file.

2001-04-08  Hans-Peter Nilsson  <hp@axis.com>

	* elf/elf.h: Add new relocations for CRIS.

2001-04-08  Hans-Peter Nilsson  <hp@axis.com>

	* shlib-versions: Add cases for Linux on CRIS.

2001-04-08  Hans-Peter Nilsson  <hp@axis.com>

	* configure.in (ASM_LINE_SEP tests): Handle CRIS assembly, with
	';' for comments and '@' for line separator.

2001-04-08  Hans-Peter Nilsson  <hp@axis.com>

	* sysdeps/unix/sysv/linux/hppa/sysdep.h (INLINE_SYSCALL): Fix
	typo; s/==/=/ for assignment.

2001-04-08  Hans-Peter Nilsson  <hp@axis.com>

	* malloc/Makefile: Correct comment; mtrace is Perl, not AWK.

2001-04-08  Hans-Peter Nilsson  <hp@axis.com>

	* iconv/gconv_simple.c (internal_ucs4_loop_unaligned): Check for
	empty input before checking full output.

2001-04-08  Hans-Peter Nilsson  <hp@axis.com>

	* iconv/gconv.c (__gconv): Don't derefer parameter cd before
	checking if == -1L.

2001-04-08  Ulrich Drepper  <drepper@redhat.com>

	* inet/rexec.c (rexec_af): Avoid calling perror with errno being set.
Diffstat (limited to 'manual/filesys.texi')
-rw-r--r--manual/filesys.texi85
1 files changed, 84 insertions, 1 deletions
diff --git a/manual/filesys.texi b/manual/filesys.texi
index e54f63dfc5..d7ab4e4a7f 100644
--- a/manual/filesys.texi
+++ b/manual/filesys.texi
@@ -1065,7 +1065,23 @@ purpose is to obtain information about the link.  @code{link}, the
 function that makes a hard link, does too.  It makes a hard link to the
 symbolic link, which one rarely wants.
 
-Prototypes for the functions listed in this section are in
+Some systems have for some functions operating on files have a limit on
+how many symbolic links are followed when resolving a path name.  The
+limit if it exists is published in the @file{sys/param.h} header file.
+
+@comment sys/param.h
+@comment BSD
+@deftypevr Macro int MAXSYMLINKS
+
+The macro @code{MAXSYMLINKS} specifies how many symlinks some function
+will follow before returning @code{ELOOP}.  Not all functions behave the
+same and this value is not the same a that returned for
+@code{_SC_SYMLOOP} by @code{sysconf}.  In fact, the @code{sysconf}
+result can indicate that there is no fixed limit although
+@code{MAXSYMLINKS} exists and has a finite value.
+@end deftypevr
+
+Prototypes for most of the functions listed in this section are in
 @file{unistd.h}.
 @pindex unistd.h
 
@@ -1153,6 +1169,73 @@ A hardware error occurred while reading or writing data on the disk.
 @c @end group
 @end deftypefun
 
+In some situations it is desirable to resolve all the to get the real
+name of a file where no prefix names a symbolic link which is followed
+and no filename in the path is @code{.} or @code{..}.  This is for
+instance desirable if files have to be compare in which case different
+names can refer to the same inode.
+
+@comment stdlib.h
+@comment GNU
+@deftypefun {char *} canonicalize_file_name (const char *@var{name})
+
+The @code{canonicalize_file_name} function returns the absolute name of
+the file named by @var{name} which contains no @code{.}, @code{..}
+components nor any repeated path separators (@code{/}) or symlinks.  The
+result is passed back as the return value of the function in a block of
+memory allocated with @code{malloc}.  If the result is not used anymore
+the memory should be freed with a call to @code{free}.
+
+In any of the path components except the last one is missing the
+function returns a NULL pointer.  This is also what is returned if the
+length of the path reaches or exceeds @code{PATH_MAX} characters.  In
+any case @code{errno} is set accordingly.
+
+@table @code
+@item ENAMETOOLONG
+The resulting path is too long.  This error only occurs on systems which
+have a limit on the file name length.
+
+@item EACCES
+At least one of the path components is not readable.
+
+@item ENOENT
+The input file name is empty.
+
+@item ENOENT
+At least one of the path components does not exist.
+
+@item ELOOP
+More than @code{MAXSYMLINKS} many symlinks have been followed.
+@end table
+
+This function is a GNU extension and is declared in @file{stdlib.h}.
+@end deftypefun
+
+The Unix standard includes a similar function which differs from
+@code{canonicalize_file_name} in that the user has to provide the buffer
+where the result is placed in.
+
+@comment stdlib.h
+@comment XPG
+@deftypefun {char *} realpath (const char *restrict @var{name}, char *restrict @var{resolved})
+
+The @code{realpath} function behaves just like
+@code{canonicalize_file_name} but instead of allocating a buffer for the
+result it is placed in the buffer pointed to by @var{resolved}.
+
+One other difference is that the buffer @var{resolved} will contain the
+part of the path component which does not exist or is not readable if
+the function returns @code{NULL} and @code{errno} is set to
+@code{EACCES} or @code{ENOENT}.
+
+This function is declared in @file{stdlib.h}.
+@end deftypefun
+
+The advantage of using this function is that it is more widely
+available.  The drawback is that it reports failures for long path on
+systems which have no limits on the file name length.
+
 @node Deleting Files
 @section Deleting Files
 @cindex deleting a file