@@ -43,20 +43,6 @@ static int nvme_mi_get_async_message(nvme_mi_ep_t ep,
4343static const int default_timeout = 1000 ; /* milliseconds; endpoints may
4444 override */
4545
46- static bool nvme_mi_probe_enabled_default (void )
47- {
48- char * val ;
49-
50- val = getenv ("LIBNVME_MI_PROBE_ENABLED" );
51- if (!val )
52- return true;
53-
54- return strcmp (val , "0" ) &&
55- strcasecmp (val , "false" ) &&
56- strncasecmp (val , "disable" , 7 );
57-
58- }
59-
6046static int parse_devname (const char * dev , unsigned int * net , uint8_t * eid ,
6147 unsigned int * ctrl )
6248{
@@ -113,53 +99,6 @@ void __nvme_transport_handle_close_mi(struct nvme_transport_handle *hdl)
11399 free (hdl );
114100}
115101
116- /* MI-equivalent of nvme_create_root, but avoids clashing symbol names
117- * when linking against both libnvme and libnvme-mi.
118- */
119- struct nvme_global_ctx * nvme_mi_create_global_ctx (FILE * fp , int log_level )
120- {
121- struct nvme_global_ctx * ctx ;
122- int fd ;
123-
124- ctx = calloc (1 , sizeof (* ctx ));
125- if (!ctx )
126- return NULL ;
127-
128- if (fp ) {
129- fd = fileno (fp );
130- if (fd < 0 ) {
131- free (ctx );
132- return NULL ;
133- }
134- } else
135- fd = STDERR_FILENO ;
136-
137- ctx -> log .fd = fd ;
138- ctx -> log .level = log_level ;
139-
140- ctx -> mi_probe_enabled = nvme_mi_probe_enabled_default ();
141-
142- list_head_init (& ctx -> hosts );
143- list_head_init (& ctx -> endpoints );
144-
145- return ctx ;
146- }
147-
148- void nvme_mi_free_global_ctx (struct nvme_global_ctx * ctx )
149- {
150- nvme_mi_ep_t ep , tmp ;
151-
152- nvme_mi_for_each_endpoint_safe (ctx , ep , tmp )
153- nvme_mi_close (ep );
154-
155- free (ctx );
156- }
157-
158- void nvme_mi_set_probe_enabled (struct nvme_global_ctx * ctx , bool enabled )
159- {
160- ctx -> mi_probe_enabled = enabled ;
161- }
162-
163102static void nvme_mi_record_resp_time (struct nvme_mi_ep * ep )
164103{
165104 int rc ;
0 commit comments