summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKarel Zak2011-11-07 16:45:11 +0100
committerKarel Zak2011-11-07 16:45:11 +0100
commit0b14bf7af1f13b9bb0f3952af264c114bac83665 (patch)
tree5cdd9c72591d9e16a408f53d6d75a612391da3a3 /include
parentdocs: add note about config-gen purpose (diff)
downloadkernel-qcow2-util-linux-0b14bf7af1f13b9bb0f3952af264c114bac83665.tar.gz
kernel-qcow2-util-linux-0b14bf7af1f13b9bb0f3952af264c114bac83665.tar.xz
kernel-qcow2-util-linux-0b14bf7af1f13b9bb0f3952af264c114bac83665.zip
lib,loopdev: add LOOP_CTL_GET_FREE support
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/loopdev.h10
-rw-r--r--include/pathnames.h2
2 files changed, 11 insertions, 1 deletions
diff --git a/include/loopdev.h b/include/loopdev.h
index 2c8db17f8..e675dab91 100644
--- a/include/loopdev.h
+++ b/include/loopdev.h
@@ -24,6 +24,13 @@
/* #define LOOP_CHANGE_FD 0x4C06 */
#define LOOP_SET_CAPACITY 0x4C07
+/* /dev/loop-control interface */
+#ifndef LOOP_CTL_ADD
+# define LOOP_CTL_ADD 0x4C80
+# define LOOP_CTL_REMOVE 0x4C81
+# define LOOP_CTL_GET_FREE 0x4C82
+#endif
+
/*
* loop_info.lo_flags
*/
@@ -104,7 +111,8 @@ enum {
LOOPDEV_FL_OFFSET = (1 << 4),
LOOPDEV_FL_NOSYSFS = (1 << 5),
LOOPDEV_FL_NOIOCTL = (1 << 6),
- LOOPDEV_FL_DEVSUBDIR = (1 << 7)
+ LOOPDEV_FL_DEVSUBDIR = (1 << 7),
+ LOOPDEV_FL_CONTROL = (1 << 8), /* system with /dev/loop-control */
};
/*
diff --git a/include/pathnames.h b/include/pathnames.h
index 07912bc59..e6e3d1957 100644
--- a/include/pathnames.h
+++ b/include/pathnames.h
@@ -121,8 +121,10 @@
#endif
#define _PATH_DEV_LOOP "/dev/loop"
+#define _PATH_DEV_LOOPCTL "/dev/loop-control"
#define _PATH_DEV_TTY "/dev/tty"
+
/* udev paths */
#define _PATH_DEV_BYLABEL "/dev/disk/by-label"
#define _PATH_DEV_BYUUID "/dev/disk/by-uuid"