[Toybox] getconf NPROCESSORS_ONLN broken

enh enh at google.com
Fri Sep 28 14:41:35 PDT 2018


$ ./toybox getconf NPROCESSORS_CONF NPROCESSORS_ONLN
48
2097152

seems like this isn't working:

  # Extract names, remove blank lines, filter, replace unknown #defines
  # with UNKNOWN
  sed -n "/char [*]${1}_names[[]/"',/^}/s/[^"]*"\([^"]*\) *",*/\1\n/pg' \
    toys/posix/getconf.c | grep -v '^$' | $2 |
    sed -e "$DEFINES" -e "t;d;a UNKNOWN" | xargs | tr ' ' ',' &&
  echo '};'

glibc doesn't have an _XOPEN_UUCP but instead of the promised UNKNOWN,
everything after that is just off-by-one...


More information about the Toybox mailing list