Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
55ed6109
Commit
55ed6109
authored
Feb 11, 2022
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use dynamic_bitset.emplace_back()
parent
f6d765bf
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
12 deletions
+15
-12
misc.hpp
native/jni/utils/misc.hpp
+3
-0
entry.cpp
native/jni/zygisk/entry.cpp
+12
-12
No files found.
native/jni/utils/misc.hpp
View file @
55ed6109
...
@@ -93,6 +93,9 @@ public:
...
@@ -93,6 +93,9 @@ public:
slot_type
get_slot
(
size_t
slot
)
const
{
slot_type
get_slot
(
size_t
slot
)
const
{
return
slot_list
.
size
()
>
slot
?
slot_list
[
slot
].
to_ulong
()
:
0ul
;
return
slot_list
.
size
()
>
slot
?
slot_list
[
slot
].
to_ulong
()
:
0ul
;
}
}
void
emplace_back
(
slot_type
l
)
{
slot_list
.
emplace_back
(
l
);
}
protected
:
protected
:
slot_bits
::
reference
get
(
size_t
pos
)
{
slot_bits
::
reference
get
(
size_t
pos
)
{
size_t
slot
=
pos
/
slot_size
;
size_t
slot
=
pos
/
slot_size
;
...
...
native/jni/zygisk/entry.cpp
View file @
55ed6109
...
@@ -367,13 +367,14 @@ static void get_process_info(int client, const sock_cred *cred) {
...
@@ -367,13 +367,14 @@ static void get_process_info(int client, const sock_cred *cred) {
// Collect module status from system_server
// Collect module status from system_server
int
slots
=
read_int
(
client
);
int
slots
=
read_int
(
client
);
int
id
=
0
;
dynamic_bitset
bits
;
for
(
int
i
=
0
;
i
<
slots
;
++
i
)
{
for
(
int
i
=
0
;
i
<
slots
;
++
i
)
{
dynamic_bitset
::
slot_type
l
=
0
;
dynamic_bitset
::
slot_type
l
=
0
;
xxread
(
client
,
&
l
,
sizeof
(
l
));
xxread
(
client
,
&
l
,
sizeof
(
l
));
dynamic_bitset
::
slot_bits
bits
(
l
);
bits
.
emplace_back
(
l
);
for
(
int
j
=
0
;
id
<
module_list
->
size
();
++
j
,
++
id
)
{
}
if
(
!
bits
[
j
])
{
for
(
int
id
=
0
;
id
<
module_list
->
size
();
++
id
)
{
if
(
!
as_const
(
bits
)[
id
])
{
// Either not a zygisk module, or incompatible
// Either not a zygisk module, or incompatible
char
buf
[
4096
];
char
buf
[
4096
];
snprintf
(
buf
,
sizeof
(
buf
),
MODULEROOT
"/%s/zygisk"
,
snprintf
(
buf
,
sizeof
(
buf
),
MODULEROOT
"/%s/zygisk"
,
...
@@ -384,7 +385,6 @@ static void get_process_info(int client, const sock_cred *cred) {
...
@@ -384,7 +385,6 @@ static void get_process_info(int client, const sock_cred *cred) {
}
}
}
}
}
}
}
}
}
static
void
send_log_pipe
(
int
fd
)
{
static
void
send_log_pipe
(
int
fd
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment