summaryrefslogtreecommitdiffstats
path: root/include/pathnames.h
diff options
context:
space:
mode:
authorKarel Zak2010-12-01 14:04:35 +0100
committerKarel Zak2010-12-01 14:04:35 +0100
commitb61e939013282d8da2fbc2dc60c2cb4e58b8ab17 (patch)
tree12ccaa865bde2b30c138bcd974f530979404cb31 /include/pathnames.h
parentlscpu: use GPLv2+ (diff)
downloadkernel-qcow2-util-linux-b61e939013282d8da2fbc2dc60c2cb4e58b8ab17.tar.gz
kernel-qcow2-util-linux-b61e939013282d8da2fbc2dc60c2cb4e58b8ab17.tar.xz
kernel-qcow2-util-linux-b61e939013282d8da2fbc2dc60c2cb4e58b8ab17.zip
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>
Diffstat (limited to 'include/pathnames.h')
-rw-r--r--include/pathnames.h1
1 files changed, 1 insertions, 0 deletions
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 */