diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-11-17 10:55:49 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-17 10:55:49 +0100 |
| commit | c8dff0d2bb5a7c622ae7a7831f6ce42ad6635473 (patch) | |
| tree | a22155808898df7b9bf9b5f0254b6ceb3086ab88 /src/neboot-pci-tree.c | |
| parent | b9d6c2fffc397cd8dd9f7948be6f17f24d4f4850 (diff) | |
| parent | a4d3338e4f9ce011180b6d4f599acb4f34bba617 (diff) | |
Merge pull request #10 from nekernel-org/dev
meta: important document improvements.
Diffstat (limited to 'src/neboot-pci-tree.c')
| -rw-r--r-- | src/neboot-pci-tree.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/neboot-pci-tree.c b/src/neboot-pci-tree.c index a506323..832aa22 100644 --- a/src/neboot-pci-tree.c +++ b/src/neboot-pci-tree.c @@ -1,17 +1,17 @@ /* ------------------------------------------- - Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved. + Copyright (C) 2024, Amlal El Mahrouss, all rights reserved. ------------------------------------------- */ /** * @file neboot-pci-tree.c - * @author Amlal EL Mahrouss (amlal@nekernel.org) + * @author Amlal El Mahrouss (amlal@nekernel.org) * @brief PCI tree implementation. * @version 0.1 * @date 2024-01-22 * - * @copyright Copyright (c) 2024 Amlal EL Mahrouss + * @copyright Copyright (c) 2024 Amlal El Mahrouss * */ @@ -23,15 +23,15 @@ /// Standard Root table (Mahrouss Table) #define NB_PCI_ROOT_NAME "/pci-tree/@/" -static struct hw_cb_pci_tree* cb_base_tree = nil; -static struct hw_cb_pci_tree* cb_latest_tree = nil; -static struct hw_cb_pci_tree* cb_last_tree = nil; +static struct hw_nb_pci_tree* cb_base_tree = nil; +static struct hw_nb_pci_tree* cb_latest_tree = nil; +static struct hw_nb_pci_tree* cb_last_tree = nil; /// \brief Init the PCI device tree structure. /// \return if it already exists -> false /// Otherwise true. boolean cb_pci_init_tree(void) { - cb_base_tree = (struct hw_cb_pci_tree*) (NB_PCI_TREE_BASE); + cb_base_tree = (struct hw_nb_pci_tree*) (NB_PCI_TREE_BASE); // huh? anyway let's ignore it then. if (cb_base_tree->d_magic != NB_PCI_DEV_MAGIC) { @@ -46,7 +46,7 @@ boolean cb_pci_init_tree(void) { cb_base_tree->d_off_struct = 0; cb_base_tree->d_version = NB_PCI_VERSION; - cb_base_tree->d_next_sibling = (cb_pci_num_t) (cb_base_tree + sizeof(struct hw_cb_pci_tree)); + cb_base_tree->d_next_sibling = (cb_pci_num_t) (cb_base_tree + sizeof(struct hw_nb_pci_tree)); cb_base_tree->d_first_node = (cb_pci_num_t) cb_base_tree; cb_put_string(">> Append root device: " NB_PCI_ROOT_NAME "\r\n"); @@ -64,12 +64,12 @@ boolean cb_pci_init_tree(void) { boolean cb_pci_append_tree(const caddr_t name, cb_pci_num_t struct_ptr, cb_pci_num_t struct_sz) { if (!name || *name == 0 || cb_latest_tree == nil) return no; - struct hw_cb_pci_tree* cb_pci_tree = (struct hw_cb_pci_tree*) (cb_latest_tree); + struct hw_nb_pci_tree* cb_pci_tree = (struct hw_nb_pci_tree*) (cb_latest_tree); while (cb_pci_tree->d_magic == NB_PCI_DEV_MAGIC) { if (strcmp(cb_pci_tree->d_name, name) == 0) return no; - cb_pci_tree = (struct hw_cb_pci_tree*) (cb_pci_tree + sizeof(struct hw_cb_pci_tree)); + cb_pci_tree = (struct hw_nb_pci_tree*) (cb_pci_tree + sizeof(struct hw_nb_pci_tree)); } cb_pci_tree->d_magic = NB_PCI_DEV_MAGIC; @@ -82,7 +82,7 @@ boolean cb_pci_append_tree(const caddr_t name, cb_pci_num_t struct_ptr, cb_pci_n cb_pci_tree->d_sz_props = 0; cb_pci_tree->d_version = NB_PCI_VERSION; - cb_pci_tree->d_next_sibling = (cb_pci_num_t) (cb_pci_tree + sizeof(struct hw_cb_pci_tree)); + cb_pci_tree->d_next_sibling = (cb_pci_num_t) (cb_pci_tree + sizeof(struct hw_nb_pci_tree)); cb_pci_tree->d_first_node = (cb_pci_num_t) cb_latest_tree; cb_latest_tree = cb_pci_tree; |
