On Thu, Oct 7, 2010 at 06:03,  <[email protected]> wrote:
> +        if (udev_enumerate_add_match_subsystem(e, "block") < 0) {
> +                r = -EIO;
> +                goto finish;
> +        }
> +
> +        if (udev_enumerate_scan_devices(e) < 0) {
> +                r = -EIO;
> +                goto finish;
> +        }
> +
> +        first = udev_enumerate_get_list_entry(e);
> +
> +        udev_list_entry_foreach(item, first) {
> +                MountPoint *lb;
> +                char buf[PATH_MAX];
> +                char *loop;
> +
> +                snprintf(buf, sizeof(buf), "%s", 
> udev_list_entry_get_name(item));
> +                if (strstr(buf, "loop"))

I think, here you can let libudev return only the loop devices with:
  udev_enumerate_add_match_sysname(, "loop*");

Kay
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to