[systemd-devel] [PATCH 2/4] Adding unmount functions to be used in shutdown
Kay Sievers
kay.sievers at vrfy.org
Thu Oct 7 04:33:44 PDT 2010
On Thu, Oct 7, 2010 at 13:24, <fidencio at profusion.mobi> 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
More information about the systemd-devel
mailing list