diff options
author | Ulrich Drepper <drepper@redhat.com> | 2001-01-25 10:04:35 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2001-01-25 10:04:35 +0000 |
commit | 2da161d47ec70b963b50bcce16e63c67bc9b0706 (patch) | |
tree | 0290b44b610c58035684a60ff325a4433b8cd858 /sysdeps/posix/pathconf.c | |
parent | 7287c36dd8896ba1ddf72b0e5dc4b7baebee1b60 (diff) | |
download | glibc-2da161d47ec70b963b50bcce16e63c67bc9b0706.tar.gz |
Update.
* sysdeps/generic/bits/confname.h: Define _PC_REC_INCR_XFER_SIZE,
_PC_REC_MAX_XFER_SIZE, _PC_REC_MIN_XFER_SIZE, and
_PC_REC_XFER_ALIGN.
* sysdeps/posix/pathconf.c (__pathconf): Implement handling of
_PC_REC_INCR_XFER_SIZE, _PC_REC_MAX_XFER_SIZE,
_PC_REC_MIN_XFER_SIZE, and _PC_REC_XFER_ALIGN.
Diffstat (limited to 'sysdeps/posix/pathconf.c')
-rw-r--r-- | sysdeps/posix/pathconf.c | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/sysdeps/posix/pathconf.c b/sysdeps/posix/pathconf.c index b6181c3b33..f6d0253f69 100644 --- a/sysdeps/posix/pathconf.c +++ b/sysdeps/posix/pathconf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1995, 1996, 1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1991,1995,1996,1998,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 @@ -162,6 +162,41 @@ __pathconf (const char *path, int name) /* We let platforms with larger file sizes overwrite this value. */ return 32; #endif + + + case _PC_REC_INCR_XFER_SIZE: + /* XXX It is not entirely clear what the limit is supposed to do. + What is incremented? */ + return -1; + + case _PC_REC_MAX_XFER_SIZE: + /* XXX It is not entirely clear what the limit is supposed to do. + In general there is no top limit of the number of bytes which + case be transported at once. */ + return -1; + + case _PC_REC_MIN_XFER_SIZE: + { + /* XXX It is not entirely clear what the limit is supposed to do. + I assume this is the block size of the filesystem. */ + struct statvfs64 sv; + + if (__statvfs64 (path, &sv) < 0) + return -1; + return sv.f_bsize; + } + + case _PC_REC_XFER_ALIGN: + { + /* 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; + } } } |