From 96fe104e6b1c1452a8408bb46baa73d2b93bcf0e Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Wed, 2 Sep 2020 17:29:51 +0200 Subject: bitmap_strerror: More verbose bitmap failures --- src/main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 325f8af..90bfcc0 100644 --- a/src/main.c +++ b/src/main.c @@ -51,9 +51,10 @@ int main(int argc, char *argv[]) uint8_t brightness_min = 0x00; uint8_t brightness_max = 0xff; - if ( bitmap_read(args.filename, &bitmap) ) { - printf("Error reading file\n"); - return 1; + int ret = bitmap_read(args.filename, &bitmap); + if ( ret ) { + printf( "%s\n", bitmap_strerror(ret) ); + return ret; } if(args.fit_width > 0) { -- cgit v1.2.3