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 ea142481b0c03b749220060beb1c01a993e8a098..7d0781ec2d1c8933a46f7155eb2ecf60bda85576 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);