From: Karel Zak Date: Thu, 21 Aug 2008 09:17:55 +0000 (+0200) Subject: losetup: remove unnecessary minor number check X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2482d7dd247d33ff224f330eba0874df2895d9a6;p=util-linux 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 --- 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);