Skip to content

Show vendor and model for Linux optical drives - #13

Open
zany130 wants to merge 1 commit into
Deterous:mainfrom
zany130:linux-drive-model-labels
Open

zany130 wants to merge 1 commit into
Deterous:mainfrom
zany130:linux-drive-model-labels

Conversation

@zany130

@zany130 zany130 commented Nov 5, 2026 •

Copy link
Copy Markdown

EDIT: I tested this pr with both a built appmage and my flatpak packaging myself. Codex, however wrote the majority of this pr and the achtual code changes.

this is how it looked before
image
and after
image

Linux optical drives discovered through sysfs currently appear in the drive dropdown only as /dev/sg*, making multiple drives difficult to distinguish. Read optional vendor and model attributes from the already-discovered SCSI device and show choices such as /dev/sg3 — PLEXTOR CD-R PX-W4012A.

The selected value and redumper argument remain the original device path. Missing, blank, or unreadable metadata falls back to the plain path; partial metadata remains useful. Normalize padded SCSI whitespace. Windows/macOS enumeration and displayed choices are unchanged. The compact selected-path control remains unchanged, with its existing adjacent description showing the model; egui already expands the open menu to fit its labels. No dependencies or packaging changes.

Validation:

  • cargo test --locked: 3 tests passed (vendor/model normalization, partial metadata, missing/blank/read-failure/disconnected-device fallbacks).
  • cargo fmt --all -- --check and git diff --check: passed.
  • cargo clippy --locked --all-targets: completed; warning messages/counts match an untouched checkout of base commit 65028e7. Strict -D warnings fails on the existing build.rs clippy::get_first warning.
  • A standalone probe compiling the actual src/drives.rs returned /dev/sg1 — Generic External, /dev/sg2 — TSSTcorp DVD-ROM SH-D163B, and /dev/sg3 — PLEXTOR CD-R PX-W4012A, both on the Bazzite host and inside the installed Redumper-GUI Flatpak. The Flatpak run granted temporary read-only access only to the probe directory; existing device permissions were unchanged. No optical-device commands were issued.

Packaging and limits:

  • Flatpak exposes the relevant sysfs paths read-only by default (permissions documentation); the installed package's sandbox was verified with the compiled detector. Metadata does not require a host helper, elevated privileges, or new permissions. Access required for actual dumping is unchanged.
  • Upstream currently builds Linux tarballs, with no AppImage recipe in this checkout. The change adds only standard-library reads of existing sysfs paths and no bundling dependency; an actual AppImage build/run was not tested. A separately imposed sandbox can still hide metadata, which uses the existing plain-path fallback.
  • Full GUI visual testing, physical dumping, and Windows/macOS builds were not performed locally.

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.

1 participant