|
|
@@ -10,6 +10,7 @@
|
|
|
#include <sys/vfs.h>
|
|
|
#include <sys/ioctl.h>
|
|
|
#include <linux/rtc.h>
|
|
|
+#include "cfg.h"
|
|
|
|
|
|
#undef LOG_TAG
|
|
|
#define LOG_TAG "main"
|
|
|
@@ -280,9 +281,9 @@ static int set_rtc(time_t t)
|
|
|
{
|
|
|
int r=0,fd;
|
|
|
|
|
|
-#if (CHIP_TYPE == CHIP_T113s)
|
|
|
- system("hwclock -w -f /dev/rtc0");
|
|
|
-#else
|
|
|
+// #if (CHIP_TYPE == CHIP_T113s)
|
|
|
+// system("hwclock -w -f /dev/rtc0");
|
|
|
+// #else
|
|
|
|
|
|
struct rtc_time *rtc;
|
|
|
|
|
|
@@ -302,7 +303,7 @@ int r=0,fd;
|
|
|
printf("set rtc ok!\n");
|
|
|
}
|
|
|
close(fd);
|
|
|
-#endif
|
|
|
+//#endif
|
|
|
return r;
|
|
|
}
|
|
|
|
|
|
@@ -468,7 +469,14 @@ int set_zone(int zone)
|
|
|
return -1;
|
|
|
}
|
|
|
#else
|
|
|
+
|
|
|
+#if (CHIP_TYPE == CHIP_T113s)
|
|
|
+ sprintf(buf, "ln -sf /usr/share/zoneinfo/GMT%s%d /etc/localtime", (zone<0)?"+":"-", abs(zone));
|
|
|
+#else
|
|
|
+
|
|
|
sprintf(buf, "ln -sf /usr/share/zoneinfo/Etc/GMT%s%d /etc/localtime", (zone<0)?"+":"-", abs(zone));
|
|
|
+#endif
|
|
|
+
|
|
|
#endif
|
|
|
|
|
|
log_i("set_zone: %s", buf);
|
|
|
@@ -746,12 +754,22 @@ void SetMenuAuthority(int RoleID)
|
|
|
_GlobalMenuAuthority.SnmpszEnabled = true;
|
|
|
_GlobalMenuAuthority.MqszEnabled = true;
|
|
|
_GlobalMenuAuthority.NtpszEnabled = true;
|
|
|
+#ifndef NOT_USE_CONTROL
|
|
|
_GlobalMenuAuthority.DsszEnabled = true;
|
|
|
_GlobalMenuAuthority.SxszEnabled = true;
|
|
|
_GlobalMenuAuthority.FzszEnabled = true;
|
|
|
+#else
|
|
|
+ _GlobalMenuAuthority.DsszEnabled = false;
|
|
|
+ _GlobalMenuAuthority.SxszEnabled = false;
|
|
|
+ _GlobalMenuAuthority.FzszEnabled = false;
|
|
|
+#endif
|
|
|
// 8、设备维护菜单
|
|
|
_GlobalMenuAuthority.SbcqEnabled = true;
|
|
|
+#ifndef NOT_USE_CONTROL
|
|
|
_GlobalMenuAuthority.GjsjEnabled = true;
|
|
|
+#else
|
|
|
+ _GlobalMenuAuthority.GjsjEnabled = false;
|
|
|
+#endif
|
|
|
_GlobalMenuAuthority.KzbsjEnabled = true;
|
|
|
_GlobalMenuAuthority.HhccszEnabled = true;
|
|
|
_GlobalMenuAuthority.PzdrdcEnabled = true;
|
|
|
@@ -796,12 +814,22 @@ void SetMenuAuthority(int RoleID)
|
|
|
_GlobalMenuAuthority.SnmpszEnabled = false;
|
|
|
_GlobalMenuAuthority.MqszEnabled = false;
|
|
|
_GlobalMenuAuthority.NtpszEnabled = true;
|
|
|
+#ifndef NOT_USE_CONTROL
|
|
|
_GlobalMenuAuthority.DsszEnabled = true;
|
|
|
_GlobalMenuAuthority.SxszEnabled = true;
|
|
|
_GlobalMenuAuthority.FzszEnabled = true;
|
|
|
+#else
|
|
|
+ _GlobalMenuAuthority.DsszEnabled = false;
|
|
|
+ _GlobalMenuAuthority.SxszEnabled = false;
|
|
|
+ _GlobalMenuAuthority.FzszEnabled = false;
|
|
|
+#endif
|
|
|
// 8、设备维护菜单
|
|
|
_GlobalMenuAuthority.SbcqEnabled = true;
|
|
|
+#ifndef NOT_USE_CONTROL
|
|
|
_GlobalMenuAuthority.GjsjEnabled = true;
|
|
|
+#else
|
|
|
+ _GlobalMenuAuthority.GjsjEnabled = false;
|
|
|
+#endif
|
|
|
_GlobalMenuAuthority.KzbsjEnabled = true;
|
|
|
_GlobalMenuAuthority.HhccszEnabled = false;
|
|
|
_GlobalMenuAuthority.PzdrdcEnabled = true;
|
|
|
@@ -849,6 +877,7 @@ void SetMenuAuthority(int RoleID)
|
|
|
_GlobalMenuAuthority.DsszEnabled = false;
|
|
|
_GlobalMenuAuthority.SxszEnabled = false;
|
|
|
_GlobalMenuAuthority.FzszEnabled = false;
|
|
|
+
|
|
|
// 8、设备维护菜单
|
|
|
_GlobalMenuAuthority.SbcqEnabled = false;
|
|
|
_GlobalMenuAuthority.GjsjEnabled = false;
|