diff options
author | Petr Štetiar <ynezz@true.cz> | 2019-03-26 16:34:29 +0100 |
---|---|---|
committer | Petr Štetiar <ynezz@true.cz> | 2019-03-28 12:42:31 +0100 |
commit | bc2c876104a6e2dcfc798c9dd09ac1f95784cdeb (patch) | |
tree | 09b5d6b73fa2c94f479728c0c3ded41d82dc0718 /libfstools/rootdisk.c | |
parent | af93f4b8dc32cf1320dfe8f4b93bb3a12606fc33 (diff) | |
download | fstools-bc2c876104a6e2dcfc798c9dd09ac1f95784cdeb.tar.gz |
libfstools: Print error in case of loop blkdev failure
It took me quite some time today(while fixing squashfs+overlay on
armvirt) to find out, that I was missing support for loop block device
in kernel, so I'm adding error message which might be helpful for
someone else in the future as well.
Acked-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Diffstat (limited to 'libfstools/rootdisk.c')
-rw-r--r-- | libfstools/rootdisk.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libfstools/rootdisk.c b/libfstools/rootdisk.c index dd00c1b..68a6296 100644 --- a/libfstools/rootdisk.c +++ b/libfstools/rootdisk.c @@ -258,8 +258,10 @@ static int rootdisk_volume_init(struct volume *v) char str[128]; int ret = 0; - if (!p->loop_name[0] && rootdisk_create_loop(p) != 0) + if (!p->loop_name[0] && rootdisk_create_loop(p) != 0) { + ULOG_ERR("unable to create loop device\n"); return -1; + } v->type = BLOCKDEV; v->blk = p->loop_name; |