MCPcopy Create free account
hub / github.com/78/tenbox / BuildVmPatch

Function BuildVmPatch

src/manager/vm_forms.cpp:41–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41VmMutablePatch BuildVmPatch(const VmEditForm& form, const VmSpec& current_spec) {
42 VmMutablePatch patch;
43 patch.apply_on_next_boot = form.apply_on_next_boot;
44 if (form.name != current_spec.name) {
45 patch.name = form.name;
46 }
47 if (form.debug_mode != current_spec.debug_mode) {
48 patch.debug_mode = form.debug_mode;
49 }
50 if (!SameForwards(form.host_forwards, current_spec.host_forwards)) {
51 patch.host_forwards = form.host_forwards;
52 }
53 if (form.memory_mb != current_spec.memory_mb) {
54 patch.memory_mb = form.memory_mb;
55 }
56 if (form.cpu_count != current_spec.cpu_count) {
57 patch.cpu_count = form.cpu_count;
58 }
59 return patch;
60}

Callers 1

EditDlgSubclassProcFunction · 0.85

Calls 1

SameForwardsFunction · 0.85

Tested by

no test coverage detected