From a3bbce5b6895a927b60ba92e384e9682afb9d8c3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 22 Apr 2001 17:37:40 +0000 Subject: Update. 2001-04-22 Ulrich Drepper * 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. --- sysdeps/posix/fpathconf.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'sysdeps/posix/fpathconf.c') diff --git a/sysdeps/posix/fpathconf.c b/sysdeps/posix/fpathconf.c index 93f0b99590..539a6caa25 100644 --- a/sysdeps/posix/fpathconf.c +++ b/sysdeps/posix/fpathconf.c @@ -202,6 +202,23 @@ __fpathconf (fd, 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 (__fstatvfs64 (fd, &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; } } -- cgit v1.2.3