fix: [disk-encrypt] Disk decrypt failed.#158
fix: [disk-encrypt] Disk decrypt failed.#158deepin-bot[bot] merged 1 commit intolinuxdeepin:release/eaglefrom
Conversation
-- Add _FILE_OFFSET_BITS=64 and _LARGEFILE64_SOURCE compile definitions to enable 64-bit file operations, fixing decryption failures on partitions larger than 2GB. -- Resolves seek position errors and line 951 execution failure in diskencrypt.cpp when processing large disk partitions. Log: fix issue Bug: https://pms.uniontech.com/bug-view-327113.html
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe PR updates the disk encryption plugin’s build configuration to enable large-file support macros, ensuring 64-bit file operations and resolving decryption failures and seek-position errors on partitions larger than 2GB. Class diagram for disk encryption plugin build configuration changesclassDiagram
class DiskEncryptPlugin {
+DFMPLUGIN_DISK_ENCRYPT_LIBRARY
+_FILE_OFFSET_BITS=64
+_LARGEFILE64_SOURCE
// Now supports 64-bit file operations
}
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review我对这个CMakeLists.txt的变更进行审查,以下是分析意见: 语法逻辑语法正确,CMakeLists.txt的格式规范,变更合理。 代码质量
代码性能
代码安全
改进建议
target_compile_definitions(${PROJECT_NAME} PRIVATE
DFMPLUGIN_DISK_ENCRYPT_LIBRARY
# 启用大文件支持(>2GB)
_FILE_OFFSET_BITS=64
_LARGEFILE64_SOURCE
)
总体而言,这次变更是有益的,增加了对大文件的支持,这对于文件加密功能是必要的。建议添加适当的注释以提高代码的可维护性。 |
There was a problem hiding this comment.
Hey there - I've reviewed your changes - here's some feedback:
- Wrap the _FILE_OFFSET_BITS and _LARGEFILE64_SOURCE definitions in a platform check (e.g. only on Linux/POSIX) to avoid unintended side-effects on other systems.
- Consider using CMake feature checks (such as check_c_source_compiles) to detect and enable large-file support instead of hardcoding these macros.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Wrap the _FILE_OFFSET_BITS and _LARGEFILE64_SOURCE definitions in a platform check (e.g. only on Linux/POSIX) to avoid unintended side-effects on other systems.
- Consider using CMake feature checks (such as check_c_source_compiles) to detect and enable large-file support instead of hardcoding these macros.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: GongHeng2017, max-lvs The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/merge |
-- Add _FILE_OFFSET_BITS=64 and _LARGEFILE64_SOURCE compile definitions to enable 64-bit file operations, fixing decryption failures on partitions larger than 2GB.
-- Resolves seek position errors and line 951 execution failure in diskencrypt.cpp when processing large disk partitions.
Log: fix issue
Bug: https://pms.uniontech.com/bug-view-327113.html
Summary by Sourcery
Enable large file support for the disk-encrypt plugin to fix decryption failures on partitions larger than 2GB.
Bug Fixes:
Build: