Skip to content

Conversation

@5ec1cff
Copy link
Collaborator

@5ec1cff 5ec1cff commented Nov 23, 2025

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the boot patching and restore functionality by introducing dedicated argument structs (BootPatchArgs and BootRestoreArgs) to replace individual function parameters, and adds support for customizing the output file name via the new out_name parameter.

  • Introduced BootPatchArgs and BootRestoreArgs structs to encapsulate CLI arguments
  • Added out_name parameter to allow custom output file naming for both patch and restore operations
  • Improved code by replacing .to_str().unwrap() with .display() for safer path formatting

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
userspace/ksud/src/boot_patch.rs Defines BootPatchArgs and BootRestoreArgs structs with clap annotations, refactors patch() and restore() functions to accept struct arguments, adds out_name field support, and improves path display formatting
userspace/ksud/src/cli.rs Replaces inline CLI argument definitions with references to new BootPatchArgs and BootRestoreArgs structs, simplifies command handling by passing structs directly
userspace/ksud/src/utils.rs Updates uninstall() function to construct BootRestoreArgs struct when calling boot_patch::restore(), adds import for BootRestoreArgs

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@5ec1cff 5ec1cff changed the title ksud: refine boot patch, add out_name ksud: refine boot patch, add --out-name arg to boot-patch and boot-restore command Nov 23, 2025
@5ec1cff 5ec1cff merged commit e33491f into main Nov 23, 2025
10 checks passed
@5ec1cff 5ec1cff deleted the bootpatch branch November 23, 2025 18:04
rsuntk pushed a commit to rsuntk/KernelSU that referenced this pull request Nov 24, 2025
u9521 pushed a commit to u9521/KernelSU that referenced this pull request Jan 4, 2026
u9521 pushed a commit to u9521/KernelSU that referenced this pull request Jan 5, 2026
u9521 pushed a commit to u9521/KernelSU that referenced this pull request Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants