mirror of
https://github.com/samba-team/samba.git
synced 2024-12-27 03:21:53 +03:00
r159: nicer usage messages when no URL is given
This commit is contained in:
parent
e776ce4f9e
commit
8655f0b435
@ -101,8 +101,8 @@ static int process_file(struct ldb_context *ldb, FILE *f)
|
||||
}
|
||||
|
||||
if (!ldb_url) {
|
||||
fprintf(stderr, "You must specify a ldb URL\n");
|
||||
exit(1);
|
||||
fprintf(stderr, "You must specify a ldb URL\n\n");
|
||||
usage();
|
||||
}
|
||||
|
||||
argc -= optind;
|
||||
|
@ -67,8 +67,8 @@ static void usage(void)
|
||||
}
|
||||
|
||||
if (!ldb_url) {
|
||||
fprintf(stderr, "You must specify a ldb URL\n");
|
||||
exit(1);
|
||||
fprintf(stderr, "You must specify a ldb URL\n\n");
|
||||
usage();
|
||||
}
|
||||
|
||||
argc -= optind;
|
||||
|
@ -281,7 +281,7 @@ static void usage(void)
|
||||
editor = "vi";
|
||||
}
|
||||
|
||||
while ((opt = getopt(argc, argv, "ab:e:H:s:")) != EOF) {
|
||||
while ((opt = getopt(argc, argv, "hab:e:H:s:")) != EOF) {
|
||||
switch (opt) {
|
||||
case 'b':
|
||||
basedn = optarg;
|
||||
@ -317,8 +317,8 @@ static void usage(void)
|
||||
}
|
||||
|
||||
if (!ldb_url) {
|
||||
fprintf(stderr, "You must specify a ldb URL\n");
|
||||
exit(1);
|
||||
fprintf(stderr, "You must specify a ldb URL\n\n");
|
||||
usage();
|
||||
}
|
||||
|
||||
argc -= optind;
|
||||
|
@ -103,8 +103,8 @@ static int process_file(struct ldb_context *ldb, FILE *f)
|
||||
}
|
||||
|
||||
if (!ldb_url) {
|
||||
fprintf(stderr, "You must specify a ldb URL\n");
|
||||
exit(1);
|
||||
fprintf(stderr, "You must specify a ldb URL\n\n");
|
||||
usage();
|
||||
}
|
||||
|
||||
argc -= optind;
|
||||
|
@ -86,8 +86,8 @@ static void usage(void)
|
||||
}
|
||||
|
||||
if (!ldb_url) {
|
||||
fprintf(stderr, "You must specify a ldb URL\n");
|
||||
exit(1);
|
||||
fprintf(stderr, "You must specify a ldb URL\n\n");
|
||||
usage();
|
||||
}
|
||||
|
||||
argc -= optind;
|
||||
|
Loading…
Reference in New Issue
Block a user