mirror of
https://gitee.com/openharmony/startup_init
synced 2024-11-27 10:20:46 +00:00
modify uevent
Signed-off-by: zhong_ning <zhong_ning@hoperun.com>
This commit is contained in:
parent
e7454572bb
commit
679b5cc8a3
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user