提交 969e4ba5 编写于 作者: C cheng_jinsong

delete unused function

Signed-off-by: Ncheng_jinsong <chengjinsong2@huawei.com>
Change-Id: If9b04a0172cd8f7936b3e615597ca4de51ae7dcb
上级 5e15e94f
......@@ -77,7 +77,6 @@ void FreeStringVector(char **vector, int count);
int InUpdaterMode(void);
int StringReplaceChr(char *strl, char oldChr, char newChr);
uint32_t GetRandom(void);
void OpenConsole(void);
void TrimTail(char *str, char c);
char *TrimHead(char *str, char c);
......
......@@ -534,17 +534,6 @@ int StringReplaceChr(char *strl, char oldChr, char newChr)
return 0;
}
uint32_t GetRandom()
{
uint32_t ulSeed = 0;
int fd = open("/dev/urandom", O_RDONLY);
if (fd > 0) {
read(fd, &ulSeed, sizeof(ulSeed));
}
close(fd);
return ulSeed;
}
void RedirectStdio(int fd)
{
#ifndef __LITEOS_M__
......
......@@ -70,7 +70,6 @@ HWTEST_F(UtilsUnitTest, TestUtilsApi, TestSize.Level0)
float sec = ConvertMicrosecondToSecond(1000000); // 1000000 microseconds
EXPECT_EQ(sec, 1);
EXPECT_EQ(WriteAll(2, "test", strlen("test")), 4);
GetRandom();
mode_t mode = S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH;
CheckAndCreatFile("/data/init_ut/testcreatfile", mode);
CheckAndCreatFile("/data/init_ut/nodir/testcreatfile", mode);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册