summaryrefslogtreecommitdiff
path: root/libmount/src/cache.c
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2011-06-10 15:39:56 +0200
committerKarel Zak <kzak@redhat.com>2011-06-10 15:39:56 +0200
commit7f8b2bf3be6db30280bd8c5a77584350170abd11 (patch)
tree9d9513a6a21b99e483e92c9a0dbdbe65a1a6ba2b /libmount/src/cache.c
parentfd7f0718d4abb483f9e84b15bddecdac34d82144 (diff)
downloadutil-linux-7f8b2bf3be6db30280bd8c5a77584350170abd11.tar.gz
libmount: add mount support for loopdevs
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/cache.c')
-rw-r--r--libmount/src/cache.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libmount/src/cache.c b/libmount/src/cache.c
index 4775069c..907e048d 100644
--- a/libmount/src/cache.c
+++ b/libmount/src/cache.c
@@ -237,7 +237,6 @@ static int mnt_cache_get_probe(struct libmnt_cache *cache, const char *devname,
blkid_probe pr = cache ? cache->pr : NULL;
assert(devname);
- assert(res);
if (cache && cache->pr && (!cache->filename ||
strcmp(devname, cache->filename))) {
@@ -260,7 +259,8 @@ static int mnt_cache_get_probe(struct libmnt_cache *cache, const char *devname,
}
- *res = pr;
+ if (res)
+ *res = pr;
return 0;
}
@@ -277,7 +277,6 @@ static int mnt_cache_get_probe(struct libmnt_cache *cache, const char *devname,
int mnt_cache_read_tags(struct libmnt_cache *cache, const char *devname)
{
int i, ntags = 0, rc;
- blkid_probe pr;
const char *tags[] = { "LABEL", "UUID", "TYPE" };
assert(cache);
@@ -298,7 +297,7 @@ int mnt_cache_read_tags(struct libmnt_cache *cache, const char *devname)
return 0;
}
- rc = mnt_cache_get_probe(cache, devname, &pr);
+ rc = mnt_cache_get_probe(cache, devname, NULL);
if (rc)
return rc;