mirror of
https://github.com/topjohnwu/Magisk.git
synced 2026-01-15 22:33:05 -08:00
Consolidate for_each implementation into Rust
This commit is contained in:
@@ -300,7 +300,8 @@ static bool proc_is_restricted(pid_t pid) {
|
||||
auto bnd = "CapBnd:"sv;
|
||||
uint32_t data[_LINUX_CAPABILITY_U32S_3] = {};
|
||||
ssprintf(buf, sizeof(buf), "/proc/%d/status", pid);
|
||||
file_readline(buf, [&](string_view line) -> bool {
|
||||
owned_fd status_fd = xopen(buf, O_RDONLY | O_CLOEXEC);
|
||||
file_readline(status_fd, [&](string_view line) -> bool {
|
||||
if (line.starts_with(bnd)) {
|
||||
auto p = line.begin();
|
||||
advance(p, bnd.size());
|
||||
|
||||
Reference in New Issue
Block a user