Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:FrontRunner
libnvme.26914
0011-tree-rename-controller-dhchap_key-to-dhcha...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0011-tree-rename-controller-dhchap_key-to-dhchap_ctrl_key.patch of Package libnvme.26914
From: Hannes Reinecke <hare@suse.de> Date: Thu, 28 Jul 2022 18:19:41 +0200 Subject: tree: rename controller 'dhchap_key' to 'dhchap_ctrl_key' Git-commit: 055639d5ace8c88248d82a72460e49f18bf0a723 References: bsc#1201501 bsc#1201700 To differentiate between 'host' and 'controller' keys within the controller structure. Signed-off-by: Hannes Reinecke <hare@suse.de> Acked-by: Daniel Wagner <dwagner@suse.de> --- src/nvme/fabrics.c | 4 ++-- src/nvme/private.h | 2 +- src/nvme/tree.c | 20 ++++++++++---------- 3 files changed, 13 insertions(+), 13 deletions(-) --- a/src/nvme/fabrics.c +++ b/src/nvme/fabrics.c @@ -599,8 +599,8 @@ int nvmf_add_ctrl(nvme_host_t h, nvme_ct * in @cfg, so ensure to update @c with the correct * controller key. */ - if (fc->dhchap_key) - nvme_ctrl_set_dhchap_key(c, fc->dhchap_key); + if (fc->dhchap_ctrl_key) + nvme_ctrl_set_dhchap_key(c, fc->dhchap_ctrl_key); } } --- a/src/nvme/private.h +++ b/src/nvme/private.h @@ -79,7 +79,7 @@ struct nvme_ctrl { char *subsysnqn; char *traddr; char *trsvcid; - char *dhchap_key; + char *dhchap_ctrl_key; char *cntrltype; char *dctype; bool discovery_ctrl; --- a/src/nvme/tree.c +++ b/src/nvme/tree.c @@ -809,17 +809,17 @@ struct nvme_fabrics_config *nvme_ctrl_ge const char *nvme_ctrl_get_dhchap_key(nvme_ctrl_t c) { - return c->dhchap_key; + return c->dhchap_ctrl_key; } void nvme_ctrl_set_dhchap_key(nvme_ctrl_t c, const char *key) { - if (c->dhchap_key) { - free(c->dhchap_key); - c->dhchap_key = NULL; + if (c->dhchap_ctrl_key) { + free(c->dhchap_ctrl_key); + c->dhchap_ctrl_key = NULL; } if (key) - c->dhchap_key = strdup(key); + c->dhchap_ctrl_key = strdup(key); } void nvme_ctrl_set_discovered(nvme_ctrl_t c, bool discovered) @@ -894,7 +894,7 @@ void nvme_deconfigure_ctrl(nvme_ctrl_t c FREE_CTRL_ATTR(c->queue_count); FREE_CTRL_ATTR(c->serial); FREE_CTRL_ATTR(c->sqsize); - FREE_CTRL_ATTR(c->dhchap_key); + FREE_CTRL_ATTR(c->dhchap_ctrl_key); FREE_CTRL_ATTR(c->address); FREE_CTRL_ATTR(c->dctype); FREE_CTRL_ATTR(c->cntrltype); @@ -1155,10 +1155,10 @@ static int nvme_configure_ctrl(nvme_root c->queue_count = nvme_get_ctrl_attr(c, "queue_count"); c->serial = nvme_get_ctrl_attr(c, "serial"); c->sqsize = nvme_get_ctrl_attr(c, "sqsize"); - c->dhchap_key = nvme_get_ctrl_attr(c, "dhchap_ctrl_secret"); - if (c->dhchap_key && !strcmp(c->dhchap_key, "none")) { - free(c->dhchap_key); - c->dhchap_key = NULL; + c->dhchap_ctrl_key = nvme_get_ctrl_attr(c, "dhchap_ctrl_secret"); + if (c->dhchap_ctrl_key && !strcmp(c->dhchap_ctrl_key, "none")) { + free(c->dhchap_ctrl_key); + c->dhchap_ctrl_key = NULL; } c->cntrltype = nvme_get_ctrl_attr(c, "cntrltype"); c->dctype = nvme_get_ctrl_attr(c, "dctype");
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor