<p dir="ltr">John,</p>
<p dir="ltr">How about generate the subsystem list from /etc/hotplug.d dirs. The list could be loaded at startup and refreshed the same way hotplug.json is ( which might be "never" as procd does not have an "init q").</p>
<p dir="ltr">Regards,</p>
<p dir="ltr">Luiz</p>
<br><div class="gmail_quote"><div dir="ltr">Em sáb, 28 de nov de 2015 21:14, John Crispin <<a href="mailto:blogic@openwrt.org">blogic@openwrt.org</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Yousong,<br>
<br>
On 28/11/2015 05:22, Yousong Zhou wrote:<br>
> There are time that programs need to be notified of events from<br>
> subsystems that are not enumerated in the .json definition, e.g. QEMU<br>
> guest agent by default requires /dev/virtio-ports/org.qemu.guest_agent.0<br>
> which is a symlink to /dev/vportMpN from virtio-ports subsystem.<br>
><br>
<br>
i am not sure if this is a good idea. there are thousands of events<br>
being broadcast, specially during boot and we really want to avoid<br>
respawning the script helper for each one of them. i was under the<br>
impression that we had an include directive that allowed us to include<br>
board/target specific json files. however i am failing to find the code<br>
that does this so the feature might not actually be implemented yet.<br>
i'll need to have a closer look at this the next days.<br>
<br>
John<br>
<br>
> Signed-off-by: Yousong Zhou <<a href="mailto:yszhou4tech@gmail.com" target="_blank">yszhou4tech@gmail.com</a>><br>
> ---<br>
> package/system/procd/files/hotplug.json | 9 ++-------<br>
> 1 file changed, 2 insertions(+), 7 deletions(-)<br>
><br>
> diff --git a/package/system/procd/files/hotplug.json b/package/system/procd/files/hotplug.json<br>
> index 27b4836..bad2340 100644<br>
> --- a/package/system/procd/files/hotplug.json<br>
> +++ b/package/system/procd/files/hotplug.json<br>
> @@ -69,18 +69,13 @@<br>
> [ "button", "/etc/rc.button/%BUTTON%" ]<br>
> ],<br>
> [ "if",<br>
> - [ "eq", "SUBSYSTEM",<br>
> - [ "net", "input", "usb", "usbmisc", "ieee1394", "block", "atm", "zaptel", "tty", "button" ]<br>
> - ],<br>
> - [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ]<br>
> - ],<br>
> - [ "if",<br>
> [ "and",<br>
> [ "eq", "SUBSYSTEM", "usb-serial" ],<br>
> [ "regex", "DEVNAME",<br>
> [ "^ttyUSB", "^ttyACM" ]<br>
> ],<br>
> ],<br>
> - [ "exec", "/sbin/hotplug-call", "tty" ]<br>
> + [ "exec", "/sbin/hotplug-call", "tty" ],<br>
> + [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ]<br>
> ],<br>
> ]<br>
><br>
_______________________________________________<br>
openwrt-devel mailing list<br>
<a href="mailto:openwrt-devel@lists.openwrt.org" target="_blank">openwrt-devel@lists.openwrt.org</a><br>
<a href="https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel" rel="noreferrer" target="_blank">https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel</a><br>
</blockquote></div><div dir="ltr">-- <br></div><p dir="ltr">Luiz Angelo Daros de Luca</p>