From afc91ffd46333b56080e1a264bcb9cabdfcb72be Mon Sep 17 00:00:00 2001 From: Gabriele M Date: Sun, 20 Nov 2016 22:04:36 +0100 Subject: [PATCH] losetup: Fix loop mounting Vold creates the loop blocks in /dev/block. Change-Id: Ie926ce672deae4a3494aad2ea19d44d7be60ec97 --- toys/other/losetup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toys/other/losetup.c b/toys/other/losetup.c index 4e467a9c..6b0a7574 100644 --- a/toys/other/losetup.c +++ b/toys/other/losetup.c @@ -76,7 +76,7 @@ static void loopback_setup(char *device, char *file) // mount -o loop depends on found device being at the start of toybuf. if (cfd != -1) { if (0 <= (i = ioctl(cfd, 0x4C82))) // LOOP_CTL_GET_FREE - sprintf(device = toybuf, "/dev/loop%d", i); + sprintf(device = toybuf, "/dev/block/loop%d", i); close(cfd); } } -- 2.11.0