diff options
author | Karel Zak | 2008-08-21 12:06:25 +0200 |
---|---|---|
committer | Karel Zak | 2008-08-21 12:06:25 +0200 |
commit | 65158b10813e326396bd13a029aed108019324a2 (patch) | |
tree | 478d85943dcbfd2dc2afe92ac8137772faa75da3 /mount/lomount.c | |
parent | fdisk: round reported sizes rather than truncate (diff) | |
download | kernel-qcow2-util-linux-65158b10813e326396bd13a029aed108019324a2.tar.gz kernel-qcow2-util-linux-65158b10813e326396bd13a029aed108019324a2.tar.xz kernel-qcow2-util-linux-65158b10813e326396bd13a029aed108019324a2.zip |
losetup: remove dependence on minor numbers
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>).
We have to follow loop device names only.
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'mount/lomount.c')
-rw-r--r-- | mount/lomount.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mount/lomount.c b/mount/lomount.c index 5cf50f884..6ef143ab6 100644 --- a/mount/lomount.c +++ b/mount/lomount.c @@ -301,6 +301,10 @@ looplist_next(struct looplist *ll) continue; if (m != LOOPMAJOR) continue; + /* unfortunately, real minor numbers needn't to match + * loop<N> device name. We have to follow device name. + */ + n = name2minor(1, name); fd = looplist_open_dev(ll, n); if (fd != -1) return fd; |