@@ -43,7 +43,7 @@ static const struct Nif *nvs_nif_get_nif(const char *nifname);
4343
4444static int write_atom_c_string (Context * ctx , char * buf , size_t bufsize , term t );
4545
46- static term nif_esp_nvs_get_binary (Context * ctx , int argc , term argv [])
46+ static term nif_esp_nvs_fetch_binary (Context * ctx , int argc , term argv [])
4747{
4848 UNUSED (argc );
4949 VALIDATE_VALUE (argv [0 ], term_is_atom );
@@ -70,7 +70,7 @@ static term nif_esp_nvs_get_binary(Context *ctx, int argc, term argv[])
7070 }
7171 term error_tuple = term_alloc_tuple (2 , & ctx -> heap );
7272 term ns_not_found = globalcontext_make_atom (ctx -> global , ATOM_STR ("\x13" , "namespace_not_found" ));
73- term_put_tuple_element (error_tuple , 0 , OK_ATOM );
73+ term_put_tuple_element (error_tuple , 0 , ERROR_ATOM );
7474 term_put_tuple_element (error_tuple , 1 , ns_not_found );
7575 return error_tuple ;
7676 }
@@ -91,7 +91,7 @@ static term nif_esp_nvs_get_binary(Context *ctx, int argc, term argv[])
9191 }
9292 term error_tuple = term_alloc_tuple (2 , & ctx -> heap );
9393 term not_found = globalcontext_make_atom (ctx -> global , ATOM_STR ("\x9" , "not_found" ));
94- term_put_tuple_element (error_tuple , 0 , OK_ATOM );
94+ term_put_tuple_element (error_tuple , 0 , ERROR_ATOM );
9595 term_put_tuple_element (error_tuple , 1 , not_found );
9696 return error_tuple ;
9797 }
@@ -256,9 +256,9 @@ static term nif_esp_nvs_reformat(Context *ctx, int argc, term argv[])
256256 }
257257}
258258
259- static const struct Nif esp_nvs_get_binary_nif = {
259+ static const struct Nif esp_nvs_fetch_binary_nif = {
260260 .base .type = NIFFunctionType ,
261- .nif_ptr = nif_esp_nvs_get_binary
261+ .nif_ptr = nif_esp_nvs_fetch_binary
262262};
263263static const struct Nif esp_nvs_put_binary_nif = {
264264 .base .type = NIFFunctionType ,
@@ -290,9 +290,9 @@ void nvs_nif_init(GlobalContext *gloabl)
290290
291291const struct Nif * nvs_nif_get_nif (const char * nifname )
292292{
293- if (strcmp ("esp:nvs_get_binary /2" , nifname ) == 0 ) {
293+ if (strcmp ("esp:nvs_fetch_binary /2" , nifname ) == 0 ) {
294294 TRACE ("Resolved platform nif %s ...\n" , nifname );
295- return & esp_nvs_get_binary_nif ;
295+ return & esp_nvs_fetch_binary_nif ;
296296 }
297297 if (strcmp ("esp:nvs_put_binary/3" , nifname ) == 0 ) {
298298 TRACE ("Resolved platform nif %s ...\n" , nifname );
0 commit comments