remove a dead function
This commit is contained in:
committed by
calvin_peyron
parent
7d70617a01
commit
3f9dcee5fa
@@ -25,52 +25,6 @@
|
|||||||
#include "common/utils/mem/oai_memory.h"
|
#include "common/utils/mem/oai_memory.h"
|
||||||
#include "common/utils/LOG/log.h"
|
#include "common/utils/LOG/log.h"
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
** **
|
|
||||||
** Name: memory_get_path() **
|
|
||||||
** **
|
|
||||||
** Description: Gets the absolute path of the file where non-volatile **
|
|
||||||
** data are located **
|
|
||||||
** **
|
|
||||||
** Inputs: dirname: The directory where data file is located **
|
|
||||||
** filename: The name of the data file **
|
|
||||||
** Others: None **
|
|
||||||
** **
|
|
||||||
** Outputs: None **
|
|
||||||
** Return: The absolute path of the non-volatile data **
|
|
||||||
** file. The returned value is a dynamically **
|
|
||||||
** allocated octet string that needs to be **
|
|
||||||
** freed after usage. **
|
|
||||||
** Others: None **
|
|
||||||
** **
|
|
||||||
***************************************************************************/
|
|
||||||
char* memory_get_path(const char* dirname, const char* filename)
|
|
||||||
{
|
|
||||||
/* Get non-volatile data directory */
|
|
||||||
const char* path = getenv(dirname);
|
|
||||||
|
|
||||||
if (path == NULL) {
|
|
||||||
path = getenv(DEFAULT_NAS_PATH);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (path == NULL) {
|
|
||||||
path = ".";
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Append non-volatile data file name */
|
|
||||||
size_t size = strlen(path) + strlen(filename) + 1;
|
|
||||||
char* data_filename = (char*)malloc(size + 1);
|
|
||||||
|
|
||||||
if (data_filename != NULL) {
|
|
||||||
if (size != sprintf(data_filename, "%s/%s", path, filename)) {
|
|
||||||
free(data_filename);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return data_filename;
|
|
||||||
}
|
|
||||||
|
|
||||||
char* memory_get_path_from_ueid(const char* dirname, const char* filename, int ueid)
|
char* memory_get_path_from_ueid(const char* dirname, const char* filename, int ueid)
|
||||||
{
|
{
|
||||||
/* Get non-volatile data directory */
|
/* Get non-volatile data directory */
|
||||||
|
|||||||
@@ -35,8 +35,6 @@ typedef unsigned char uint8_t;
|
|||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
char* memory_get_path(const char* dirname, const char* filename);
|
|
||||||
|
|
||||||
char* memory_get_path_from_ueid(const char* dirname, const char* filename, int ueid);
|
char* memory_get_path_from_ueid(const char* dirname, const char* filename, int ueid);
|
||||||
|
|
||||||
int memory_read(const char* datafile, void* data, size_t size);
|
int memory_read(const char* datafile, void* data, size_t size);
|
||||||
|
|||||||
Reference in New Issue
Block a user