Print failed include paths on failure to find rules

Thus giving a hint as to which directory we're trying to find.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
master
Daniel Stone 2012-08-03 03:22:48 +02:00
parent 226cb22c80
commit 42b2c93433
1 changed files with 9 additions and 5 deletions

View File

@ -1051,9 +1051,9 @@ struct xkb_component_names *
xkb_components_from_rules(struct xkb_context *ctx, xkb_components_from_rules(struct xkb_context *ctx,
const struct xkb_rule_names *rmlvo) const struct xkb_rule_names *rmlvo)
{ {
int i;
FILE *file; FILE *file;
char *path; char *path;
char **include;
struct rules *rules; struct rules *rules;
struct xkb_component_names *kccgst = NULL; struct xkb_component_names *kccgst = NULL;
@ -1061,10 +1061,14 @@ xkb_components_from_rules(struct xkb_context *ctx,
if (!file) { if (!file) {
log_err(ctx, "could not find \"%s\" rules in XKB path\n", log_err(ctx, "could not find \"%s\" rules in XKB path\n",
rmlvo->rules); rmlvo->rules);
log_err(ctx, "%d include paths searched:\n", log_err(ctx, "%zu include paths searched:\n",
xkb_context_num_include_paths(ctx)); darray_size(ctx->includes));
for (i = 0; i < xkb_context_num_include_paths(ctx); i++) darray_foreach(include, ctx->includes)
log_err(ctx, "\t%s\n", xkb_context_include_path_get(ctx, i)); log_err(ctx, "\t%s\n", *include);
log_err(ctx, "%zu include paths could not be added:\n",
darray_size(ctx->failed_includes));
darray_foreach(include, ctx->failed_includes)
log_err(ctx, "\t%s\n", *include);
return NULL; return NULL;
} }