]> err.no Git - util-linux/commitdiff
losetup: remove unnecessary minor number check
authorKarel Zak <kzak@redhat.com>
Thu, 21 Aug 2008 09:17:55 +0000 (11:17 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 21 Aug 2008 09:17:55 +0000 (11:17 +0200)
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>
mount/lomount.c

index b9a83c6bc50588727ccb5150a66c0f872b990a83..d47f3dd927809b833188e9c2de4444cd6acc907a 100644 (file)
@@ -317,8 +317,7 @@ looplist_next(struct looplist *ll)
                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);