NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: using getent(3) and specifying more arguments after the key?
In article <alpine.NEB.2.02.1406251238390.26529%t1.m.reedmedia.net@localhost>,
Jeremy C. Reed <reed%reedmedia.net@localhost> wrote:
>The getent.1 manual says:
>
> For cgetcap(3) style databases (disktab, printcap) specifying a key,
> lists the entry for that key, and specifying more arguments after the key
> are used as fields in that key, and only the values of the keys are
> returned. For boolean keys true is returned if the key is found. If a
> key is not found, then false is always returned.
>
>I only looked at this part of the code briefly. I think the manpage
>means to say:
>
>"... only the values of the fields are returned. For boolean fields,
>`true' is returned if the field is found. If a field is not found, then
>`false' is always returned."
>
>But I cannot reproduce it, for example:
>
>t1:reed$ getent disktab floppy ty
>t1:reed$ getent disktab floppy ob
>t1:reed$ getent disktab floppy pc
>t1:reed$ getent gettytab Console rw
>
>But I would think it would be like this:
>
>t1:reed$ getent disktab floppy ty
>floppy
>t1:reed$ getent disktab floppy ob
>0
>t1:reed$ getent disktab floppy pc
>2880
>t1:reed$ getent gettytab Console rw
>true
>
>Note that getent with the entry does work:
>
>t1:reed$ getent disktab floppy
>floppy|3.5in High Density
>Floppy:ty=floppy:se#512:nt#2:rm#300:ns#18:nc#80:pa#2880:oa#0:ba#4096:fa#512:ta=4.2BSD:pb#2880:ob#0:pc#2880:oc#0:
>
Looks broken to me. Fix it.
christos
Home |
Main Index |
Thread Index |
Old Index