<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Sep 1, 2015 at 6:32 AM, Tom Yan <span dir="ltr"><<a href="mailto:tom.ty89@gmail.com" target="_blank">tom.ty89@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Is it a limitation or bug that I can only capture remove events with<br>
purely SUBSYSTEM or KENREL match, but not with ATTR{*} or even DRIVER?<br></blockquote><div><br></div><div>AFAIK, the former two come from the uevent itself, but the latter are always read from sysfs... and during a remove event, the device is not in sysfs anymore.</div><div><br></div><div>(Even more, some sysfs attributes might themselves query data directly from the device, which wouldn't work well if the device is no longer connected.)</div><div><br></div><div>So IMHO you should match on udev's ENV{} instead, and cache the desired attributes into ENV.</div></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Mantas Mikulėnas <<a href="mailto:grawity@gmail.com" target="_blank">grawity@gmail.com</a>></div></div>
</div></div>