From b61e939013282d8da2fbc2dc60c2cb4e58b8ab17 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 1 Dec 2010 14:04:35 +0100 Subject: 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 --- include/pathnames.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/pathnames.h') diff --git a/include/pathnames.h b/include/pathnames.h index c0572954e..efbd6a65c 100644 --- a/include/pathnames.h +++ b/include/pathnames.h @@ -82,6 +82,7 @@ #define _PATH_PROC_MOUNTINFO "/proc/self/mountinfo" #define _PATH_SYS_BLOCK "/sys/block" +#define _PATH_SYS_DEVBLOCK "/sys/dev/block" #ifndef _PATH_MOUNTED # ifdef MOUNTED /* deprecated */ -- cgit v1.2.3-55-g7522