Skip to content

Commit 82967b9

Browse files
committed
fabrics: rename nvme_free_uri to nvmf_free_uri
All fabrics function should use the nvmf_ prefix. Signed-off-by: Daniel Wagner <[email protected]>
1 parent 6ec9763 commit 82967b9

6 files changed

Lines changed: 10 additions & 10 deletions

File tree

libnvme/src/libnvme.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ LIBNVME_2_0 {
6969
nvme_free_host;
7070
nvme_free_ns;
7171
nvme_free_subsystem;
72-
nvme_free_uri;
7372
nvme_fw_download_seq;
7473
nvme_gen_dhchap_key;
7574
nvme_generate_tls_key_identity;
@@ -320,6 +319,7 @@ LIBNVME_2_0 {
320319
nvmf_discovery_nbft;
321320
nvmf_eflags_str;
322321
nvmf_exat_ptr_next;
322+
nvmf_free_uri;
323323
nvmf_get_default_trsvcid;
324324
nvmf_get_discovery_log;
325325
nvmf_get_discovery_wargs;

libnvme/src/nvme/cleanup.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ static inline DEFINE_CLEANUP_FUNC(cleanup_addrinfo, struct addrinfo *, freeaddri
4949
static inline void free_uri(struct nvme_fabrics_uri **uri)
5050
{
5151
if (*uri)
52-
nvme_free_uri(*uri);
52+
nvmf_free_uri(*uri);
5353
}
5454
#define _cleanup_uri_ __cleanup__(free_uri)
5555

libnvme/src/nvme/fabrics.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1962,13 +1962,13 @@ int nvme_parse_uri(const char *str, struct nvme_fabrics_uri **urip)
19621962

19631963
if (sscanf(str, "%m[^:/]://%m[^/?#]%ms",
19641964
&scheme, &authority, &path) < 2) {
1965-
nvme_free_uri(uri);
1965+
nvmf_free_uri(uri);
19661966
return -EINVAL;
19671967
}
19681968

19691969
if (sscanf(scheme, "%m[^+]+%ms",
19701970
&uri->scheme, &uri->protocol) < 1) {
1971-
nvme_free_uri(uri);
1971+
nvmf_free_uri(uri);
19721972
return -EINVAL;
19731973
}
19741974

@@ -1986,7 +1986,7 @@ int nvme_parse_uri(const char *str, struct nvme_fabrics_uri **urip)
19861986
/* treat it as IPv4/hostname */
19871987
if (sscanf(host, "%m[^:]:%d",
19881988
&h, &uri->port) < 1) {
1989-
nvme_free_uri(uri);
1989+
nvmf_free_uri(uri);
19901990
return -EINVAL;
19911991
}
19921992
uri->host = unescape_uri(h, 0);
@@ -2030,7 +2030,7 @@ int nvme_parse_uri(const char *str, struct nvme_fabrics_uri **urip)
20302030
return 0;
20312031
}
20322032

2033-
void nvme_free_uri(struct nvme_fabrics_uri *uri)
2033+
void nvmf_free_uri(struct nvme_fabrics_uri *uri)
20342034
{
20352035
char **s;
20362036

libnvme/src/nvme/fabrics.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,12 +380,12 @@ int nvmf_register_ctrl(nvme_ctrl_t c, enum nvmf_dim_tas tas, __u32 *result);
380380
int nvme_parse_uri(const char *str, struct nvme_fabrics_uri **uri);
381381

382382
/**
383-
* nvme_free_uri() - Free the URI structure
383+
* nvmf_free_uri() - Free the URI structure
384384
* @uri: &nvme_fabrics_uri structure
385385
*
386386
* Free an &nvme_fabrics_uri structure.
387387
*/
388-
void nvme_free_uri(struct nvme_fabrics_uri *uri);
388+
void nvmf_free_uri(struct nvme_fabrics_uri *uri);
389389

390390
/**
391391
* nvmf_get_default_trsvcid() - Get default transport service ID

libnvme/test/uriparser.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ static void test_uriparser(void)
191191
assert(strcmp(d->frag, parsed_data->fragment) == 0);
192192
} else
193193
assert(d->frag == parsed_data->fragment);
194-
nvme_free_uri(parsed_data);
194+
nvmf_free_uri(parsed_data);
195195
printf(" OK\n");
196196
}
197197
}

util/cleanup.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ static inline DEFINE_CLEANUP_FUNC(cleanup_nvme_ctrl, nvme_ctrl_t, nvme_free_ctrl
4848
static inline void free_uri(struct nvme_fabrics_uri **uri)
4949
{
5050
if (*uri)
51-
nvme_free_uri(*uri);
51+
nvmf_free_uri(*uri);
5252
}
5353
#define _cleanup_uri_ __cleanup__(free_uri)
5454

0 commit comments

Comments
 (0)