From 2482d7dd247d33ff224f330eba0874df2895d9a6 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 21 Aug 2008 11:17:55 +0200 Subject: [PATCH] losetup: remove unnecessary minor number check 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). Fortunately, losetup code does not depend on minor numbers. Signed-off-by: Karel Zak --- mount/lomount.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mount/lomount.c b/mount/lomount.c index b9a83c6b..d47f3dd9 100644 --- a/mount/lomount.c +++ b/mount/lomount.c @@ -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); -- 2.39.5