forked from xuos/xiuos
fix some bugs for sd read
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
SRC_FILES := json_parser.c
|
||||
|
||||
include $(KERNEL_ROOT)/compiler.mk
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#include "json_parser.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
// #include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <transform.h>
|
||||
|
||||
#include "cJSON.h"
|
||||
|
||||
@@ -31,9 +34,9 @@ yolov2_params_t param_parse(char *json_file_path)
|
||||
} else {
|
||||
printf("Reading config from: %s\n", json_file_path);
|
||||
}
|
||||
|
||||
read(fin, buffer, sizeof(buffer));
|
||||
close(fin);
|
||||
|
||||
// read json string
|
||||
json_obj = cJSON_Parse(buffer);
|
||||
// free(buffer);
|
||||
|
||||
Reference in New Issue
Block a user