mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
- Initialize dump and dump-tool architecture to DFI_ARCH_64 at the start of dfi_init() and dt_init() respectively. - Bail out if any dump architecture other than ARCH_64 has been detected in s390_ext or s390mv_ext DASD dump header. - Remove redundant dfi_arch_set() and dt_arch_set() functions. - Get rid of l.arch local variables in dfi* and dt* source files and drop dfi_arch() function. - Drop the usage of DFI_ARCH_32 and compeletely remove DFI_ARCH_UNKNOWN. - Drop special register and lowcore processing functions used for DFI_ARCH_32. - Drop df_s390_from_dfi_arch() and df_s390_to_dfi_arch() funcitons. - Update the man file for zgetdump. 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>
61 lines
1.1 KiB
C
61 lines
1.1 KiB
C
/*
|
|
* zgetdump - Tool for copying and converting System z dumps
|
|
*
|
|
* NGDump dump tool
|
|
*
|
|
* Copyright IBM Corp. 2021
|
|
*
|
|
* s390-tools is free software; you can redistribute it and/or modify
|
|
* it under the terms of the MIT license. See LICENSE for details.
|
|
*/
|
|
|
|
#include "zgetdump.h"
|
|
#include "zg.h"
|
|
#include "dt.h"
|
|
#include "ngdump.h"
|
|
|
|
/*
|
|
* File local static data
|
|
*/
|
|
static struct {
|
|
int part_num;
|
|
struct ngdump_meta meta;
|
|
} l;
|
|
|
|
static int dt_ngdump_init(void)
|
|
{
|
|
char *part_path = NULL;
|
|
int rc;
|
|
|
|
l.part_num = ngdump_get_dump_part(g.fh, &part_path);
|
|
if (l.part_num <= 0)
|
|
return -1;
|
|
rc = ngdump_read_meta_from_device(part_path, &l.meta);
|
|
free(part_path);
|
|
if (rc)
|
|
return -1;
|
|
|
|
dt_version_set(l.meta.version);
|
|
|
|
return 0;
|
|
}
|
|
|
|
static void dt_ngdump_info(void)
|
|
{
|
|
STDERR("Partition info:\n");
|
|
STDERR(" Partition number..: %d\n", l.part_num);
|
|
if (!l.meta.file)
|
|
return;
|
|
STDERR("Meta info:\n");
|
|
STDERR(" File..............: %s\n", l.meta.file);
|
|
}
|
|
|
|
/*
|
|
* NGDump DT operations
|
|
*/
|
|
struct dt dt_ngdump = {
|
|
.desc = "Next Generation (NGDump) dump tool",
|
|
.init = dt_ngdump_init,
|
|
.info = dt_ngdump_info,
|
|
};
|