iris-ci: runtime cdrom-load + sh-compatible get/put#29
Merged
techomancer merged 2 commits intoMay 31, 2026
Conversation
cdrom-eject only cycles through the configured changer list. Add `iris-ci cdrom-load <id> <path>` to load an arbitrary host ISO into a SCSI CD-ROM and make it the active disc immediately (medium change / unit attention so mediad remounts), as if hand-swapping the disc. ScsiDevice::load_disc opens the path as a Direct (raw ISO) backend — matching eject_next — inserts it at the front of the changer list, and signals unit_attention. Wired through Wd33c93a::load_disc, the ci.rs "cdrom-load" dispatch/handler, and the iris-ci CdromLoad subcommand. Lets you install extra media (e.g. the dev/compiler discs) onto a running, booted IRIX without halting and rewriting the changer config. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
cmd_get/cmd_put hardcoded csh redirect syntax (>& /dev/null) and the $status rc-marker. When the guest's root login shell is /bin/sh (the klindert 6.5 disk), the csh redirect errors with "bad file unit number" and the rc-marker comes back empty — which broke `iris-ci get`/`put` entirely and is also why every `iris-ci run` reported "guest exit -1". Add detect_guest_shell() (probes $0, which both shells expand, with a sentinel so it doesn't itself depend on the rc-marker) and devnull_redirect(); get/put now select the matching redirect (2>&1 vs >&) and rc-marker ($? vs $status). Works for both sh-root (6.5 klindert) and csh-root (classic 5.3) guests, so the fast scratch-volume file pull works again (~1.8s for a 294 KB frame). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Two independent iris-ci automation improvements:
cdrom-load— swap an arbitrary CD image into a SCSI CD-ROM at runtime (ci.rs, iris_ci_main.rs, scsi.rs, wd33c93a.rs), so install/automation scripts can cycle discs without restarting iris./bin/sh—iris-ci get/puthardcoded csh redirect syntax (>& /dev/null) and the$statusrc-marker. On a guest whose root shell is/bin/shthe redirect errors ("bad file unit number") and the rc-marker comes back empty, breaking get/put (and making everyiris-ci runreport a bogus exit code). Detect the guest shell via$0and pick the matching redirect (2>&1vs>&) + rc-marker ($?vs$status); works for both sh- and csh-root guests.🤖 Generated with Claude Code