9757 getent ipnodes has wrong exit status

Review Request #1172 — Created Aug. 19, 2018 and submitted

ptribble
illumos-gate
9757
general

According to the manpage, getent should exit with status 3 if enumeration is requested on a database that supports it. For ipnodes, that isn't true:

$ getent ethers
Enumeration not supported on ethers
$ echo $?
3
$ getent ipnodes
Enumeration not supported on ipnodes
$ echo $?
0

The functional change here is at line 102, the rest is cstyle.

Verified that lookups worked as before. And that the exit status is now correct:

$ ./getent ipnodes
Enumeration not supported on ipnodes
$ echo $?
3
tsoome
  1. Ship It!
  2. 
      
andy_js
  1. Ship It!
  2. 
      
domag02
  1. Ship It!
  2. 
      
ptribble
Review request changed

Status: Closed (submitted)

Loading...