The latest kernel supports partitioned loop devices (kernel commit
476a4813cfddf7cf159956cc0e2d3c830c1507e3). Unfortunately, this change
makes minor numbers useless, because mirror number does not match with
loop device name (loop<N>).
Fortunately, losetup code does not depend on minor numbers.
Signed-off-by: Karel Zak <kzak@redhat.com>
ret = stat(ll->name, &st);
if (ret == 0 && S_ISBLK(st.st_mode) &&
- major(st.st_rdev) == LOOPMAJOR &&
- minor(st.st_rdev) >= NLOOPS_DEFAULT) {
+ major(st.st_rdev) == LOOPMAJOR) {
ll->ct_succ++;
fd = open(ll->name, O_RDONLY);