提交 e86916a3 编写于 作者: S sun_fan

init: fix reviewbot

Signed-off-by: Nsun_fan <sun_fan1@hoperun.com>
上级 447786c0
......@@ -187,13 +187,13 @@ static void BuildDeviceSymbolLinks(char **links, int linkNum, const char *parent
// For now, we will not create symbol link for it.
if (!INVALIDSTRING(partitionName)) {
if (snprintf_s(links[linkNum], DEVICE_FILE_SIZE, DEVICE_FILE_SIZE - 1,
"/dev/block/platform/%s/by-name/%s", parent, partitionName) == -1) {
"/dev/block/platform/%s/by-name/%s", parent, partitionName) == -1) {
INIT_LOGE("Failed to build link");
}
} else if (!INVALIDSTRING(deviceName)) {
// If a device does not have a partition name, create a symbol link for it separately.
if (snprintf_s(links[linkNum], DEVICE_FILE_SIZE, DEVICE_FILE_SIZE - 1,
"/dev/block/platform/%s/%s", parent, deviceName) == -1) {
"/dev/block/platform/%s/%s", parent, deviceName) == -1) {
INIT_LOGE("Failed to build link");
}
}
......@@ -202,7 +202,7 @@ static void BuildDeviceSymbolLinks(char **links, int linkNum, const char *parent
static char **GetBlockDeviceSymbolLinks(const struct Uevent *uevent)
{
if (uevent == NULL || uevent->syspath == NULL || uevent->subsystem == NULL ||
STRINGEQUAL(uevent->subsystem, "block") == 0) {
STRINGEQUAL(uevent->subsystem, "block") == 0) {
INIT_LOGW("Invalid arguments, Skip to get device symbol links.");
return NULL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册