summaryrefslogtreecommitdiffstats
path: root/lib/loopdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/loopdev.c')
-rw-r--r--lib/loopdev.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/loopdev.c b/lib/loopdev.c
index 676cc02f3..26ab402fa 100644
--- a/lib/loopdev.c
+++ b/lib/loopdev.c
@@ -665,6 +665,9 @@ struct loop_info64 *loopcxt_get_info(struct loopdev_cxt *lc)
if (fd < 0)
return NULL;
+ /* indicate that file format support is implemented in sys-utils */
+ lc->info.lo_flags |= LO_FLAGS_FILE_FMT;
+
if (ioctl(fd, LOOP_GET_STATUS64, &lc->info) == 0) {
lc->has_info = 1;
lc->info_failed = 0;
@@ -1439,6 +1442,10 @@ int loopcxt_setup_device(struct loopdev_cxt *lc)
}
do {
+ /* indicate that file format support is implemented in
+ * sys-utils */
+ lc->info.lo_flags |= LO_FLAGS_FILE_FMT;
+
err = ioctl(dev_fd, LOOP_SET_STATUS64, &lc->info);
again = err && errno == EAGAIN;
if (again)
@@ -1501,6 +1508,10 @@ int loopcxt_ioctl_status(struct loopdev_cxt *lc)
DBG(SETUP, ul_debugobj(lc, "device open: OK"));
do {
+ /* indicate that file format support is implemented in
+ * sys-utils */
+ lc->info.lo_flags |= LO_FLAGS_FILE_FMT;
+
err = ioctl(dev_fd, LOOP_SET_STATUS64, &lc->info);
again = err && errno == EAGAIN;
if (again)