diff options
author | Stanislav Brabec | 2016-07-14 15:29:09 +0200 |
---|---|---|
committer | Karel Zak | 2016-08-03 11:53:28 +0200 |
commit | 74a4705a993ce475d95c1c20d0cc4eb740b0c933 (patch) | |
tree | 3d8f1ccfcd24f17448830c6f1977566917e31092 /libmount/src/tab.c | |
parent | mount: Handle MNT_ERR_LOOPOVERLAP (diff) | |
download | kernel-qcow2-util-linux-74a4705a993ce475d95c1c20d0cc4eb740b0c933.tar.gz kernel-qcow2-util-linux-74a4705a993ce475d95c1c20d0cc4eb740b0c933.tar.xz kernel-qcow2-util-linux-74a4705a993ce475d95c1c20d0cc4eb740b0c933.zip |
Add sizelimit to internal API
Fully safe checks of loop device need to check sizelimit. To prevent need of two
nearly equal functions, introduce sizelimit parameter to several internal
functions:
loopdev_is_used()
loopdev_find_by_backing_file()
loopcxt_is_used()
loopcxt_find_by_backing_file()
If sizelimit is zero, fall back to the old behavior (ignoring of sizelimit).
Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
Diffstat (limited to 'libmount/src/tab.c')
-rw-r--r-- | libmount/src/tab.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libmount/src/tab.c b/libmount/src/tab.c index 155c65ee3..341e5e343 100644 --- a/libmount/src/tab.c +++ b/libmount/src/tab.c @@ -1555,7 +1555,7 @@ int mnt_table_is_fs_mounted(struct libmnt_table *tb, struct libmnt_fs *fstab_fs) DBG(FS, ul_debugobj(fs, "checking for loop: src=%s", mnt_fs_get_srcpath(fs))); #if __linux__ - if (!loopdev_is_used(mnt_fs_get_srcpath(fs), src, offset, flags)) + if (!loopdev_is_used(mnt_fs_get_srcpath(fs), src, offset, 0, flags)) continue; DBG(FS, ul_debugobj(fs, "used loop")); |