mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zdump/zfuse: Extract zfuse.h header from zgetdump.h
Create a separate C header for FUSE 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
1e450e6f7b
commit
afb14cba7a
@@ -16,6 +16,7 @@
|
||||
#include <fuse.h>
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
@@ -23,6 +24,10 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include "zgetdump.h"
|
||||
#include "zg.h"
|
||||
#include "dfi.h"
|
||||
#include "dfo.h"
|
||||
#include "zfuse.h"
|
||||
|
||||
#define DUMP_PATH_MAX 100
|
||||
|
||||
|
||||
25
zdump/zfuse.h
Normal file
25
zdump/zfuse.h
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* 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 ZFUSE_H
|
||||
#define ZFUSE_H
|
||||
|
||||
#if HAVE_FUSE == 0
|
||||
static inline int zfuse_mount_dump(void)
|
||||
{
|
||||
ERR_EXIT("Program compiled without fuse support");
|
||||
}
|
||||
static inline void zfuse_umount(void)
|
||||
{
|
||||
ERR_EXIT("Program compiled without fuse support");
|
||||
}
|
||||
#else
|
||||
int zfuse_mount_dump(void);
|
||||
void zfuse_umount(void);
|
||||
#endif
|
||||
|
||||
#endif /* ZFUSE_H */
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include "zgetdump.h"
|
||||
#include "zfuse.h"
|
||||
|
||||
/*
|
||||
* Globals
|
||||
|
||||
@@ -57,18 +57,4 @@ extern struct zgetdump_globals {
|
||||
extern void opts_parse(int argc, char *argv[]);
|
||||
extern int stdout_write_dump(void);
|
||||
|
||||
#if HAVE_FUSE == 0
|
||||
static inline int zfuse_mount_dump(void)
|
||||
{
|
||||
ERR_EXIT("Program compiled without fuse support");
|
||||
}
|
||||
static inline void zfuse_umount(void)
|
||||
{
|
||||
ERR_EXIT("Program compiled without fuse support");
|
||||
}
|
||||
#else
|
||||
int zfuse_mount_dump(void);
|
||||
void zfuse_umount(void);
|
||||
#endif
|
||||
|
||||
#endif /* ZGETDUMP_H */
|
||||
|
||||
Reference in New Issue
Block a user