From 0a4fe0e41eae99fbe361ba41f46f45c379519bdd Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Wed, 11 Mar 2026 08:16:13 -0700 Subject: [PATCH] vmm: Fix OpenAPI definition of for lock granularity Use CamelCase as per the existing definitions (which allows the removal of the serde transformation) Signed-off-by: Rob Bradford --- block/src/fcntl.rs | 1 - vmm/src/api/openapi/cloud-hypervisor.yaml | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/block/src/fcntl.rs b/block/src/fcntl.rs index 23c6f9f16..98084748c 100644 --- a/block/src/fcntl.rs +++ b/block/src/fcntl.rs @@ -147,7 +147,6 @@ impl LockGranularity { /// image. Without a byte-range lock, some NFS implementations may treat the /// entire file as exclusively locked and prevent such operations (e.g. NetApp). #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, serde::Deserialize, serde::Serialize)] -#[serde(rename_all = "kebab-case")] pub enum LockGranularityChoice { /// Byte-range lock covering [0, size). #[default] diff --git a/vmm/src/api/openapi/cloud-hypervisor.yaml b/vmm/src/api/openapi/cloud-hypervisor.yaml index cdba385c7..efdcf7a67 100644 --- a/vmm/src/api/openapi/cloud-hypervisor.yaml +++ b/vmm/src/api/openapi/cloud-hypervisor.yaml @@ -945,8 +945,8 @@ components: LockGranularity: type: string - enum: [byte-range, full] - default: byte-range + enum: [ByteRange, Full] + default: ByteRange DiskConfig: type: object