문제

By going through the code of vold,

I found there are a couple of lines of code in main.cpp (system/vold/main.cpp) that I dont get the real function of these.

Those are..

1.

vm->setBroadcaster((SocketListener *) cl);

nm->setBroadcaster((SocketListener *) cl);

2.

coldboot("/sys/block");

Why vold does a coldboot here?


Could anyone explain a bit about why vold does this?

Thanks

도움이 되었습니까?

해결책 2

I think I've found out the answer for the first question.

vm->setBroadcaster((SocketListener *) cl);

nm->setBroadcaster((SocketListener *) cl);

In this case, VolumeManager and NetlinkManager need to send the notify to MountService which is in framework layer. Hence, CommandListener acts as a broadcaster for vm and nm. : )

다른 팁

THe coldboot is done for coldplug devices by sending "add" to uevent files in /sys/block tree.

As described in uevent sent from kernel to user space (udev)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top