On Thu, Oct 7, 2010 at 13:24,  <[email protected]> wrote:
> +static int loopback_list_get(MountPoint **loopback_list_head) {
> +        int r;
> +        struct udev *udev;
> +        struct udev_enumerate *e = NULL;
> +        struct udev_list_entry *item = NULL, *first = NULL;
> +
> +        if (!(udev = udev_new())) {
> +                r = -ENOMEM;
> +                goto finish;
> +        }
> +
> +        if (!(e = udev_enumerate_new(udev))) {
> +                r = -ENOMEM;
> +                goto finish;
> +        }
> +
> +        if (udev_enumerate_add_match_sysname(e, "loop*") < 0) {
> +                r = -EIO;
> +                goto finish;
> +        }

Oh, please don't drop the "block" match. :) It will iterate over the
entire sysfs otherwise.

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

Reply via email to