Rename manifest.num_vms to vm_count
Rename variable to conform to Hafnium's style guide.
Change-Id: I0b983c98eb28195bc23ba4947857d0d63a990ae3
diff --git a/inc/hf/manifest.h b/inc/hf/manifest.h
index 46bd205..57657c7 100644
--- a/inc/hf/manifest.h
+++ b/inc/hf/manifest.h
@@ -44,7 +44,7 @@
* Hafnium manifest parsed from FDT.
*/
struct manifest {
- spci_vm_count_t num_vms;
+ spci_vm_count_t vm_count;
struct manifest_vm vm[MAX_VMS];
};
diff --git a/src/load.c b/src/load.c
index 25e593c..cb4fa90 100644
--- a/src/load.c
+++ b/src/load.c
@@ -275,7 +275,7 @@
pa_addr(mem_ranges_available[i].end), PAGE_SIZE));
}
- for (i = 0; i < manifest->num_vms; ++i) {
+ for (i = 0; i < manifest->vm_count; ++i) {
const struct manifest_vm *manifest_vm = &manifest->vm[i];
spci_vm_id_t vm_id = HF_VM_ID_OFFSET + i;
struct vm *vm;
diff --git a/src/manifest.c b/src/manifest.c
index fb2b695..dc6ed5b 100644
--- a/src/manifest.c
+++ b/src/manifest.c
@@ -268,7 +268,7 @@
found_primary_vm = true;
}
- manifest->num_vms = i + 1;
+ manifest->vm_count = i + 1;
TRY(parse_vm(&vm_node, &manifest->vm[i], vm_id));
}
diff --git a/src/manifest_test.cc b/src/manifest_test.cc
index fcd111d..c87acaf 100644
--- a/src/manifest_test.cc
+++ b/src/manifest_test.cc
@@ -390,7 +390,7 @@
ASSERT_TRUE(get_fdt_root(dtb_last_valid, &fdt_root));
ASSERT_EQ(manifest_init(&m, &fdt_root), MANIFEST_SUCCESS);
- ASSERT_EQ(m.num_vms, 2);
+ ASSERT_EQ(m.vm_count, 2);
ASSERT_EQ(m.vm[1].secondary.vcpu_count, UINT16_MAX);
ASSERT_TRUE(get_fdt_root(dtb_first_invalid, &fdt_root));
@@ -430,7 +430,7 @@
ASSERT_TRUE(get_fdt_root(dtb, &fdt_root));
ASSERT_EQ(manifest_init(&m, &fdt_root), MANIFEST_SUCCESS);
- ASSERT_EQ(m.num_vms, 3);
+ ASSERT_EQ(m.vm_count, 3);
vm = &m.vm[0];
ASSERT_STREQ(vm->debug_name, "primary_vm");