[systemd-devel] [PATCH 1/2] Adding unmount functions to be used in shutdown
Kay Sievers
kay.sievers at vrfy.org
Wed Oct 6 05:50:56 PDT 2010
On Wed, Oct 6, 2010 at 14:17, Karel Zak <kzak at redhat.com> wrote:
>> + if ((dir = opendir("/sys/class/block")) == NULL)
>> + return -errno;
>> +
>> + while ((d = readdir(dir))) {
>> + MountPoint *lb;
>> + char buf[PATH_MAX];
>> + char *loop;
>> +
>> + if (!strneq(d->d_name, "loop", 4))
>> + continue;
>> +
>> + snprintf(buf, sizeof(buf), "/dev/%s", d->d_name);
>> + if (access(buf, R_OK) != 0)
>> + continue;
>
> what about /dev/loop/<N> ?
Systemd depends on devtmpfs and will not work properly without it, and
these nodes are always created by the kernel.
Kay
More information about the systemd-devel
mailing list