<para>If invoked with no arguments, it applies all
directives from all configuration files. If one or
- more absolute file names are passed on the command
- line only the directives in these files are
- applied.</para>
+ more file names are passed on the command line, only
+ the directives in these files are applied. If only
+ the basename of a configuration file is specified,
+ all configuration directories as specified in <citerefentry>
+ <refentrytitle>tmpfiles.d</refentrytitle>
+ <manvolnum>5</manvolnum>
+ </citerefentry> are searched for a matching file.</para>
</refsect1>
<refsect1>
free(resolved_path);
}
+ errno = ENOENT;
return NULL;
}
int j;
for (j = optind; j < argc; j++) {
- char *fragment = resolve_fragment(argv[j], conf_file_dirs);
+ char *fragment;
+
+ fragment = resolve_fragment(argv[j], conf_file_dirs);
+ if (!fragment) {
+ log_error("Failed to find any: %s file: %m", argv[j]);
+ r = EXIT_FAILURE;
+ goto finish;
+ }
if (read_config_file(fragment, false) < 0)
r = EXIT_FAILURE;
free(fragment);