Merged
Conversation
Some USB device information acquisition failures may occur; these should be ignored. Failure example: smartctl 7.2 2020-12-30 r5155 [x86_64-linux-6.6.0-amd64-desktop] (local build) Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Vendor: aigo Product: U268 Revision: 2.00 Compliance: SPC-2 User Capacity: 62,914,560,000 bytes [62.9 GB] Logical block size: 512 bytes scsiModePageOffset: response length too short, resp_len=4 offset=4 bd_len=0 scsiModePageOffset: response length too short, resp_len=4 offset=4 bd_len=0 >> Terminate command early due to bad response to IEC mode page A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options. Log: Fix fail to get info from some USB device Bug: https://pms.uniontech.com/bug-view-303363.html
The value of m_size is incorrectly stored in m_interface. Log: Fix disk interface display abnormality Bug: https://pms.uniontech.com/bug-view-327617.html
As title. Log: Update version to 6.0.12
deepin pr auto review关键摘要:
是否建议立即修改:
|
|
TAG Bot TAG: 6.0.12 |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR corrects the variable used when parsing disk size from lshw output and removes the early exit on smartctl failures to streamline disk media type detection. Class diagram for DeviceStorage changesclassDiagram
class DeviceStorage {
+void getInfoFromLshw(const QMap<QString, QString> &mapInfo)
+QString getDiskInfoMediaType(const QString &devicePath)
-QString m_interface
+QString m_size
}
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey @wangrong1069 - I've reviewed your changes - here's some feedback:
- After removing the exitcode check in getDiskInfoMediaType, consider adding explicit handling or logging for non-zero exit codes to avoid silent failures or uninitialized return values.
- Verify that changing the assignment from m_interface to m_size in getInfoFromLshw doesn’t leave m_interface unset in other parts of the code that rely on it.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- After removing the exitcode check in getDiskInfoMediaType, consider adding explicit handling or logging for non-zero exit codes to avoid silent failures or uninitialized return values.
- Verify that changing the assignment from m_interface to m_size in getInfoFromLshw doesn’t leave m_interface unset in other parts of the code that rely on it.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
lzwind
approved these changes
Aug 7, 2025
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: lzwind, wangrong1069 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 |
This was referenced Aug 7, 2025
Open
Open
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
Fix variable assignment in storage size parsing and simplify disk media type detection by removing redundant error handling.
Bug Fixes: