From d7be1a742634d74c7434e3e99c5ff93ed5b1f435 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 30 Oct 2009 12:20:51 +0100 Subject: [PATCH] libblkid: does not return useless binary data Currently, the binary blkid_probe_get_{topology,partitions}() API returns empty structs when information has not been gathered. This is confusing for applications. It's seems better to return NULL. Reported-by: Hans de Goede Signed-off-by: Karel Zak --- shlibs/blkid/src/probe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shlibs/blkid/src/probe.c b/shlibs/blkid/src/probe.c index 27bcf3d8..f8610cb6 100644 --- a/shlibs/blkid/src/probe.c +++ b/shlibs/blkid/src/probe.c @@ -306,7 +306,7 @@ void *blkid_probe_get_binary_data(blkid_probe pr, struct blkid_chain *chn) chn->binary = FALSE; pr->cur_chain = NULL; - if (rc < 0) + if (rc != 0) return NULL; DBG(DEBUG_LOWPROBE, -- 2.39.5