aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/ldaptree.c
diff options
context:
space:
mode:
authorDavid M. Syzdek <david@syzdek.net>2019-10-23 22:09:17 -0800
committerDavid M. Syzdek <david@syzdek.net>2019-10-23 22:09:17 -0800
commit31325345994fd4f6e88929eb0cd7eb19b49eb6a1 (patch)
treeda6e73d8fd261f4eacc397ddda630edc71f2d8d1 /src/ldaptree.c
parent61d6267abebc80986a8b80af45ad54c9f1a72c4e (diff)
downloadldap-utils-31325345994fd4f6e88929eb0cd7eb19b49eb6a1.tar.gz
ldap-utils-31325345994fd4f6e88929eb0cd7eb19b49eb6a1.tar.bz2
ldap-utils-31325345994fd4f6e88929eb0cd7eb19b49eb6a1.tar.xz
ldap-utils-31325345994fd4f6e88929eb0cd7eb19b49eb6a1.zip
ldaptree: adding --expand option
Diffstat (limited to 'src/ldaptree.c')
-rw-r--r--src/ldaptree.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ldaptree.c b/src/ldaptree.c
index 9ee6451..d6a4263 100644
--- a/src/ldaptree.c
+++ b/src/ldaptree.c
@@ -160,6 +160,7 @@ void ldaputils_usage(void)
160 printf(" --max-nodes=num maximum branches and leafs on each node to display\n"); 160 printf(" --max-nodes=num maximum branches and leafs on each node to display\n");
161 printf(" --style=format output format of bullets or hierarchy (default: hierarchy)\n"); 161 printf(" --style=format output format of bullets or hierarchy (default: hierarchy)\n");
162 printf(" --compact remove white space used for styling\n"); 162 printf(" --compact remove white space used for styling\n");
163 printf(" --expand expand DN prefix\n");
163 printf("\nReport bugs to <%s>.\n", PACKAGE_BUGREPORT); 164 printf("\nReport bugs to <%s>.\n", PACKAGE_BUGREPORT);
164 return; 165 return;
165} 166}
@@ -260,6 +261,7 @@ int my_config(int argc, char * argv[], MyConfig ** cnfp)
260 static char short_options[] = MY_SHORT_OPTIONS; 261 static char short_options[] = MY_SHORT_OPTIONS;
261 static struct option long_options[] = 262 static struct option long_options[] =
262 { 263 {
264 {"expand", no_argument, 0, '2'},
263 {"compact", no_argument, 0, '3'}, 265 {"compact", no_argument, 0, '3'},
264 {"style", required_argument, 0, '4'}, 266 {"style", required_argument, 0, '4'},
265 {"style", required_argument, 0, '4'}, 267 {"style", required_argument, 0, '4'},
@@ -317,6 +319,10 @@ int my_config(int argc, char * argv[], MyConfig ** cnfp)
317 my_unbind(cnf); 319 my_unbind(cnf);
318 return(1); 320 return(1);
319 321
322 case '2':
323 cnf->treeopts.expandall = 1;
324 break;
325
320 case '3': 326 case '3':
321 cnf->treeopts.compact = 1; 327 cnf->treeopts.compact = 1;
322 break; 328 break;