diff options
author | alfred <alfred@FreeBSD.org> | 2002-11-16 06:35:20 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2002-11-16 06:35:20 +0000 |
commit | a858c2cb5c0438dd0886b2672ecba35cc82bf1dc (patch) | |
tree | b00a8e8325ea63aa43dee63c0862de9a487f55e4 /lib/libc/gen/sysconf.c | |
parent | 312b33b9d085b1ace8ba04871901cb08828aef2a (diff) | |
download | FreeBSD-src-a858c2cb5c0438dd0886b2672ecba35cc82bf1dc.zip FreeBSD-src-a858c2cb5c0438dd0886b2672ecba35cc82bf1dc.tar.gz |
Provide more correct default values for sysconf(3) reporting of the AIO
subsystems capabilities:
_SC_AIO_LISTIO_MAX returns the default of _POSIX_AIO_LISTIO_MAX
_SC_AIO_MAX returns the default _POSIX_AIO_MAX
_SC_AIO_PRIO_DELTA_MAX returns the default of 0
Without these adjustments the values returned are -1 even when the
aio side of the kernel returns '0' for them which is incorrect.
Noticed by: Craig Rodrigues <rodrigc@attbi.com>
Diffstat (limited to 'lib/libc/gen/sysconf.c')
-rw-r--r-- | lib/libc/gen/sysconf.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libc/gen/sysconf.c b/lib/libc/gen/sysconf.c index 2f1dcca..aa906f6 100644 --- a/lib/libc/gen/sysconf.c +++ b/lib/libc/gen/sysconf.c @@ -254,14 +254,17 @@ do_NAME_MAX: return (_POSIX_TIMERS); #endif case _SC_AIO_LISTIO_MAX: + defaultresult = _POSIX_AIO_LISTIO_MAX; mib[0] = CTL_P1003_1B; mib[1] = CTL_P1003_1B_AIO_LISTIO_MAX; goto yesno; case _SC_AIO_MAX: + defaultresult = _POSIX_AIO_MAX; mib[0] = CTL_P1003_1B; mib[1] = CTL_P1003_1B_AIO_MAX; goto yesno; case _SC_AIO_PRIO_DELTA_MAX: + defaultresult = 0; mib[0] = CTL_P1003_1B; mib[1] = CTL_P1003_1B_AIO_PRIO_DELTA_MAX; goto yesno; |