mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zdump/df_s390: Update 'zgetdump -i' output with zlib info
Update verbose 'zgetdump -i' output with zlib info (internal zlib version and zlib compression unit size). The following new entriees are to be dispalyed: Zlib version.......: 1 Zlib compression unit: 1 MB Signed-off-by: Mikhail Zaslonko <zaslonko@linux.ibm.com> Reviewed-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
14a79eb142
commit
1a850392bc
@@ -102,6 +102,8 @@ void df_s390_hdr_add(struct df_s390_hdr *hdr)
|
||||
if ((hdr->version >= 5 || hdr->magic == DF_S390_MAGIC_EXT) &&
|
||||
hdr->real_cpu_cnt)
|
||||
dfi_attr_real_cpu_cnt_set(hdr->real_cpu_cnt);
|
||||
if (!hdr->mvdump && hdr->zlib_version_s390 && hdr->zlib_entry_size)
|
||||
dfi_attr_zlib_info_set(hdr->zlib_version_s390, hdr->zlib_entry_size);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
27
zdump/dfi.c
27
zdump/dfi.c
@@ -74,6 +74,8 @@ struct attr {
|
||||
struct new_utsname *utsname;
|
||||
char *dump_method;
|
||||
u64 *file_size;
|
||||
u8 *zlib_version;
|
||||
u32 *zlib_entsize;
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -146,6 +148,11 @@ void dfi_info_print(void)
|
||||
if (l.attr.file_size)
|
||||
STDERR(" Dump file size.....: %lld MB\n",
|
||||
TO_MIB(*l.attr.file_size));
|
||||
if (g.opts.verbose && l.attr.zlib_version && l.attr.zlib_entsize) {
|
||||
STDERR(" Zlib version.......: %lld\n", *l.attr.zlib_version);
|
||||
STDERR(" Zlib compression unit: %lld MB\n",
|
||||
TO_MIB(*l.attr.zlib_entsize));
|
||||
}
|
||||
if (dfi_mem_range())
|
||||
dfi_mem_map_print(g.opts.verbose);
|
||||
if (l.dfi->info_dump) {
|
||||
@@ -426,6 +433,26 @@ u64 *dfi_attr_file_size(void)
|
||||
return l.attr.file_size;
|
||||
}
|
||||
|
||||
/*
|
||||
* Attribute: Zlib version and zlib entry size
|
||||
*/
|
||||
void dfi_attr_zlib_info_set(u8 version, u32 entry_size)
|
||||
{
|
||||
l.attr.zlib_version = zg_alloc(sizeof(*l.attr.zlib_version));
|
||||
*l.attr.zlib_version = version;
|
||||
l.attr.zlib_entsize = zg_alloc(sizeof(*l.attr.zlib_entsize));
|
||||
*l.attr.zlib_entsize = entry_size;
|
||||
}
|
||||
|
||||
u8 *dfi_attr_zlib_version(void)
|
||||
{
|
||||
return l.attr.zlib_version;
|
||||
}
|
||||
|
||||
u32 *dfi_attr_zlib_entsize(void)
|
||||
{
|
||||
return l.attr.zlib_entsize;
|
||||
}
|
||||
|
||||
/*
|
||||
* Attribute: Build architecture
|
||||
|
||||
@@ -182,6 +182,10 @@ u64 *dfi_attr_mem_size_real(void);
|
||||
void dfi_attr_file_size_set(u64 dump_size);
|
||||
u64 *dfi_attr_file_size(void);
|
||||
|
||||
void dfi_attr_zlib_info_set(u8 version, u32 entry_size);
|
||||
u8 *dfi_attr_zlib_version(void);
|
||||
u32 *dfi_attr_zlib_entsize(void);
|
||||
|
||||
void dfi_attr_vol_nr_set(unsigned int vol_nr);
|
||||
unsigned int *dfi_attr_vol_nr(void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user