提交 679b5cc8 编写于 作者: Z zhong_ning

modify uevent

Signed-off-by: Nzhong_ning <zhong_ning@hoperun.com>
上级 e7454572
......@@ -219,6 +219,8 @@ static void InitUevent(struct Uevent *event)
event->partitionName = "";
event->deviceName = "";
event->partitionNum = -1;
event->major = -1;
event->minor = -1;
}
static inline const char *ParseUeventMessage(const char **buf, const char *name)
......@@ -607,7 +609,6 @@ static void HandlePlatformDevice(const struct Uevent *event)
static const char *ParseDeviceName(const struct Uevent *uevent, unsigned int len)
{
INIT_CHECK_RETURN_VALUE(uevent->major >= 0 && uevent->minor >= 0, NULL);
INIT_CHECK_RETURN_VALUE(uevent->deviceName != NULL && uevent->deviceName[0] != '\0', NULL);
const char *name = strrchr(uevent->path, '/');
INIT_CHECK_RETURN_VALUE(name != NULL, NULL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册