diff options
Diffstat (limited to 'utils/exportfs/exportfs.c')
-rw-r--r-- | utils/exportfs/exportfs.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c index 019961b..9ea86cb 100644 --- a/utils/exportfs/exportfs.c +++ b/utils/exportfs/exportfs.c @@ -666,6 +666,9 @@ dumpopt(char c, char *fmt, ...) static void dump(int verbose, int export_format) { + char buf[1024]; + char *bp; + int len; nfs_export *exp; struct exportent *ep; int htype; @@ -683,7 +686,15 @@ dump(int verbose, int export_format) if (strlen(ep->e_path) > 14 && !export_format) printf("%-14s\n\t\t%s", ep->e_path, hname); else - printf(((export_format)? "%s %s" : "%-14s\t%s"), ep->e_path, hname); + if (export_format) { + bp = buf; + len = sizeof(buf) - 1; + qword_add(&bp, &len, ep->e_path); + *bp = '\0'; + printf("%s %s", buf, hname); + } else { + printf("%-14s\t%s", ep->e_path, hname); + } if (!verbose && !export_format) { printf("\n"); |