zdump: Make ngdump_get_part_path() public

Make ngdump_get_part_path() public in order for unit-tests to access it.

Signed-off-by: Mikhail Zaslonko <zaslonko@linux.ibm.com>
Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
This commit is contained in:
Mikhail Zaslonko
2024-03-11 14:27:21 +01:00
committed by Steffen Eiden
parent 2288331a6f
commit 47b0960cc7
2 changed files with 9 additions and 7 deletions
+2 -7
View File
@@ -32,11 +32,6 @@
#define NGDUMP_META_VERSION 1
#define NGDUMP_META_FILENAME "ngdump.meta"
enum ngdump_disk_type {
NG_TYPE_DASD,
NG_TYPE_NVME,
};
static const char *const ngtype2str[] = {
[NG_TYPE_DASD] = "DASD",
[NG_TYPE_NVME] = "NVME"
@@ -474,8 +469,8 @@ static int ngdump_get_eckd_part_num(struct zg_fh *zg_fh)
* This function composes the absolute partition device node name
* based on the device name, device type and the partition number.
*/
static int ngdump_get_part_path(const char *disk_path, int part_num,
enum ngdump_disk_type ng_type, char **part_path)
int ngdump_get_part_path(const char *disk_path, int part_num,
enum ngdump_disk_type ng_type, char **part_path)
{
char *real_path;
+7
View File
@@ -20,7 +20,14 @@ struct ngdump_meta {
const char *sha256sum;
};
enum ngdump_disk_type {
NG_TYPE_DASD,
NG_TYPE_NVME,
};
int ngdump_read_meta_from_device(const char *device, struct ngdump_meta *meta);
int ngdump_get_dump_part(struct zg_fh *zg_fh, char **part_path);
int ngdump_get_part_path(const char *disk_path, int part_num,
enum ngdump_disk_type ng_type, char **part_path);
#endif /* ZGETDUMP_NGDUMP_H */