summaryrefslogtreecommitdiffstats
path: root/shlibs/blkid/src/probe.c
diff options
context:
space:
mode:
authorKarel Zak2009-10-30 12:20:51 +0100
committerKarel Zak2009-10-30 12:20:51 +0100
commitd7be1a742634d74c7434e3e99c5ff93ed5b1f435 (patch)
tree6928ff35553d6a3428b59d7c36eecf36c250aacc /shlibs/blkid/src/probe.c
parentlibblkid: topology - add logical and physical sector size (diff)
downloadkernel-qcow2-util-linux-d7be1a742634d74c7434e3e99c5ff93ed5b1f435.tar.gz
kernel-qcow2-util-linux-d7be1a742634d74c7434e3e99c5ff93ed5b1f435.tar.xz
kernel-qcow2-util-linux-d7be1a742634d74c7434e3e99c5ff93ed5b1f435.zip
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 <hdegoede@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'shlibs/blkid/src/probe.c')
-rw-r--r--shlibs/blkid/src/probe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shlibs/blkid/src/probe.c b/shlibs/blkid/src/probe.c
index 27bcf3d83..f8610cb61 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,