mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-21 18:35:27 +08:00
Return error rather than panic if argument is unsupported.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2002-11-29 Eric Norum <eric.norum@usask.ca>
|
||||
|
||||
* src/sysconf.c: Add support for _SC_GETPW_R_SIZE_MAX.
|
||||
Return error rather than panic if argument is unsupported.
|
||||
|
||||
2002-11-19 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac: Cosmetical fixes.
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <rtems/system.h>
|
||||
#include <rtems/score/tod.h>
|
||||
@@ -31,6 +32,9 @@ long sysconf(
|
||||
return rtems_libio_number_iops;
|
||||
}
|
||||
|
||||
case _SC_GETPW_R_SIZE_MAX:
|
||||
return 1024;
|
||||
|
||||
#if defined(__sparc__)
|
||||
case 515: /* Solaris _SC_STACK_PROT */
|
||||
return 0;
|
||||
@@ -40,5 +44,6 @@ long sysconf(
|
||||
break;
|
||||
}
|
||||
|
||||
return POSIX_NOT_IMPLEMENTED();
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user