summaryrefslogtreecommitdiffstats
path: root/src/nvme/tree.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-01-31 04:17:04 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-01-31 04:17:04 +0000
commit7e691c813bdf26bf9c51f03ee926818c00cc6e39 (patch)
tree1ecdb0c04700e31585faf09a0a868cf63814fc51 /src/nvme/tree.h
parentReleasing debian version 1.2-3. (diff)
downloadlibnvme-7e691c813bdf26bf9c51f03ee926818c00cc6e39.tar.xz
libnvme-7e691c813bdf26bf9c51f03ee926818c00cc6e39.zip
Merging upstream version 1.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/nvme/tree.h')
-rw-r--r--src/nvme/tree.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/nvme/tree.h b/src/nvme/tree.h
index 156cb79..e4a5126 100644
--- a/src/nvme/tree.h
+++ b/src/nvme/tree.h
@@ -107,6 +107,28 @@ const char *nvme_host_get_dhchap_key(nvme_host_t h);
void nvme_host_set_dhchap_key(nvme_host_t h, const char *key);
/**
+ * nvme_host_set_pdc_enabled() - Set Persistent Discovery Controller flag
+ * @h: Host for which the falg should be set
+ * @enabled: The bool to set the enabled flag
+ *
+ * When nvme_host_set_pdc_enabled() is not used to set the PDC flag,
+ * nvme_host_is_pdc_enabled() will return the default value which was
+ * passed into the function and not the undefined flag value.
+ */
+void nvme_host_set_pdc_enabled(nvme_host_t h, bool enabled);
+
+/**
+ * nvme_host_is_pdc_enabled() - Is Persistenct Discovery Controller enabled
+ * @h: Host which to check if PDC is enabled
+ * @fallback: The fallback default value of the flag when
+ * @nvme_host_set_pdc_enabled has not be used
+ * to set the flag.
+ *
+ * Return: true if PDC is enabled for @h, else false
+ */
+bool nvme_host_is_pdc_enabled(nvme_host_t h, bool fallback);
+
+/**
* nvme_default_host() - Initializes the default host
* @r: &nvme_root_t object
*
@@ -969,6 +991,25 @@ void nvme_ctrl_set_discovery_ctrl(nvme_ctrl_t c, bool discovery);
bool nvme_ctrl_is_discovery_ctrl(nvme_ctrl_t c);
/**
+ * nvme_ctrl_set_unique_discovery_ctrl() - Set the 'unique_discovery_ctrl' flag
+ * @c: Controller to be modified
+ * @unique: value of the unique_disc_ctrl flag
+ *
+ * Sets the 'unique_discovery_ctrl' flag in @c to specify wheter
+ * @c is a unique discovery controller
+ *
+ */
+void nvme_ctrl_set_unique_discovery_ctrl(nvme_ctrl_t c, bool unique);
+
+/**
+ * nvme_ctrl_is_unique_discovery_ctrl() - Check the 'unique_discovery_ctrl' flag
+ * @c: Controller to be checked
+ *
+ * Return: Value of the 'unique_discovery_ctrl' flag
+ */
+bool nvme_ctrl_is_unique_discovery_ctrl(nvme_ctrl_t c);
+
+/**
* nvme_ctrl_identify() - Issues an 'identify controller' command
* @c: Controller instance
* @id: Identify controller data structure