mirror of
https://github.com/topjohnwu/ndk-box-kitchen.git
synced 2024-11-23 11:29:45 +00:00
36 lines
1.1 KiB
Diff
36 lines
1.1 KiB
Diff
From ee26ea829b0c9e8d3c79d0264f0fb6b47882cbe2 Mon Sep 17 00:00:00 2001
|
|
From: Chris Renshaw <osm0sis@outlook.com>
|
|
Date: Wed, 24 May 2023 14:15:00 -0300
|
|
Subject: [PATCH 12/18] Fix direct mount auto loopback and losetup for Android
|
|
|
|
---
|
|
include/libbb.h | 12 +++++++++---
|
|
1 file changed, 9 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/include/libbb.h b/include/libbb.h
|
|
index 6a7f4fc11..cae6bfb6c 100644
|
|
--- a/include/libbb.h
|
|
+++ b/include/libbb.h
|
|
@@ -2392,9 +2392,15 @@ extern const char bb_default_login_shell[] ALIGN1;
|
|
# define VC_4 "/dev/tty4"
|
|
# define VC_5 "/dev/tty5"
|
|
# define VC_FORMAT "/dev/tty%d"
|
|
-# define LOOP_FORMAT "/dev/loop%u"
|
|
-# define LOOP_NAMESIZE (sizeof("/dev/loop") + sizeof(int)*3 + 1)
|
|
-# define LOOP_NAME "/dev/loop"
|
|
+# if defined(__ANDROID__)
|
|
+# define LOOP_FORMAT "/dev/block/loop%u"
|
|
+# define LOOP_NAMESIZE (sizeof("/dev/block/loop") + sizeof(int)*3 + 1)
|
|
+# define LOOP_NAME "/dev/block/loop"
|
|
+# else
|
|
+# define LOOP_FORMAT "/dev/loop%u"
|
|
+# define LOOP_NAMESIZE (sizeof("/dev/loop") + sizeof(int)*3 + 1)
|
|
+# define LOOP_NAME "/dev/loop"
|
|
+# endif
|
|
# define FB_0 "/dev/fb0"
|
|
#endif
|
|
|
|
--
|
|
2.46.0
|
|
|