about summary refs log tree commit diff
path: root/sysdeps/unix
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-03-20 08:32:39 +0000
committerUlrich Drepper <drepper@redhat.com>2001-03-20 08:32:39 +0000
commitc200ecdff48ea1cedd00e6019e436459f3d2023a (patch)
tree53982d25b822a52304f04721c462d26a3b0bc4de /sysdeps/unix
parent2541eda0d4528470d93c71be0a0b74b9dcae9b14 (diff)
downloadglibc-c200ecdff48ea1cedd00e6019e436459f3d2023a.tar.gz
glibc-c200ecdff48ea1cedd00e6019e436459f3d2023a.tar.xz
glibc-c200ecdff48ea1cedd00e6019e436459f3d2023a.zip
Update.
2001-03-20  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/unix/sysv/linux/pathconf.c (__pathconf): Return
	LINUX_LINK_MAX only if the statfs function is not implemented for
	the filesystem.

	* sysdeps/unix/sysv/linux/fpathconf.c (__fpathconf): Return
	LINUX_LINK_MAX only if the fstatfs function is not implemented for
	the filesystem.
Diffstat (limited to 'sysdeps/unix')
-rw-r--r--sysdeps/unix/sysv/linux/fpathconf.c13
-rw-r--r--sysdeps/unix/sysv/linux/pathconf.c13
2 files changed, 20 insertions, 6 deletions
diff --git a/sysdeps/unix/sysv/linux/fpathconf.c b/sysdeps/unix/sysv/linux/fpathconf.c
index c56fdc629b..326a43dfe0 100644
--- a/sysdeps/unix/sysv/linux/fpathconf.c
+++ b/sysdeps/unix/sysv/linux/fpathconf.c
@@ -1,5 +1,5 @@
 /* Linux specific extensions to fpathconf.
-   Copyright (C) 1991, 95, 96, 98, 99, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1991,95,96,98,99,2000,2001 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
@@ -17,6 +17,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#include <errno.h>
 #include <unistd.h>
 #include <limits.h>
 #include <sys/statfs.h>
@@ -42,8 +43,14 @@ __fpathconf (fd, name)
 
       /* Determine the filesystem type.  */
       if (__fstatfs (fd, &fsbuf) < 0)
-	/* not possible, return the default value.  */
-	return LINUX_LINK_MAX;
+	{
+	  if (errno == ENOSYS)
+	    /* not possible, return the default value.  */
+	    return LINUX_LINK_MAX;
+
+	  /* Some error occured.  */
+          return -1;
+	}
 
       switch (fsbuf.f_type)
 	{
diff --git a/sysdeps/unix/sysv/linux/pathconf.c b/sysdeps/unix/sysv/linux/pathconf.c
index 6e7cdabfad..5bd408f51c 100644
--- a/sysdeps/unix/sysv/linux/pathconf.c
+++ b/sysdeps/unix/sysv/linux/pathconf.c
@@ -1,5 +1,5 @@
 /* Linux specific extensions to pathconf.
-   Copyright (C) 1991, 95, 96, 98, 99, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1991,95,96,98,99,2000,2001 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
@@ -17,6 +17,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#include <errno.h>
 #include <unistd.h>
 #include <limits.h>
 #include <sys/statfs.h>
@@ -42,8 +43,14 @@ __pathconf (path, name)
 
       /* Determine the filesystem type.  */
       if (__statfs (path, &fsbuf) < 0)
-	/* not possible, return the default value.  */
-	return LINUX_LINK_MAX;
+	{
+	  if (errno == ENOSYS)
+	    /* not possible, return the default value.  */
+	    return LINUX_LINK_MAX;
+
+	  /* Some error occured.  */
+          return -1;
+	}
 
       switch (fsbuf.f_type)
 	{