avahi_resolve_LDADD = $(AM_LDADD) ../avahi-client/libavahi-client.la ../avahi-common/libavahi-common.la
install-exec-local:
- cd $(DESTDIR)/$(bindir) && rm -f avahi-resolve-host-name avahi-resolve-address && $(LN_S) avahi-resolve avahi-resolve-host-name && $(LN_S) avahi-resolve avahi-resolve-address
+ cd $(DESTDIR)/$(bindir) && \
+ rm -f avahi-resolve-host-name avahi-resolve-address avahi-browse-domains && \
+ $(LN_S) avahi-resolve avahi-resolve-host-name && \
+ $(LN_S) avahi-resolve avahi-resolve-address && \
+ $(LN_S) avahi-browse avahi-browse-domains
endif
}
static void help(FILE *f, const char *argv0) {
- fprintf(f,
- "%s [options] <service type>\n"
- "%s [options] -a\n"
- "%s [options] -D\n\n"
+ if (strstr(argv0, "domain"))
+ fprintf(f, "%s [options] \n\n", argv0);
+ else
+ fprintf(f,
+ "%s [options] <service type>\n"
+ "%s [options] -a\n"
+ "%s [options] -D\n\n",
+ argv0, argv0, argv0);
+
+ fprintf(f,
" -h --help Show this help\n"
" -V --version Show version\n"
" -D --browse-domains Browse for browsing domains instead of services\n"
" -r --resolve Resolve services found\n"
" -f --no-fail Don't fail if the server is not available\n"
#ifdef HAVE_GDBM
- " -k --no-db-lookup Don't lookup service types\n"
+ " -k --no-db-lookup Don't lookup service types\n");
#endif
- , argv0, argv0, argv0);
}
-static int parse_command_line(Config *c, int argc, char *argv[]) {
+static int parse_command_line(Config *c, const char *argv0, int argc, char *argv[]) {
int o;
static const struct option long_options[] = {
assert(c);
- c->command = COMMAND_BROWSE_SERVICES;
+ c->command = strstr(argv0, "domain") ? COMMAND_BROWSE_DOMAINS : COMMAND_BROWSE_SERVICES;
c->verbose =
c->terminate_on_cache_exhausted =
c->terminate_on_all_for_now =
if (n_columns < 40)
n_columns = 40;
- if (parse_command_line(&config, argc, argv) < 0)
+ if (parse_command_line(&config, argv0, argc, argv) < 0)
goto fail;
switch (config.command) {
argv0, strstr(argv0, "host-name") ? "[-n]" : "-n");
}
-static int parse_command_line(Config *c, int argc, char *argv[]) {
+static int parse_command_line(Config *c, const char *argv0, int argc, char *argv[]) {
int o;
static const struct option long_options[] = {
assert(c);
- c->command = strstr(argv[0], "address") ? COMMAND_RESOLVE_ADDRESS : (strstr(argv[0], "host-name") ? COMMAND_RESOLVE_HOST_NAME : COMMAND_UNSPEC);
+ c->command = strstr(argv0, "address") ? COMMAND_RESOLVE_ADDRESS : (strstr(argv0, "host-name") ? COMMAND_RESOLVE_HOST_NAME : COMMAND_UNSPEC);
c->proto = AVAHI_PROTO_UNSPEC;
c->verbose = 0;
else
argv0 = argv[0];
- if (parse_command_line(&config, argc, argv) < 0)
+ if (parse_command_line(&config, argv0, argc, argv) < 0)
goto fail;
switch (config.command) {
if HAVE_DBUS
install-exec-local:
- cd $(DESTDIR)/$(mandir)/man1 && rm -f avahi-resolve-host-name.1 avahi-resolve-address.1 && $(LN_S) avahi-resolve.1 avahi-resolve-host-name.1 && $(LN_S) avahi-resolve.1 avahi-resolve-address.1
+ cd $(DESTDIR)/$(mandir)/man1 && \
+ rm -f avahi-resolve-host-name.1 avahi-resolve-address.1 avahi-browse-domains.1 && \
+ $(LN_S) avahi-resolve.1 avahi-resolve-host-name.1 && \
+ $(LN_S) avahi-resolve.1 avahi-resolve-address.1 && \
+ $(LN_S) avahi-browse.1 avahi-browse-domains.1
endif
<cmd>avahi-browse [<arg>options</arg>] <arg>service-type</arg></cmd>
<cmd>avahi-browse [<arg>options</arg>] <opt>--all</opt></cmd>
<cmd>avahi-browse [<arg>options</arg>] <opt>--browse-domains</opt></cmd>
+ <cmd>avahi-browse-domains [<arg>options</arg>]</cmd>
</synopsis>
<description>
<option>
<p><opt>-D | --browse-domains</opt></p>
- <optdesc><p>Browse for browsing domains instead for services.</p></optdesc>
+ <optdesc><p>Browse for browsing domains instead for services. avahi-browse-domains is equivalent to avahi-browse --browse-domains</p></optdesc>
</option>
<option>