Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qemu-vm device name cleanup #92205

Merged
merged 3 commits into from Jul 4, 2020
Merged

qemu-vm device name cleanup #92205

merged 3 commits into from Jul 4, 2020

Conversation

chkno
Copy link
Member

@chkno chkno commented Jul 3, 2020

Motivation for this change

This is just the cleanup & refactor pieces from #72354 as a separate PR so that #92122 can build atop them without waiting for #72354 to be merged.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

nixos/modules/virtualisation/qemu-vm.nix Show resolved Hide resolved
nixos/modules/virtualisation/qemu-vm.nix Outdated Show resolved Hide resolved
nixos/modules/virtualisation/qemu-vm.nix Show resolved Hide resolved
nixos/modules/virtualisation/qemu-vm.nix Outdated Show resolved Hide resolved
nixos/modules/virtualisation/qemu-vm.nix Outdated Show resolved Hide resolved
@chkno chkno force-pushed the qemu-vm-cleanup branch 2 times, most recently from 41e2c7f to 5a0d2d6 Compare July 4, 2020 02:21
@chkno chkno requested a review from nh2 July 4, 2020 02:23
@chkno
Copy link
Member Author

chkno commented Jul 4, 2020

After seeing another driveDeviceName usage example in #92122 in which 0-based indices were potentially confusing, I have changed driveDeviceName to use 1-based indices instead. Thanks, @nh2!

lookupDriveDeviceName = driveName: driveList:
(findSingle (drive: drive.name == driveName)
(throw "Drive ${driveName} not found")
(throw "Multilple drives named ${driveName}") driveList).device;
Copy link
Contributor

Choose a reason for hiding this comment

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

Multiple typo pointed out by #92122 (review)

Copy link
Contributor

Choose a reason for hiding this comment

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

I have force-pushed a fix to this into your PR (top commit).

Copy link
Contributor

@nh2 nh2 left a comment

Choose a reason for hiding this comment

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

My VM tests show that this is working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants