"no free loop device found",
h->device ?: "");
if (!h->device) {
"no free loop device found",
h->device ?: "");
if (!h->device) {
+ log_err(NULL, _("Cannot find a free loopback device.\n"));
/* Keep the loop open, dettached on last close. */
h->loop_fd = crypt_loop_attach(h->device, device, 0, &readonly);
if (h->loop_fd == -1) {
/* Keep the loop open, dettached on last close. */
h->loop_fd = crypt_loop_attach(h->device, device, 0, &readonly);
if (h->loop_fd == -1) {
- log_dbg("Attaching loop failed.");
+ log_err(NULL, _("Attaching loopback device failed "
+ "(loop device with autoclear flag is required).\n"));
+#ifndef LO_FLAGS_AUTOCLEAR
+#define LO_FLAGS_AUTOCLEAR 4
+#endif
+
char *crypt_loop_get_device(void);
char *crypt_loop_backing_file(const char *loop);
int crypt_loop_device(const char *loop);
char *crypt_loop_get_device(void);
char *crypt_loop_backing_file(const char *loop);
int crypt_loop_device(const char *loop);