|
| 1 | +Index: platform/rdkb_hal/src/platform/platform_hal.c |
| 2 | +=================================================================== |
| 3 | +--- platform.orig/rdkb_hal/src/platform/platform_hal.c |
| 4 | ++++ platform/rdkb_hal/src/platform/platform_hal.c |
| 5 | +@@ -120,8 +120,10 @@ INT platform_hal_GetSerialNumber(CHAR* p |
| 6 | + sprintf(pValue,"%02x%02x%02x%02x%02x%02x",arr[0],arr[1],arr[2],arr[3],arr[4],arr[5]); |
| 7 | + return RETURN_OK; |
| 8 | + }*/ |
| 9 | +- sprintf(pValue,"%s",buf); |
| 10 | ++ sprintf(pValue,"%s",buf); |
| 11 | + } |
| 12 | ++ ///RDKBACCL-920 |
| 13 | ++ return RETURN_OK; |
| 14 | + } |
| 15 | + return RETURN_ERR; |
| 16 | + |
| 17 | +@@ -144,12 +146,13 @@ INT platform_hal_GetHardware(CHAR *pValu |
| 18 | + char buf[64] = {0}; |
| 19 | + char cmd[128] = {0}; |
| 20 | + |
| 21 | +- |
| 22 | ++ |
| 23 | + if (pValue == NULL) |
| 24 | + { |
| 25 | + return RETURN_ERR; |
| 26 | + } |
| 27 | +- snprintf(cmd,128, "cat /proc/partitions | grep mtdblock5 | awk '/mtdblock5/ {print $3}'"); |
| 28 | ++ //RDKBACCL-924 |
| 29 | ++ snprintf(cmd,128, "cat /proc/partitions | grep mtdblock4 | awk '/mtdblock4/ {print $3}'"); |
| 30 | + fp = popen(cmd,"r"); |
| 31 | + if(fp == NULL) |
| 32 | + { |
| 33 | +@@ -318,13 +321,13 @@ INT platform_hal_GetModelName(CHAR* pVal |
| 34 | + FILE *fp = NULL; |
| 35 | + char buf[64] = {0}; |
| 36 | + int count = 0; |
| 37 | +- |
| 38 | ++ |
| 39 | + if (pValue == NULL) |
| 40 | + { |
| 41 | + return RETURN_ERR; |
| 42 | + } |
| 43 | + |
| 44 | +- fp = popen("cat /proc/device-tree/model","r"); |
| 45 | ++ fp = popen("cat /proc/device-tree/model | tr -d ' '","r"); |
| 46 | + if(fp == NULL) |
| 47 | + { |
| 48 | + return RETURN_ERR; |
| 49 | +@@ -384,7 +387,8 @@ INT platform_hal_GetSoftwareVersion(CHAR |
| 50 | + INT platform_hal_GetFirmwareName(CHAR* pValue, ULONG maxSize) |
| 51 | + { |
| 52 | + FILE *fp; |
| 53 | +- char buff[64]={0}; |
| 54 | ++//RDKBACCL-927 |
| 55 | ++ char buff[128]={0}; |
| 56 | + |
| 57 | + if (pValue == NULL) |
| 58 | + { |
| 59 | +@@ -397,7 +401,7 @@ INT platform_hal_GetFirmwareName(CHAR* p |
| 60 | + return RETURN_ERR; |
| 61 | + } |
| 62 | + |
| 63 | +- while(fgets(buff, 64, fp) != NULL) |
| 64 | ++ while(fgets(buff, 128, fp) != NULL) |
| 65 | + { |
| 66 | + if(strstr(buff, "imagename") != NULL) |
| 67 | + { |
0 commit comments