diff options
author | Karel Zak | 2012-06-12 15:41:47 +0200 |
---|---|---|
committer | Karel Zak | 2012-06-12 15:41:47 +0200 |
commit | e4062c72d1733b0b99ed1c6269c996d6194e869b (patch) | |
tree | 53050523c6c19d6f2413130eecde9b9bf5249c64 /include/loopdev.h | |
parent | losetup: warn about backing file size (diff) | |
download | kernel-qcow2-util-linux-e4062c72d1733b0b99ed1c6269c996d6194e869b.tar.gz kernel-qcow2-util-linux-e4062c72d1733b0b99ed1c6269c996d6194e869b.tar.xz kernel-qcow2-util-linux-e4062c72d1733b0b99ed1c6269c996d6194e869b.zip |
losetup: improve -a to report loopdevs < 512 bytes
# ll ~/xxx2
-rw-r--r-- 1 root root 500 Jun 12 14:30 /root/xxx2
old version:
# losetup -a
new version:
# losetup -a
/dev/loop0: [2052]:535312 (/root/xxx2)
The new version scans /sys/block/loopN, kernel >= 2.6.37 is required
otherwise fallback to the original not-so-smart /proc/partitions scan.
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=730266
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'include/loopdev.h')
-rw-r--r-- | include/loopdev.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/loopdev.h b/include/loopdev.h index 906bee03a..143c0d30f 100644 --- a/include/loopdev.h +++ b/include/loopdev.h @@ -68,6 +68,7 @@ struct loop_info64 { struct loopdev_iter { FILE *proc; /* /proc/partitions */ + DIR *sysblock; /* /sys/block */ int ncur; /* current position */ int *minors; /* ary of minor numbers (when scan whole /dev) */ int nminors; /* number of items in *minors */ |