diff options
| author | msaitoh <msaitoh@NetBSD.org> | 2000-11-21 11:09:24 +0000 |
|---|---|---|
| committer | msaitoh <msaitoh@NetBSD.org> | 2000-11-21 11:09:24 +0000 |
| commit | e633320474017c6e3813cce262fc2db45c77ca3e (patch) | |
| tree | c1d202c2a303b353d5aacf3026d282357a2ae468 /usr.bin/showmount | |
| parent | f8ea339f5562bb75fa8c3fb4175fd0f9db7b11e3 (diff) | |
Insert a tab if the length of the directory > 35 bytes to prevent
concatenation.
Diffstat (limited to 'usr.bin/showmount')
| -rw-r--r-- | usr.bin/showmount/showmount.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/showmount/showmount.c b/usr.bin/showmount/showmount.c index 12e5ee53f03..6d974a66c5f 100644 --- a/usr.bin/showmount/showmount.c +++ b/usr.bin/showmount/showmount.c @@ -1,4 +1,4 @@ -/* $NetBSD: showmount.c,v 1.9 1998/04/02 11:10:52 kleink Exp $ */ +/* $NetBSD: showmount.c,v 1.10 2000/11/21 11:09:24 msaitoh Exp $ */ /* * Copyright (c) 1989, 1993, 1995 @@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993, 1995\n\ #if 0 static char sccsid[] = "@(#)showmount.c 8.3 (Berkeley) 3/29/95"; #endif -__RCSID("$NetBSD: showmount.c,v 1.9 1998/04/02 11:10:52 kleink Exp $"); +__RCSID("$NetBSD: showmount.c,v 1.10 2000/11/21 11:09:24 msaitoh Exp $"); #endif not lint #include <sys/types.h> @@ -116,6 +116,7 @@ main(argc, argv) int estat, rpcs = 0, mntvers = 1; char *host; int ch; + int len; while ((ch = getopt(argc, argv, "ade3")) != -1) switch((char)ch) { @@ -190,7 +191,9 @@ main(argc, argv) printf("Exports list on %s:\n", host); exp = exports; while (exp) { - printf("%-35s", exp->ex_dirp); + len = printf("%-35s", exp->ex_dirp); + if (len > 35) + printf("\t"); grp = exp->ex_groups; if (grp == NULL) { printf("Everyone\n"); |
