Another topic branch that was cooking for far too long.
* refs/heads/t/doc-improvements:
Switch from grutatxt to markdown.
INSTALL: Link to the gengetopt web page.
manual: Fix a whitespace issue.
manual: Add example for interactive mode.
manual: Add two more examples.
manual: Add example query for omitting a directory.
manual: Add short option example.
manual: Remove pointless "time" prefix.
manual: Improve documentation of --output.
man2html $< | sed -e 's|^<DT><DD>$$|<DT><DD><br>|g' > $@
clean:
- rm -f *.o adu *cmdline.c *cmdline.h adu.1 adu.1.html adu.png index.html adu.sk~
+ rm -f *.o adu *cmdline.c *cmdline.h adu.1 adu.1.html index.html
index.html: adu.1.html index.html.in INSTALL README
sed -e '/@README@/,$$d' index.html.in > $@
if (conf.database_dir_given)
tmp = adu_strdup(conf.database_dir_arg);
- else
+ else {
+ if (!conf.base_dir_arg) {
+ EMERG_LOG("fatal: neither database dir "
+ "nor base dir given\n");
+ exit(EXIT_FAILURE);
+ }
tmp = make_message("%s%s",
conf.database_root_arg, conf.base_dir_arg);
+ }
/*
* As we change the cwd during database creation, database_dir
* must be an absolute path.
check_signals();
DEBUG_LOG("----------------- %llu: %s\n", (long long unsigned)current_dir_num, dirname);
ret = adu_opendir(dirname, &dir, &cwd_fd);
- if (ret < 0) {
- if (ret != -ERRNO_TO_ERROR(EACCES))
- return ret;
- WARNING_LOG("permission denied for %s\n", dirname);
+ if (ret < 0) { /* Non-fatal, continue with next dir */
+ WARNING_LOG("skipping dir %s: %s\n", dirname,
+ adu_strerror(-ret));
return 1;
}
while ((entry = readdir(dir))) {
if (*dir)
return 1;
ret = -ERRNO_TO_ERROR(errno);
-/* Ignore return value of fchdir() and close(). We're busted anyway. */
- if (cwd)
- fchdir(*cwd);
+ /* Ignore return value of fchdir() and close(). We're busted anyway. */
+ if (cwd) {
+ int __a_unused ret2 = fchdir(*cwd); /* STFU, gcc */
+ }
close_cwd:
if (cwd)
close(*cwd);