]> err.no Git - util-linux/commit
losetup: use /sys/dev/block/.../loop/backing_file
authorKarel Zak <kzak@redhat.com>
Wed, 1 Dec 2010 13:04:35 +0000 (14:04 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 1 Dec 2010 13:04:35 +0000 (14:04 +0100)
commitb61e939013282d8da2fbc2dc60c2cb4e58b8ab17
tree12ccaa865bde2b30c138bcd974f530979404cb31
parent80dde62f9c926f013d32adb60938366522290245
losetup: use /sys/dev/block/.../loop/backing_file

The basic loopdev attributes are available in sysfs since kernel
2.6.37. This patch uses the backing_file attribute from sysfs for very
long filenames (the LOOP_GET_STATUS ioctl uses only 64 bytes for the
filename).

old version:
 # losetup -a
 /dev/loop0: [0804]:12865322 (/home/images/filesystems/this_is_really_really_long_directory_*)

new version:
 # losetup -a
 /dev/loop0: [0804]:12865322 (/home/images/filesystems/this_is_really_really_long_directory_name/ext2.img)

Signed-off-by: Karel Zak <kzak@redhat.com>
TODO
include/pathnames.h
mount/lomount.c