Re: [announce] mdevd-0.0.1.0 - a mdev-compatible uevent manager

From: Colin Booth <colin_at_heliocat.net>
Date: Mon, 8 Jan 2018 20:09:44 +0000

On Mon, Jan 08, 2018 at 07:31:17PM +0000, Laurent Bercot wrote:
> > #!/usr/bin/execlineb -P
> > pipeline { find /sys -type f -name uevent -print0 }
> > forstdin -0 -p f importas -u f f redirfd -w 1 $f echo add
> The problem with your script is that it's getting a lot of
> duplicates, since multiple symlinks in /sys point to the same
> directory describing your device. I'm still hoping to avoid scanning
> the entirety of /sys, so I'd like to find a correct pattern, but if
> there's no other way, I'll just scan everything discarding symlinks.
>
'-type f' should only find regular files, not symlinks. I don't believe
it will even recurse into symlinks by default so deduplication shouldn't
be necessary.

-- 
Colin Booth
Received on Mon Jan 08 2018 - 20:09:44 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:38:49 UTC