about summary refs log tree commit diff
path: root/sysdeps/posix/pathconf.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-04-22 17:37:40 +0000
committerUlrich Drepper <drepper@redhat.com>2001-04-22 17:37:40 +0000
commita3bbce5b6895a927b60ba92e384e9682afb9d8c3 (patch)
treed887d4cc901a31f44c93ad69e578380df84b88ec /sysdeps/posix/pathconf.c
parente17e51b4dac7c359049a915d380c4793231e0eda (diff)
downloadglibc-a3bbce5b6895a927b60ba92e384e9682afb9d8c3.tar.gz
glibc-a3bbce5b6895a927b60ba92e384e9682afb9d8c3.tar.xz
glibc-a3bbce5b6895a927b60ba92e384e9682afb9d8c3.zip
Update.
2001-04-22  Ulrich Drepper  <drepper@redhat.com>

	* posix/getconf.c: Fix names of XBS5 LFS test variables.
	Add missing configuration variables from XPG6.
	* posix/tst-getconf.c: New file.
	* posix/Makefile (generated): Add tst-getconf.out.
	(tests): Add ($objpfx)tst-getconf.out.
	Add rule to run tst-getconf.sh.
	* sysdeps/generic/bits/confname.h: Add missing _PC_ and _SC_ values
	from XPG6.
	* sysdeps/posix/fpathconf.c: Add handling of _PC_ALLOC_SIZE_MIN and
	_PC_SYMLINK_MAX.
	* sysdeps/posix/pathconf.c: Likewise.
	* sysdeps/posix/sysconf.c: Correct spelling of _SC_MULTI_PROCESS
	and _SC_SYMLOOP_MAX.
Diffstat (limited to 'sysdeps/posix/pathconf.c')
-rw-r--r--sysdeps/posix/pathconf.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/sysdeps/posix/pathconf.c b/sysdeps/posix/pathconf.c
index edb3961c67..4ce5c0d1d7 100644
--- a/sysdeps/posix/pathconf.c
+++ b/sysdeps/posix/pathconf.c
@@ -198,6 +198,23 @@ __pathconf (const char *path, int name)
 	  return -1;
 	return sv.f_frsize;
       }
+
+    case _PC_ALLOC_SIZE_MIN:
+      {
+	/* XXX It is not entirely clear what the limit is supposed to do.
+	   I assume that the number should reflect the minimal block
+	   alignment.  */
+	struct statvfs64 sv;
+
+	if (__statvfs64 (path, &sv) < 0)
+	  return -1;
+	return sv.f_frsize;
+      }
+
+    case _PC_SYMLINK_MAX:
+      /* In general there are no limits.  If a system has one it should
+	 overwrite this case.  */
+      return -1;
     }
 }