mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zdump/dfi: Extract dfi_vmcoreinfo.h header from dfi.h
Create a separate C header for DFI VMCOREINFO to separate independent things and make it more readable. Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
b1da8bbbe9
commit
6afd5e97d1
@@ -12,8 +12,10 @@
|
||||
#include <time.h>
|
||||
|
||||
#include "lib/util_log.h"
|
||||
|
||||
#include "zgetdump.h"
|
||||
#include "dfi_mem_chunk.h"
|
||||
#include "dfi_vmcoreinfo.h"
|
||||
|
||||
#define TIME_FMT_STR "%a, %d %b %Y %H:%M:%S %z"
|
||||
#define PROGRESS_HASH_CNT 50
|
||||
|
||||
12
zdump/dfi.h
12
zdump/dfi.h
@@ -200,18 +200,6 @@ int dfi_feat_copy(void);
|
||||
*/
|
||||
unsigned long dfi_kdump_base(void);
|
||||
|
||||
/*
|
||||
* DFI vmcoreinfo functions
|
||||
*/
|
||||
void dfi_vmcoreinfo_init(void);
|
||||
char *dfi_vmcoreinfo_get(void);
|
||||
int dfi_vmcoreinfo_tag(char *str, int len, const char *sym);
|
||||
int dfi_vmcoreinfo_symbol(unsigned long *val, const char *sym);
|
||||
int dfi_vmcoreinfo_offset(unsigned long *offs, const char *sym);
|
||||
int dfi_vmcoreinfo_size(unsigned long *size, const char *sym);
|
||||
int dfi_vmcoreinfo_length(unsigned long *len, const char *sym);
|
||||
int dfi_vmcoreinfo_val(unsigned long *val, const char *sym);
|
||||
|
||||
/*
|
||||
* DFI operations
|
||||
*/
|
||||
|
||||
@@ -9,12 +9,16 @@
|
||||
* it under the terms of the MIT license. See LICENSE for details.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <elf.h>
|
||||
|
||||
#include "lib/zt_common.h"
|
||||
#include "lib/util_log.h"
|
||||
|
||||
#include "zgetdump.h"
|
||||
#include "zg.h"
|
||||
#include "dfi_mem_chunk.h"
|
||||
#include "dfi_vmcoreinfo.h"
|
||||
|
||||
#ifdef __s390x__
|
||||
#define LC_VMCORE_INFO 0xe0c
|
||||
@@ -23,7 +27,7 @@
|
||||
#endif
|
||||
|
||||
#define LC_OS_INFO 0xe18
|
||||
#define OS_INFO_MAGIC 0x4f53494e464f535aULL /* OSINFOSZ */
|
||||
#define OS_INFO_MAGIC 0x4f53494e464f535aULL /* OSINFOSZ */
|
||||
|
||||
struct os_info {
|
||||
u64 magic;
|
||||
|
||||
20
zdump/dfi_vmcoreinfo.h
Normal file
20
zdump/dfi_vmcoreinfo.h
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright IBM Corp. 2001, 2018
|
||||
*
|
||||
* s390-tools is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the MIT license. See LICENSE for details.
|
||||
*/
|
||||
|
||||
#ifndef DFI_VMCOREINFO_H
|
||||
#define DFI_VMCOREINFO_H
|
||||
|
||||
void dfi_vmcoreinfo_init(void);
|
||||
char *dfi_vmcoreinfo_get(void);
|
||||
int dfi_vmcoreinfo_tag(char *str, int len, const char *sym);
|
||||
int dfi_vmcoreinfo_symbol(unsigned long *val, const char *sym);
|
||||
int dfi_vmcoreinfo_offset(unsigned long *offs, const char *sym);
|
||||
int dfi_vmcoreinfo_size(unsigned long *size, const char *sym);
|
||||
int dfi_vmcoreinfo_length(unsigned long *len, const char *sym);
|
||||
int dfi_vmcoreinfo_val(unsigned long *val, const char *sym);
|
||||
|
||||
#endif /* DFI_VMCOREINFO_H */
|
||||
@@ -16,7 +16,10 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "zgetdump.h"
|
||||
#include "df_elf.h"
|
||||
#include "dfi.h"
|
||||
#include "dfi_vmcoreinfo.h"
|
||||
#include "dfo.h"
|
||||
|
||||
#define HDR_PER_CPU_SIZE 0x4a0
|
||||
#define HDR_PER_MEMC_SIZE 0x100
|
||||
|
||||
Reference in New Issue
Block a user