diff options
Diffstat (limited to 'libblkid/src/topology')
-rw-r--r-- | libblkid/src/topology/sysfs.c | 2 | ||||
-rw-r--r-- | libblkid/src/topology/topology.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/libblkid/src/topology/sysfs.c b/libblkid/src/topology/sysfs.c index 25debd0..d216cfc 100644 --- a/libblkid/src/topology/sysfs.c +++ b/libblkid/src/topology/sysfs.c @@ -26,7 +26,7 @@ static const struct topology_val { /* /sys/dev/block/<maj>:<min>/<ATTR> */ - const char *attr; + const char * const attr; /* functions to set probing result */ int (*set_ulong)(blkid_probe, unsigned long); diff --git a/libblkid/src/topology/topology.c b/libblkid/src/topology/topology.c index 67df3e3..f19a4f2 100644 --- a/libblkid/src/topology/topology.c +++ b/libblkid/src/topology/topology.c @@ -146,6 +146,7 @@ blkid_topology blkid_probe_get_topology(blkid_probe pr) static int topology_probe(blkid_probe pr, struct blkid_chain *chn) { size_t i; + int rc; if (chn->idx < -1) return -1; @@ -182,9 +183,10 @@ static int topology_probe(blkid_probe pr, struct blkid_chain *chn) if (id->probefunc) { DBG(LOWPROBE, ul_debug("%s: call probefunc()", id->name)); - errno = 0; - if (id->probefunc(pr, NULL) != 0) + rc = id->probefunc(pr, NULL); + blkid_probe_prune_buffers(pr); + if (rc != 0) continue; } |