Changed to print a colon after the key when -k option is specified.
This is the behavior of the traditional ypmatch utility.
This commit is contained in:
parent
17033bca9c
commit
f5b6798f9a
@ -27,7 +27,7 @@
|
||||
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
.\"
|
||||
.\" $Id: ypmatch.1,v 1.3 1994/10/28 16:49:37 deraadt Exp $
|
||||
.\" $Id: ypmatch.1,v 1.4 1996/05/07 00:44:20 jtc Exp $
|
||||
.\"
|
||||
.Dd December 3, 1993
|
||||
.Dt YPMATCH 1
|
||||
@ -56,7 +56,7 @@ The options are as follows:
|
||||
.It Fl d Ar domainname
|
||||
Specify a domain other than the default domain.
|
||||
.It Fl k
|
||||
Display map keys.
|
||||
Print the map key followed by a colon, before printing key value.
|
||||
This option is useful with maps in which the values are null or the key
|
||||
is not part of the value.
|
||||
.It Fl t
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ypmatch.c,v 1.6 1996/04/30 22:58:31 jtc Exp $ */
|
||||
/* $NetBSD: ypmatch.c,v 1.7 1996/05/07 00:44:21 jtc Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993 Theo de Raadt <deraadt@fsa.ca>
|
||||
@ -33,7 +33,7 @@
|
||||
*/
|
||||
|
||||
#ifndef LINT
|
||||
static char rcsid[] = "$NetBSD: ypmatch.c,v 1.6 1996/04/30 22:58:31 jtc Exp $";
|
||||
static char rcsid[] = "$NetBSD: ypmatch.c,v 1.7 1996/05/07 00:44:21 jtc Exp $";
|
||||
#endif
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -126,7 +126,7 @@ char **argv;
|
||||
switch(r) {
|
||||
case 0:
|
||||
if(key)
|
||||
printf("%s ", inkey);
|
||||
printf("%s: ", inkey);
|
||||
printf("%*.*s\n", outbuflen, outbuflen, outbuf);
|
||||
break;
|
||||
case YPERR_YPBIND:
|
||||
|
Loading…
Reference in New Issue
Block a user