Skip to content

Commit e50c006

Browse files
Alexey Makhalovk-hagio
authored andcommitted
vmware_vmss: make vmss global
It will allow to initialize and to use vmss from outside. Also move some useful macros to vmware_vmss.h file. This is a preparation for the following commit to extend vmss functionality. Signed-off-by: Alexey Makhalov <[email protected]>
1 parent a5e1aeb commit e50c006

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

vmware_vmss.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,7 @@
2323

2424
#define LOGPRX "vmw: "
2525

26-
/* VMware only supports X86/X86_64 virtual machines. */
27-
#define VMW_PAGE_SIZE (4096)
28-
#define VMW_PAGE_SHIFT (12)
29-
30-
#define MAX_BLOCK_DUMP (128)
31-
32-
static vmssdata vmss = { 0 };
26+
vmssdata vmss = { 0 };
3327

3428
int
3529
is_vmware_vmss(char *filename)

vmware_vmss.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,14 @@ struct vmssdata {
165165
};
166166
typedef struct vmssdata vmssdata;
167167

168+
/* VMware only supports X86/X86_64 virtual machines. */
169+
#define VMW_PAGE_SIZE (4096)
170+
#define VMW_PAGE_SHIFT (12)
171+
172+
#define MAX_BLOCK_DUMP (128)
173+
174+
extern vmssdata vmss;
175+
168176
#define DEBUG_PARSE_PRINT(x) \
169177
do { \
170178
if (CRASHDEBUG(1)) { \

0 commit comments

Comments
 (0)