File: libkmod-internal-file.h

package info (click to toggle)
kmod 34.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,864 kB
  • sloc: ansic: 16,990; makefile: 498; sh: 382; xml: 61; perl: 12
file content (48 lines) | stat: -rw-r--r-- 862 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// SPDX-License-Identifier: LGPL-2.1-or-later
/*
 * Copyright © 2024 Intel Corporation
 */

#include <errno.h>

#include <libkmod/libkmod-internal.h>

struct kmod_ctx;
struct kmod_elf;

struct kmod_file {
	int fd;
	enum kmod_file_compression_type compression;
	off_t size;
	void *memory;
	int (*load)(struct kmod_file *file);
	const struct kmod_ctx *ctx;
	struct kmod_elf *elf;
};

#if ENABLE_XZ
int kmod_file_load_xz(struct kmod_file *file);
#else
static inline int kmod_file_load_xz(struct kmod_file *file)
{
	return -ENOSYS;
}
#endif

#if ENABLE_ZLIB
int kmod_file_load_zlib(struct kmod_file *file);
#else
static inline int kmod_file_load_zlib(struct kmod_file *file)
{
	return -ENOSYS;
}
#endif

#if ENABLE_ZSTD
int kmod_file_load_zstd(struct kmod_file *file);
#else
static inline int kmod_file_load_zstd(struct kmod_file *file)
{
	return -ENOSYS;
}
#endif