Rename function to be more descriptive
This commit is contained in:
parent
fd5ad91d26
commit
c61ec2465f
@ -186,5 +186,5 @@ bool check_two_stage() {
|
||||
return true;
|
||||
// If we still have no indication, parse the original init and see what's up
|
||||
auto init = raw_data::mmap_ro("/.backup/init");
|
||||
return init.find("selinux_setup");
|
||||
return init.contains("selinux_setup");
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ int data_holder::patch(str_pairs list) {
|
||||
return count;
|
||||
}
|
||||
|
||||
bool data_holder::find(string_view pattern) {
|
||||
bool data_holder::contains(string_view pattern) {
|
||||
for (uint8_t *p = buf, *eof = buf + sz; p < eof; ++p) {
|
||||
if (memcmp(p, pattern.data(), pattern.length() + 1) == 0)
|
||||
return true;
|
||||
|
@ -21,7 +21,7 @@ struct data_holder {
|
||||
size_t sz = 0;
|
||||
using str_pairs = std::initializer_list<std::pair<std::string_view, std::string_view>>;
|
||||
int patch(str_pairs list);
|
||||
bool find(std::string_view pattern);
|
||||
bool contains(std::string_view pattern);
|
||||
protected:
|
||||
void consume(data_holder &other);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user