diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 19:33:30 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 19:33:30 +0000 |
commit | c61e14d3a8412cd50d98aab604e607692c844c8a (patch) | |
tree | 4925aca0e6b64c8664ea2f3fdfa99a52dc93d5da /libblkid/src/topology | |
parent | Adding upstream version 2.39.3. (diff) | |
download | util-linux-c61e14d3a8412cd50d98aab604e607692c844c8a.tar.xz util-linux-c61e14d3a8412cd50d98aab604e607692c844c8a.zip |
Adding upstream version 2.40.upstream/2.40
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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; } |