block: ignore probe entries without id
authorJo-Philipp Wich <jow@openwrt.org>
Fri, 19 Jul 2013 13:43:37 +0000 (15:43 +0200)
committerJo-Philipp Wich <jow@openwrt.org>
Fri, 19 Jul 2013 13:43:37 +0000 (15:43 +0200)
block.c

diff --git a/block.c b/block.c
index ea14248..7d0781e 100644 (file)
--- a/block.c
+++ b/block.c
@@ -327,7 +327,7 @@ static int _cache_load(const char *path)
                struct blkid_struct_probe *pr = malloc(sizeof(struct blkid_struct_probe));
                memset(pr, 0, sizeof(struct blkid_struct_probe));
                probe_block(gl.gl_pathv[j], pr);
-               if (pr->err)
+               if (pr->err || !pr->id)
                        free(pr);
                else
                        list_add_tail(&pr->list, &devices);