You've already forked ReZygisk
mirror of
https://github.com/PerformanC/ReZygisk.git
synced 2025-09-06 06:37:01 +00:00
make compiler happy
This commit is contained in:
@@ -19,12 +19,12 @@ namespace socket_utils {
|
|||||||
read_sz += ret;
|
read_sz += ret;
|
||||||
} while (read_sz != count && ret != 0);
|
} while (read_sz != count && ret != 0);
|
||||||
if (read_sz != count) {
|
if (read_sz != count) {
|
||||||
PLOGE("read (%d != %d)", count, read_sz);
|
PLOGE("read (%zu != %zu)", count, read_sz);
|
||||||
}
|
}
|
||||||
return read_sz;
|
return read_sz;
|
||||||
}
|
}
|
||||||
|
|
||||||
ssize_t xwrite(int fd, const void* buf, size_t count) {
|
size_t xwrite(int fd, const void* buf, size_t count) {
|
||||||
size_t write_sz = 0;
|
size_t write_sz = 0;
|
||||||
ssize_t ret;
|
ssize_t ret;
|
||||||
do {
|
do {
|
||||||
@@ -32,12 +32,12 @@ namespace socket_utils {
|
|||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
if (errno == EINTR) continue;
|
if (errno == EINTR) continue;
|
||||||
PLOGE("write");
|
PLOGE("write");
|
||||||
return ret;
|
return write_sz;
|
||||||
}
|
}
|
||||||
write_sz += ret;
|
write_sz += ret;
|
||||||
} while (write_sz != count && ret != 0);
|
} while (write_sz != count && ret != 0);
|
||||||
if (write_sz != count) {
|
if (write_sz != count) {
|
||||||
PLOGE("write (%d != %d)", count, write_sz);
|
PLOGE("write (%zu != %zu)", count, write_sz);
|
||||||
}
|
}
|
||||||
return write_sz;
|
return write_sz;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ namespace socket_utils {
|
|||||||
|
|
||||||
ssize_t xread(int fd, void *buf, size_t count);
|
ssize_t xread(int fd, void *buf, size_t count);
|
||||||
|
|
||||||
ssize_t xwrite(int fd, const void *buf, size_t count);
|
size_t xwrite(int fd, const void *buf, size_t count);
|
||||||
|
|
||||||
uint8_t read_u8(int fd);
|
uint8_t read_u8(int fd);
|
||||||
|
|
||||||
|
|||||||
@@ -23,10 +23,11 @@ pub fn get_kernel_su() -> Option<Version> {
|
|||||||
0,
|
0,
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
const MAX_OLD_VERSION: i32 = MIN_KSU_VERSION - 1;
|
||||||
match version {
|
match version {
|
||||||
0 => None,
|
0 => None,
|
||||||
MIN_KSU_VERSION..=MAX_KSU_VERSION => Some(Version::Supported),
|
MIN_KSU_VERSION..=MAX_KSU_VERSION => Some(Version::Supported),
|
||||||
1..=MIN_KSU_VERSION => Some(Version::TooOld),
|
1..=MAX_OLD_VERSION => Some(Version::TooOld),
|
||||||
_ => Some(Version::Abnormal),
|
_ => Some(Version::Abnormal),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ use anyhow::{bail, Result};
|
|||||||
use std::fs;
|
use std::fs;
|
||||||
use std::io::{BufRead, BufReader, Write};
|
use std::io::{BufRead, BufReader, Write};
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
use futures::{FutureExt, join, pin_mut};
|
use futures::{FutureExt, pin_mut};
|
||||||
use futures::future::{Fuse, FusedFuture};
|
use futures::future::{Fuse};
|
||||||
use log::{debug, error, info};
|
use log::{debug, error, info};
|
||||||
use rustix::mount::mount_bind;
|
use rustix::mount::mount_bind;
|
||||||
use rustix::process::{getgid, getuid};
|
use rustix::process::{getgid, getuid};
|
||||||
|
|||||||
Reference in New Issue
Block a user