Skip to content

Commit 9e75e18

Browse files
committed
tree: reduce the number of includes
To reduce complexity and dependencies between the header, include the types.h header and drop the rest. Signed-off-by: Daniel Wagner <[email protected]>
1 parent c6308c3 commit 9e75e18

2 files changed

Lines changed: 3 additions & 10 deletions

File tree

libnvme/src/nvme/tree.h

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,12 @@
66
* Authors: Keith Busch <[email protected]>
77
* Chaitanya Kulkarni <[email protected]>
88
*/
9-
10-
#ifndef _LIBNVME_TREE_H
11-
#define _LIBNVME_TREE_H
9+
#pragma once
1210

1311
#include <stdbool.h>
1412
#include <stddef.h>
1513

16-
#include <sys/types.h>
17-
#include <netinet/in.h>
18-
19-
#include <nvme/ioctl.h>
20-
#include <nvme/util.h>
14+
#include <nvme/types.h>
2115

2216
/**
2317
* DOC: tree.h
@@ -1516,5 +1510,3 @@ const char *nvme_host_get_hostsymname(nvme_host_t h);
15161510
* @hostsymname: Symbolic name
15171511
*/
15181512
void nvme_host_set_hostsymname(nvme_host_t h, const char *hostsymname);
1519-
1520-
#endif /* _LIBNVME_TREE_H */

libnvme/src/nvme/types.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <linux/types.h>
1616

1717
struct nvme_global_ctx;
18+
struct nvme_passthru_cmd;
1819
struct nvme_transport_handle;
1920

2021
/**

0 commit comments

Comments
 (0)