1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

devmapper: Fix loopback mount code

Typo in the loop-control code made it always fall back to the
old method of opening loopback devices.
This commit is contained in:
Alexander Larsson 2013-09-19 14:39:47 +02:00 committed by Victor Vieux
parent 062a2b32e9
commit cc28829429

View file

@ -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);