From 8b55d1e2d47484566d3e71754389026f63c98dca Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Tue, 24 Dec 2024 21:33:40 +0000 Subject: [PATCH] block: vhdx: rename Header::get_header_as_buffer Signed-off-by: Wei Liu --- block/src/vhdx/vhdx_header.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/block/src/vhdx/vhdx_header.rs b/block/src/vhdx/vhdx_header.rs index edb1c652a..e7863d0da 100644 --- a/block/src/vhdx/vhdx_header.rs +++ b/block/src/vhdx/vhdx_header.rs @@ -151,7 +151,7 @@ impl Header { } /// Converts the header structure into a buffer - fn get_header_as_buffer(&self, buffer: &mut [u8; HEADER_SIZE as usize]) { + fn write_to_buffer(&self, buffer: &mut [u8; HEADER_SIZE as usize]) { // SAFETY: self is a valid header. let reference = unsafe { std::slice::from_raw_parts(self as *const Header as *const u8, HEADER_SIZE as usize) @@ -191,9 +191,9 @@ impl Header { log_offset: current_header.log_offset, }; - new_header.get_header_as_buffer(&mut buffer); + new_header.write_to_buffer(&mut buffer); new_header.checksum = calculate_checksum(&mut buffer, size_of::()); - new_header.get_header_as_buffer(&mut buffer); + new_header.write_to_buffer(&mut buffer); f.seek(SeekFrom::Start(start)) .map_err(VhdxHeaderError::SeekHeader)?;