mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2025-12-25 21:20:41 +00:00
root-packages/cryptsetup
This commit is contained in:
21
root-packages/cryptsetup/fix-loopdev-path.patch
Normal file
21
root-packages/cryptsetup/fix-loopdev-path.patch
Normal file
@@ -0,0 +1,21 @@
|
||||
diff -uNr cryptsetup-2.0.3/lib/utils_loop.c cryptsetup-2.0.3.mod/lib/utils_loop.c
|
||||
--- cryptsetup-2.0.3/lib/utils_loop.c 2018-02-28 11:20:59.000000000 +0200
|
||||
+++ cryptsetup-2.0.3.mod/lib/utils_loop.c 2018-05-26 19:02:53.546906033 +0300
|
||||
@@ -57,7 +57,7 @@
|
||||
struct loop_info64 lo64 = {0};
|
||||
|
||||
for (i = 0; i < 256; i++) {
|
||||
- sprintf(dev, "/dev/loop%d", i);
|
||||
+ sprintf(dev, "/dev/block/loop%d", i);
|
||||
|
||||
loop_fd = open(dev, O_RDONLY);
|
||||
if (loop_fd < 0)
|
||||
@@ -91,7 +91,7 @@
|
||||
}
|
||||
close(loop_fd);
|
||||
|
||||
- if (sprintf(dev, "/dev/loop%d", i) < 0)
|
||||
+ if (sprintf(dev, "/dev/block/loop%d", i) < 0)
|
||||
return NULL;
|
||||
|
||||
if (stat(dev, &st) || !S_ISBLK(st.st_mode))
|
||||
Reference in New Issue
Block a user