cmdline: add helper to generate /dev/vdX and /dev/sdX

The new function also handles more than 26 block devices rather than
erroring out (or silently generating incorrect names) in this case.

BUG=None
TEST=cargo test
TEST=crosvm run with `--block ...,root=true`

Change-Id: I025cc33251d40a37907891a5121f9c03a36a2f7b
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5545758
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Richard Zhang <rizhang@google.com>
1 file changed
tree: 32a73c9efb3d19d3d0103a0238256b50623fdab2
  1. .cargo/
  2. .config/
  3. .devcontainer/
  4. .github/
  5. .vscode/
  6. aarch64/
  7. acpi_tables/
  8. arch/
  9. argh_helpers/
  10. audio_streams_conformance_test/
  11. audio_util/
  12. base/
  13. bit_field/
  14. broker_ipc/
  15. common/
  16. cros_async/
  17. cros_fdt/
  18. cros_tracing/
  19. cros_tracing_types/
  20. crosvm_cli/
  21. crosvm_control/
  22. crosvm_plugin/
  23. devices/
  24. disk/
  25. docs/
  26. e2e_tests/
  27. ext2/
  28. fuse/
  29. fuzz/
  30. gpu_display/
  31. hypervisor/
  32. infra/
  33. io_uring/
  34. jail/
  35. kernel_cmdline/
  36. kernel_loader/
  37. kvm/
  38. kvm_sys/
  39. libcras_stub/
  40. linux_input_sys/
  41. logo/
  42. media/
  43. metrics/
  44. metrics_events/
  45. net_sys/
  46. net_util/
  47. perfetto/
  48. power_monitor/
  49. prebuilts/
  50. proto_build_tools/
  51. protos/
  52. resources/
  53. riscv64/
  54. rutabaga_gfx/
  55. sandbox/
  56. serde_keyvalue/
  57. src/
  58. swap/
  59. system_api/
  60. tests/
  61. third_party/
  62. tools/
  63. tube_transporter/
  64. usb_sys/
  65. usb_util/
  66. vendor/
  67. vfio_sys/
  68. vhost/
  69. virtio_sys/
  70. vm_control/
  71. vm_memory/
  72. win_audio/
  73. win_util/
  74. x86_64/
  75. .dockerignore
  76. .envrc
  77. .gitattributes
  78. .gitignore
  79. .gitmodules
  80. .rustfmt.toml
  81. ARCHITECTURE.md
  82. Cargo.lock
  83. Cargo.toml
  84. CONTRIBUTING.md
  85. DIR_METADATA
  86. LICENSE
  87. mypy.ini
  88. OWNERS
  89. OWNERS_COUNCIL
  90. PRESUBMIT.cfg
  91. pyproject.toml
  92. README.chromeos.md
  93. README.md
  94. rust-toolchain
README.md

crosvm - The ChromeOS Virtual Machine Monitor

crosvm is a virtual machine monitor (VMM) based on Linux’s KVM hypervisor, with a focus on simplicity, security, and speed. crosvm is intended to run Linux guests, originally as a security boundary for running native applications on the ChromeOS platform. Compared to QEMU, crosvm doesn’t emulate architectures or real hardware, instead concentrating on paravirtualized devices, such as the virtio standard.

crosvm is currently used to run Linux/Android guests on ChromeOS devices.

Logo