interrupts: rename device specific file descriptor
[dpdk.git] / lib / eal / common / eal_firmware.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2021 Red Hat, Inc.
3  */
4
5 #ifndef _EAL_FIRMWARE_H_
6 #define _EAL_FIRMWARE_H_
7
8 #include <sys/types.h>
9
10 #include <rte_compat.h>
11
12 /**
13  * Load a firmware in a dynamically allocated buffer, dealing with compressed
14  * files if libarchive is available.
15  *
16  * @param[in] name
17  *      Firmware filename to load.
18  * @param[out] buf
19  *      Buffer allocated by this function. If this function succeeds, the
20  *      caller is responsible for calling free() on this buffer.
21  * @param[out] bufsz
22  *      Size of the data in the buffer.
23  *
24  * @return
25  *      0 if successful.
26  *      Negative otherwise, buf and bufsize contents are invalid.
27  */
28 __rte_internal
29 int
30 rte_firmware_read(const char *name, void **buf, size_t *bufsz);
31
32 #endif /* _EAL_FIRMWARE_H_ */