From dddf725f70bfe7f5adb41fa31dbd06e767271bda Mon Sep 17 00:00:00 2001 From: Janosch Frank Date: Thu, 11 Aug 2022 12:10:58 +0000 Subject: dump: Rework filter area variables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit While the DumpState begin and length variables directly mirror the API variable names they are not very descriptive. So let's add a "filter_area_" prefix and make has_filter a function checking length > 0. Signed-off-by: Janosch Frank Reviewed-by: Marc-André Lureau Message-Id: <20220811121111.9878-6-frankja@linux.ibm.com> --- include/sysemu/dump.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/sysemu/dump.h b/include/sysemu/dump.h index 7fce1d4..b62513d 100644 --- a/include/sysemu/dump.h +++ b/include/sysemu/dump.h @@ -166,9 +166,16 @@ typedef struct DumpState { hwaddr memory_offset; int fd; - bool has_filter; - int64_t begin; - int64_t length; + /* + * Dump filter area variables + * + * A filtered dump only contains the guest memory designated by + * the start address and length variables defined below. + * + * If length is 0, no filtering is applied. + */ + int64_t filter_area_begin; /* Start address of partial guest memory area */ + int64_t filter_area_length; /* Length of partial guest memory area */ uint8_t *note_buf; /* buffer for notes */ size_t note_buf_offset; /* the writing place in note_buf */ -- cgit v1.1