GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — 一键自动化流程补丁内核 · rym4n/SKRoot-linuxKernelRoot@1784724

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • patch_kernel_root
    • exe
      • patch_kernel_root.exe
    • patch_kernel_root.cpp
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎patch_kernel_root/exe/patch_kernel_root.exe‎

Copy file name to clipboard
0 Bytes
Binary file not shown.
Collapse file

‎patch_kernel_root/patch_kernel_root.cpp‎

Copy file name to clipboardExpand all lines: patch_kernel_root/patch_kernel_root.cpp
+16Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,14 @@ bool parser_seccomp_offset(const std::vector<char> &file_buf, size_t start, std:
203203
return find_current_task_next_register_offset(file_buf, start, mode_name, v_seccomp_offset);
204204
}
205205

206+
bool check_file_path(const char* file_path) {
207+
int len = strlen(file_path);
208+
if (len > 4 && strcmp(file_path + len - 4, ".img") == 0) {
209+
return false;
210+
}
211+
return true;
212+
}
213+
206214
int main(int argc, char* argv[]) {
207215
++argv;
208216
--argc;
@@ -215,6 +223,14 @@ int main(int argc, char* argv[]) {
215223
return 0;
216224
}
217225
const char* file_path = argv[0];
226+
227+
if (!check_file_path(file_path)) {
228+
std::cout << "Please enter the correct Linux kernel binary file path. " << std::endl;
229+
std::cout << "For example, if it is boot.img, you need to first decompress boot.img and then extract the kernel file inside." << std::endl;
230+
system("pause");
231+
return 0;
232+
}
233+
218234
std::vector<char> file_buf = read_file_buf(file_path);
219235
if (!file_buf.size()) {
220236
std::cout << "Fail to open file:" << file_path << std::endl;

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.