block/dmg: Declare a type definition for DMG uncompress function
Introduce the BdrvDmgUncompressFunc type defintion. To emphasis dmg_uncompress_bz2 and dmg_uncompress_lzfse are pointer to functions, declare them using this new typedef. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-id: 20230320152610.32052-1-philmd@linaro.org Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
ac5f7bf8e2
commit
fdd5e90fdb
@ -31,11 +31,8 @@
|
|||||||
#include "qemu/memalign.h"
|
#include "qemu/memalign.h"
|
||||||
#include "dmg.h"
|
#include "dmg.h"
|
||||||
|
|
||||||
int (*dmg_uncompress_bz2)(char *next_in, unsigned int avail_in,
|
BdrvDmgUncompressFunc *dmg_uncompress_bz2;
|
||||||
char *next_out, unsigned int avail_out);
|
BdrvDmgUncompressFunc *dmg_uncompress_lzfse;
|
||||||
|
|
||||||
int (*dmg_uncompress_lzfse)(char *next_in, unsigned int avail_in,
|
|
||||||
char *next_out, unsigned int avail_out);
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
/* Limit chunk sizes to prevent unreasonable amounts of memory being used
|
/* Limit chunk sizes to prevent unreasonable amounts of memory being used
|
||||||
|
@ -51,10 +51,10 @@ typedef struct BDRVDMGState {
|
|||||||
z_stream zstream;
|
z_stream zstream;
|
||||||
} BDRVDMGState;
|
} BDRVDMGState;
|
||||||
|
|
||||||
extern int (*dmg_uncompress_bz2)(char *next_in, unsigned int avail_in,
|
typedef int BdrvDmgUncompressFunc(char *next_in, unsigned int avail_in,
|
||||||
char *next_out, unsigned int avail_out);
|
char *next_out, unsigned int avail_out);
|
||||||
|
|
||||||
extern int (*dmg_uncompress_lzfse)(char *next_in, unsigned int avail_in,
|
extern BdrvDmgUncompressFunc *dmg_uncompress_bz2;
|
||||||
char *next_out, unsigned int avail_out);
|
extern BdrvDmgUncompressFunc *dmg_uncompress_lzfse;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user