zdump: Implement NGDump helpers

This commit introduces a new module containing various helpers for
NGDump stand-alone dump. The purpose of these helpers is to facilitate
the implementation of DT and DFI interfaces for NGDump, share code
between both, reduce duplication and enable unit testing later on.

Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com>
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Alexander Egorenkov
2021-08-05 11:32:18 +02:00
committed by Jan Höppner
parent 60f862b21c
commit 8ddc31ea77
3 changed files with 357 additions and 1 deletions
+30
View File
@@ -0,0 +1,30 @@
/*
* 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.
*/
#ifndef ZGETDUMP_NGDUMP_H
#define ZGETDUMP_NGDUMP_H
#define NGDUMP_FSTYPE "ext4"
struct ngdump_meta {
int version;
const char *file;
const char *sha256sum;
};
int ngdump_read_meta_from_device(const char *device, struct ngdump_meta *meta);
int ngdump_get_dump_part(struct zg_fh *zg_fh);
int ngdump_get_disk_part_path(const char *disk_path, int part_num,
char **part_path);
#endif /* ZGETDUMP_NGDUMP_H */