[systemd-devel] [PATCH 1/2] Adding unmount functions to be used in shutdown
Kay Sievers
kay.sievers at vrfy.org
Wed Oct 6 06:26:27 PDT 2010
On Wed, Oct 6, 2010 at 15:09, Lennart Poettering <lennart at poettering.net> wrote:
> On Wed, 06.10.10 02:05, Gustavo Sverzut Barbieri (barbieri at profusion.mobi) wrote:
>
>> +#define LOOP_CLR_FD 0x4C01
>
> Is there any particular reason you define this here? To me it appears
> that linux/loop.h is perfectly fit to be included here.
>
>> +
>> + if ((dir = opendir("/sys/class/block")) == NULL)
>> + return -errno;
>
> Kay, should we use libudev for this? Right now we use libudev for all
> accesses to /sys, should we do that here, too?
Yeah, would be nicer to enumerate the block subsystem with libudev.
This will also provide the device node name, while that should not be
the reason for libudev. In systemd context we can see /dev/loopX as
ABI, not a configuration option. Udev even does refuse to delete these
nodes.
Kay
More information about the systemd-devel
mailing list