aboutsummaryrefslogtreecommitdiffstats
path: root/print_error.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2019-04-13 20:41:54 +0200
committerMattias Andrée <maandree@kth.se>2019-04-13 20:41:54 +0200
commit57bfbe4a09a898f11da686646164d3fdf3875123 (patch)
treef4bf860bbef8ab681f0c0857316af4b7951d7c37 /print_error.c
parentm (diff)
downloadliberror-57bfbe4a09a898f11da686646164d3fdf3875123.tar.gz
liberror-57bfbe4a09a898f11da686646164d3fdf3875123.tar.bz2
liberror-57bfbe4a09a898f11da686646164d3fdf3875123.tar.xz
And man pages for the function, and add print function to user specifiec error details
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--print_error.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/print_error.c b/print_error.c
index 245caa0..9c8bf1c 100644
--- a/print_error.c
+++ b/print_error.c
@@ -19,6 +19,11 @@ print_error(struct liberror_error *error, FILE *fp, char *prefix)
*strchr(prefix, '\0') = ' ';
switch (error->details_type) {
+ case LIBERROR_DETAILS_USER:
+ if (error->details.user.print_data)
+ error->details.user.print_data(error->details.user.data, fp, prefix);
+ break;
+
case LIBERROR_DETAILS_ONE_FILE:
if (error->details.one_file.fd >= 0 || error->details.one_file.name) {
fprintf(fp, "%sDetails:\n", prefix);
@@ -57,7 +62,6 @@ print_error(struct liberror_error *error, FILE *fp, char *prefix)
break;
case LIBERROR_DETAILS_NONE:
- case LIBERROR_DETAILS_USER:
default:
break;
}