-----Original Message-----
在 2020年10月13日 03:37, Alexey Makhalov 写道:
> 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.
>
Thank you for the update, Alexey.
Ack the v7 series.
Acked-by: Lianbo Jiang <lijiang(a)redhat.com>
Thanks, applied.
https://github.com/crash-utility/crash/commit/e50c006dcc18666cc9f0a2cc3e4...
https://github.com/crash-utility/crash/commit/3fedbee9bfbba4f5c5d2734852e...
Kazu
> Signed-off-by: Alexey Makhalov <amakhalov(a)vmware.com>
> Acked-by: Kazuhito Hagio <k-hagio-ab(a)nec.com>
> ---
> vmware_vmss.c | 8 +-------
> vmware_vmss.h | 8 ++++++++
> 2 files changed, 9 insertions(+), 7 deletions(-)
>
> diff --git a/vmware_vmss.c b/vmware_vmss.c
> index 252bfa2..b168f29 100644
> --- a/vmware_vmss.c
> +++ b/vmware_vmss.c
> @@ -23,13 +23,7 @@
>
> #define LOGPRX "vmw: "
>
> -/* VMware only supports X86/X86_64 virtual machines. */
> -#define VMW_PAGE_SIZE (4096)
> -#define VMW_PAGE_SHIFT (12)
> -
> -#define MAX_BLOCK_DUMP (128)
> -
> -static vmssdata vmss = { 0 };
> +vmssdata vmss = { 0 };
>
> int
> is_vmware_vmss(char *filename)
> diff --git a/vmware_vmss.h b/vmware_vmss.h
> index a5828a0..01d9446 100644
> --- a/vmware_vmss.h
> +++ b/vmware_vmss.h
> @@ -165,6 +165,14 @@ struct vmssdata {
> };
> typedef struct vmssdata vmssdata;
>
> +/* VMware only supports X86/X86_64 virtual machines. */
> +#define VMW_PAGE_SIZE (4096)
> +#define VMW_PAGE_SHIFT (12)
> +
> +#define MAX_BLOCK_DUMP (128)
> +
> +extern vmssdata vmss;
> +
> #define DEBUG_PARSE_PRINT(x) \
> do { \
> if (CRASHDEBUG(1)) { \
>