wifi ap file
Change-Id: I80c20b72980a422bda8d7de8abb2e41161693033
diff --git a/mbtk/libmbtk_lib/wifi/mbtk_wifi_ap.c b/mbtk/libmbtk_lib/wifi/mbtk_wifi_ap.c
index 6cd1463..74e1c16 100644
--- a/mbtk/libmbtk_lib/wifi/mbtk_wifi_ap.c
+++ b/mbtk/libmbtk_lib/wifi/mbtk_wifi_ap.c
@@ -252,4 +252,43 @@
}
+int mbtk_wifi_set_file(const char *path, const char *value)
+{
+ FILE *file;
+
+ file = fopen(path, "w");
+ if (!file)
+ {
+ return -1;
+ }
+
+ fputs(value, file);
+
+
+ fclose(file);
+ return 0;
+}
+
+int mbtk_wifi_get_file(const char *path, char *value, int value_max_len)
+{
+ FILE *file;
+
+ file = fopen(path, "r");
+ if (!file)
+ {
+ return -1;
+ }
+
+ if(NULL == fgets(value, value_max_len, file))
+ {
+ fclose(file);
+ return -1;
+ }
+
+
+ fclose(file);
+ return 0;
+}
+
+