[systemd-devel] how to handle filesystems that do not support d_type in readdirs dirent?
Marius Tolzmann
tolzmann at molgen.mpg.de
Thu Mar 3 04:05:45 PST 2011
hello..
we are currently using reiserfs on our root-partition..
since reiserfs always sets d_type to DT_UNKNOWN in dirent entries some
tools like systemd-tmpfiles do not work as expected.
in src/util.c:3905 DT_UNKNOWN is already included when checking file for
type DT_REG or DT_LNK.
since there seems to be no special handling for symlinks (e.g. checking
the type of the symlinks destionation) i just fixed scandir_filter to
also accept DT_UNKNOWN.
(other) places where DT_REG checks may fail on reiserfs or other fs that
don't support setting the correct type of file in d_type:
src/tty-ask-password-agent.c:510: if (de->d_type != DT_REG)
src/modules-load.c:45: if (d->d_type != DT_REG &&
src/tmpfiles.c:781: if (d->d_type != DT_REG &&
.. how is this supposed to be handled? if the type of a symlinks
destination isn't checked the whole check could be skipped at all?
reagrds, marius..
More information about the systemd-devel
mailing list