]> git.ipfire.org Git - thirdparty/util-linux.git/commit
losetup: improve -a to report loopdevs < 512 bytes
authorKarel Zak <kzak@redhat.com>
Tue, 12 Jun 2012 13:41:47 +0000 (15:41 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 12 Jun 2012 13:41:47 +0000 (15:41 +0200)
commite4062c72d1733b0b99ed1c6269c996d6194e869b
tree53050523c6c19d6f2413130eecde9b9bf5249c64
parent3554545636f639fbd65d92cc7643e89f3c0ff7a5
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>
include/loopdev.h
lib/loopdev.c