[systemd-devel] [PATCH 2/4] Adding unmount functions to be used in shutdown

Fabiano Fidêncio fidencio at profusion.mobi
Thu Oct 7 04:37:56 PDT 2010


On Thu, Oct 7, 2010 at 8:33 AM, Kay Sievers <kay.sievers at vrfy.org> wrote:
> 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.

Oh, sorry,

>
> Kay
>



-- 
Fabiano Fidêncio
ProFUSION embedded systems
http://www.profusion.mobi


More information about the systemd-devel mailing list