| xj | b04a402 | 2021-11-25 15:01:52 +0800 | [diff] [blame] | 1 | #include <stdio.h> |
| 2 | #include <sys/socket.h> |
| 3 | #include <netinet/in.h> |
| 4 | #include <arpa/inet.h> |
| 5 | #include <strings.h> |
| 6 | #include<stdlib.h> |
| 7 | #include <include/lynq_uci.h> |
| 8 | |
| 9 | |
| 10 | |
| 11 | //#define USER_LOG_TAG "lynq_default" |
| rjw | 5fd967e | 2022-05-17 18:50:08 +0800 | [diff] [blame^] | 12 | #define LYNQ_SW_VERSION "T800v02.MP1_MR1.01b02.02"//needs to be modified if upgrade version |
| 13 | #define LYNQ_SW_INSIDE_VERSION "T800_GSW_v02.MP1_MR1.01b02.05"//only for insde check |
| xj | b04a402 | 2021-11-25 15:01:52 +0800 | [diff] [blame] | 14 | |
| 15 | //#define GET_DATA_LEN 64 |
| 16 | #define BUF_LEN 258 |
| 17 | #define LYNQ_UCI_RO_SECTION "lynq_version" |
| rita | 6212cdd | 2022-03-25 03:48:51 -0400 | [diff] [blame] | 18 | #define LYNQ_UCI_RO_KEY_VERSION "LYNQ_SW_VERSION" |
| 19 | #define LYNQ_UCI_RO_KEY_INSIDE_VERSION "LYNQ_SW_INSIDE_VERSION" |
| xj | b04a402 | 2021-11-25 15:01:52 +0800 | [diff] [blame] | 20 | |
| 21 | |
| 22 | int main(int argc, const char *argv[]) |
| 23 | { |
| 24 | //char data[GET_DATA_LEN] = ""; |
| rita | 6212cdd | 2022-03-25 03:48:51 -0400 | [diff] [blame] | 25 | char buf[BUF_LEN] = ""; |
| 26 | char buf_insde[BUF_LEN] = ""; |
| 27 | int ret = 0; |
| xj | b04a402 | 2021-11-25 15:01:52 +0800 | [diff] [blame] | 28 | |
| 29 | |
| 30 | //lynq_get_value(LYNQ_UCI_RO_FILE, LYNQ_UCI_RO_SECTION, LYNQ_UCI_RO_KEY, data); |
| 31 | //if(strncmp(LYNQ_SW_VERSION, data, sizeof(LYNQ_SW_VERSION))!=0) |
| 32 | //{ |
| rita | 6212cdd | 2022-03-25 03:48:51 -0400 | [diff] [blame] | 33 | sprintf(buf,"%s.%s.%s=%s", LYNQ_UCI_RO_FILE, LYNQ_UCI_RO_SECTION, LYNQ_UCI_RO_KEY_VERSION, LYNQ_SW_VERSION); |
| 34 | sprintf(buf_insde,"%s.%s.%s=%s", LYNQ_UCI_RO_FILE, LYNQ_UCI_RO_SECTION, LYNQ_UCI_RO_KEY_INSIDE_VERSION, LYNQ_SW_INSIDE_VERSION); |
| 35 | |
| 36 | lynq_uci_set(buf); |
| 37 | lynq_uci_set(buf_insde); |
| xj | b04a402 | 2021-11-25 15:01:52 +0800 | [diff] [blame] | 38 | //} |
| 39 | |
| 40 | return ret; |
| 41 | } |