summaryrefslogtreecommitdiff
path: root/libbb/loop.c
diff options
context:
space:
mode:
authorDenys Vlasenko2018-06-28 14:10:00 +0200
committerDenys Vlasenko2018-06-28 14:10:00 +0200
commit335766602b2598f29a3dd854654b9ba9edb6d7cb (patch)
tree96a4ab55d3574f294a7283694bdc7167724b07bd /libbb/loop.c
parent8825cb6660b66c412296c2b1e10ca2f965a0a9cd (diff)
downloadbusybox-335766602b2598f29a3dd854654b9ba9edb6d7cb.zip
busybox-335766602b2598f29a3dd854654b9ba9edb6d7cb.tar.gz
testsuite/mount.tests: fix false positive
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb/loop.c')
-rw-r--r--libbb/loop.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libbb/loop.c b/libbb/loop.c
index f0d4296..c78535a 100644
--- a/libbb/loop.c
+++ b/libbb/loop.c
@@ -106,6 +106,10 @@ int FAST_FUNC set_loop(char **device, const char *file, unsigned long long offse
return -errno;
}
+//TODO: use LOOP_CTL_GET_FREE instead of trying every loopN in sequence? a-la:
+// fd = open("/dev/loop-control", O_RDWR);
+// loopN = ioctl(fd, LOOP_CTL_GET_FREE);
+//
/* Find a loop device. */
try = *device ? *device : dev;
/* 1048575 (0xfffff) is a max possible minor number in Linux circa 2010 */