From bbc72c85f7733fefda499cb0e96f1dda2ce90625 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Thu, 19 Sep 2013 14:39:47 +0200 Subject: [PATCH] devmapper: Fix loopback mount code Typo in the loop-control code made it always fall back to the old method of opening loopback devices. --- devmapper/devmapper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devmapper/devmapper.go b/devmapper/devmapper.go index f007091827..75742628a2 100644 --- a/devmapper/devmapper.go +++ b/devmapper/devmapper.go @@ -27,7 +27,7 @@ attach_loop_device(const char *filename, int *loop_fd_out) start_index = 0; fd = open("/dev/loop-control", O_RDONLY); - if (fd == 0) { + if (fd >= 0) { start_index = ioctl(fd, LOOP_CTL_GET_FREE); close(fd);