Skip to content

Commit 2d3158f

Browse files
committed
private: replace typedefs with direct definitions
The typedefs are defined in the public fabrics.h. Minimize the dependency on fabrics in the private.h header by using the concrete types for the argument types. This prepares the stage to drop the include. Signed-off-by: Daniel Wagner <[email protected]>
1 parent d76eb46 commit 2d3158f

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

libnvme/src/nvme/private.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -324,26 +324,26 @@ struct libnvme_transport_handle *__libnvme_create_transport_handle(
324324

325325
int _libnvme_create_ctrl(struct libnvme_global_ctx *ctx,
326326
struct libnvmf_context *fctx,
327-
libnvme_ctrl_t *cp);
327+
struct libnvme_ctrl **cp);
328328
bool _libnvme_ctrl_match_config(struct libnvme_ctrl *c,
329329
struct libnvmf_context *fctx);
330330

331331
void *__libnvme_alloc(size_t len);
332332

333333
void *__libnvme_realloc(void *p, size_t len);
334334

335-
void nvme_deconfigure_ctrl(libnvme_ctrl_t c);
335+
void nvme_deconfigure_ctrl(struct libnvme_ctrl *c);
336336

337-
libnvme_host_t libnvme_lookup_host(struct libnvme_global_ctx *ctx,
337+
struct libnvme_host *libnvme_lookup_host(struct libnvme_global_ctx *ctx,
338338
const char *hostnqn, const char *hostid);
339-
libnvme_subsystem_t libnvme_lookup_subsystem(struct libnvme_host *h,
339+
struct libnvme_subsystem *libnvme_lookup_subsystem(struct libnvme_host *h,
340340
const char *name, const char *subsysnqn);
341-
libnvme_ctrl_t libnvme_lookup_ctrl(libnvme_subsystem_t s,
342-
struct libnvmf_context *fctx, libnvme_ctrl_t p);
343-
libnvme_ctrl_t libnvme_ctrl_find(libnvme_subsystem_t s,
341+
struct libnvme_ctrl * libnvme_lookup_ctrl(struct libnvme_subsystem * s,
342+
struct libnvmf_context *fctx, struct libnvme_ctrl *p);
343+
struct libnvme_ctrl * libnvme_ctrl_find(struct libnvme_subsystem *s,
344344
struct libnvmf_context *fctx);
345345

346-
void __libnvme_free_host(libnvme_host_t h);
346+
void __libnvme_free_host(struct libnvme_host * h);
347347

348348
#if (LOG_FUNCNAME == 1)
349349
#define __libnvme_log_func __func__
@@ -361,8 +361,8 @@ __libnvme_msg(struct libnvme_global_ctx *ctx, int level,
361361
#define SECTOR_SIZE 512
362362
#define SECTOR_SHIFT 9
363363

364-
int __libnvme_import_keys_from_config(libnvme_host_t h, libnvme_ctrl_t c,
365-
long *keyring_id, long *key_id);
364+
int __libnvme_import_keys_from_config(struct libnvme_host *h,
365+
struct libnvme_ctrl *c, long *keyring_id, long *key_id);
366366

367367
static inline char *xstrdup(const char *s)
368368
{
@@ -552,15 +552,15 @@ static inline __u16 nvmf_exat_size(size_t val_len)
552552
*
553553
* Return: On success 0, else error code.
554554
*/
555-
int libnvme_ns_get_transport_handle(libnvme_ns_t n,
555+
int libnvme_ns_get_transport_handle(struct libnvme_ns *n,
556556
struct libnvme_transport_handle **hdl);
557557

558558
/**
559559
* libnvme_ns_release_transport_handle() - Free transport handle from ns object
560560
* @n: Namespace instance
561561
*
562562
*/
563-
void libnvme_ns_release_transport_handle(libnvme_ns_t n);
563+
void libnvme_ns_release_transport_handle(struct libnvme_ns *n);
564564

565565
/**
566566
* libnvme_mi_admin_admin_passthru() - Submit an nvme admin passthrough command

0 commit comments

Comments
 (0)