@@ -1053,7 +1053,7 @@ struct libnvmf_context {};
10531053 NBFT
10541054 ******/
10551055%{
1056- static PyObject *ssns_to_dict (struct nbft_info_subsystem_ns *ss)
1056+ static PyObject *ssns_to_dict (struct libnbft_subsystem_ns *ss)
10571057 {
10581058 unsigned int i;
10591059 PyObject *output = PyDict_New ();
@@ -1073,14 +1073,14 @@ struct libnvmf_context {};
10731073 {
10741074 PyObject *nid;
10751075 switch (ss->nid_type ) {
1076- case NBFT_INFO_NID_TYPE_EUI64 :
1076+ case LIBNBFT_NID_TYPE_EUI64 :
10771077 PyDict_SetItemStringDecRef (output, " nid_type" , PyUnicode_FromString (" eui64" ));
10781078 nid = PyUnicode_FromFormat (" %02x%02x%02x%02x%02x%02x%02x%02x" ,
10791079 ss->nid [0 ], ss->nid [1 ], ss->nid [2 ], ss->nid [3 ],
10801080 ss->nid [4 ], ss->nid [5 ], ss->nid [6 ], ss->nid [7 ]);
10811081 break ;
10821082
1083- case NBFT_INFO_NID_TYPE_NGUID :
1083+ case LIBNBFT_NID_TYPE_NGUID :
10841084 PyDict_SetItemStringDecRef (output, " nid_type" , PyUnicode_FromString (" nguid" ));
10851085 nid = PyUnicode_FromFormat (" %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x" ,
10861086 ss->nid [0 ], ss->nid [1 ], ss->nid [2 ], ss->nid [3 ],
@@ -1089,7 +1089,7 @@ struct libnvmf_context {};
10891089 ss->nid [12 ], ss->nid [13 ], ss->nid [14 ], ss->nid [15 ]);
10901090 break ;
10911091
1092- case NBFT_INFO_NID_TYPE_NS_UUID :
1092+ case LIBNBFT_NID_TYPE_NS_UUID :
10931093 {
10941094 char uuid_str[NVME_UUID_LEN_STRING];
10951095 PyDict_SetItemStringDecRef (output, " nid_type" , PyUnicode_FromString (" uuid" ));
@@ -1121,7 +1121,7 @@ struct libnvmf_context {};
11211121 return output;
11221122 }
11231123
1124- static PyObject *hfi_to_dict (struct nbft_info_hfi *hfi)
1124+ static PyObject *hfi_to_dict (struct libnbft_hfi *hfi)
11251125 {
11261126 PyObject *output = PyDict_New ();
11271127
@@ -1164,7 +1164,7 @@ struct libnvmf_context {};
11641164 return output;
11651165 }
11661166
1167- static PyObject *discovery_to_dict (struct nbft_info_discovery *disc)
1167+ static PyObject *discovery_to_dict (struct libnbft_discovery *disc)
11681168 {
11691169 PyObject *output = PyDict_New ();
11701170
@@ -1180,7 +1180,7 @@ struct libnvmf_context {};
11801180 return output;
11811181 }
11821182
1183- static PyObject *nbft_to_pydict (struct nbft_info *nbft)
1183+ static PyObject *nbft_to_pydict (struct libnbft_info *nbft)
11841184 {
11851185 PyObject *val;
11861186 PyObject *output = PyDict_New ();
@@ -1199,17 +1199,17 @@ struct libnvmf_context {};
11991199 PyDict_SetItemStringDecRef (host, " host_id_configured" , PyBool_FromLong (nbft->host .host_id_configured ));
12001200 PyDict_SetItemStringDecRef (host, " host_nqn_configured" , PyBool_FromLong (nbft->host .host_nqn_configured ));
12011201
1202- val = PyUnicode_FromString (nbft->host .primary == NBFT_INFO_PRIMARY_ADMIN_HOST_FLAG_NOT_INDICATED ? " not indicated" :
1203- nbft->host .primary == NBFT_INFO_PRIMARY_ADMIN_HOST_FLAG_UNSELECTED ? " unselected" :
1204- nbft->host .primary == NBFT_INFO_PRIMARY_ADMIN_HOST_FLAG_SELECTED ? " selected" : " reserved" );
1202+ val = PyUnicode_FromString (nbft->host .primary == LIBNBFT_PRIMARY_ADMIN_HOST_FLAG_NOT_INDICATED ? " not indicated" :
1203+ nbft->host .primary == LIBNBFT_PRIMARY_ADMIN_HOST_FLAG_UNSELECTED ? " unselected" :
1204+ nbft->host .primary == LIBNBFT_PRIMARY_ADMIN_HOST_FLAG_SELECTED ? " selected" : " reserved" );
12051205 PyDict_SetItemStringDecRef (host, " primary_admin_host_flag" , val);
12061206
12071207 PyDict_SetItemStringDecRef (output, " host" , host);
12081208 }
12091209
12101210 {
12111211 size_t ss_num = 0 ;
1212- struct nbft_info_subsystem_ns **ss;
1212+ struct libnbft_subsystem_ns **ss;
12131213 PyObject *subsystem;
12141214
12151215 /* First, let's find how many entries there are */
@@ -1227,7 +1227,7 @@ struct libnvmf_context {};
12271227
12281228 {
12291229 size_t hfi_num = 0 ;
1230- struct nbft_info_hfi **hfi;
1230+ struct libnbft_hfi **hfi;
12311231 PyObject *hfis;
12321232
12331233 /* First, let's find how many entries there are */
@@ -1245,7 +1245,7 @@ struct libnvmf_context {};
12451245
12461246 {
12471247 size_t disc_num = 0 ;
1248- struct nbft_info_discovery **disc;
1248+ struct libnbft_discovery **disc;
12491249 PyObject *discovery;
12501250
12511251 /* First, let's find how many entries there are */
@@ -1268,7 +1268,7 @@ struct libnvmf_context {};
12681268
12691269 PyObject *nbft_get (struct libnvme_global_ctx *ctx, const char * filename)
12701270 {
1271- struct nbft_info *nbft;
1271+ struct libnbft_info *nbft;
12721272 PyObject *output;
12731273 int ret;
12741274
0 commit comments