[systemd-devel] [PATCH] check for negative return from dirent_ensure_type

Dave Reisner d at falconindy.com
Mon Apr 2 05:35:14 PDT 2012


On Mon, Apr 02, 2012 at 02:31:05PM +0200, Kay Sievers wrote:
> On Mon, Apr 2, 2012 at 14:22, Dave Reisner <dreisner at archlinux.org> wrote:
> > Fixes 'systemctl list-unit-files', which previously returned only:
> >
> >  Failed to issue method call: No such file or directory
> > ---
> >  src/install.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/src/install.c b/src/install.c
> > index 174d79b..a7efc2a 100644
> > --- a/src/install.c
> > +++ b/src/install.c
> > @@ -1853,7 +1853,7 @@ int unit_file_get_list(
> >
> >                         r = dirent_ensure_type(d, de);
> >                         if (r < 0) {
> > -                                if (errno == ENOENT)
> > +                                if (errno == -ENOENT)
> 
> You meant 'r ==' ?
> 
> Kay

Huh... I guess I did. Strange that it works with this patch.


More information about the systemd-devel mailing list